Mahol Dot Org

Icon

Weblog For All Your Need

ETA – Estimated Turn Around Time Planning Software Life Cycle

What is ETA?
ETA stands for Estimated Turn Around Time. ETA is generally used in any planning and managment life cycle. In industry when a product born from an idea and enters into planning phase with stake holders in a Conference room, they all decide what should be the product launch date in the market for public use. ETA is not verbally decided for any product but it is calculated term with respect to resources available, and time available in the competent market. PRoduct goes from lifecyle so it is devided into many stages like requirement analysis, design, implementation, testing and last is delivery. This lifecycle again can repeate after customers feedback showing bugs in product or any new enhancement or featurs releases. In this lifecycle product is devided into modules and each module and so each phase has its ETA.
Advantages of ETA.
Having ETA in planning or anything having planned with correct estimation gives direction and confidennce to the team towards the launch of product or to that precious idea which can make history or million dollars.
With ETA we decide cost of product in advance.
Having ETA product is driven with timelines.

Number of View :15

Debugging Fortran Programs Using IDB How To Debug Fortran Code Ifort Commands

how to debug fortran code using idb
debugging Fortran programs.

Compiling your Fortran program for debugging

To prepare your program for debugging when using the command line (ifort command):
In a command window, (such as the Fortran command window available from the Intel Fortran program folder), compile and link the program with full debug information and no optimization:

      ifort -g file.f90 (Linux OS and Mac OS X)

      ifort /debug:full file.f90 (Windows OS)

On Windows OS, specify the /debug:full compiler option to produce full debugging information. It produces symbol table information needed for full symbolic debugging of unoptimized code and global symbol information needed for linking.
How to use Intel idb as debugger.
IDB comes with good help information
eg, (idb) help run
Run the debugger program.

Usage:

    run   (arguments) (redirections)

Arguments:

     Run the program with the specified arguments.

                Run the program with the specified input and output
                redirections.

If no arguments and redirections are specified, program is run with arguments
and redirections specified by previous “run” command with arguments or by “set
args” command.

Synonyms: “r”.
To run the exe in debug mode from command line, use devenv with debugexe option.. read more for How To Run .exe In Debug Mode Microsoft Visual Studio.

Eg. > devenv /DebugExe r280test01.exe

After windows debugger starts Hit F10 key to start debugging.
Check out How to use dbx as debugger for fortan debugging here.
Check out Debugging Fortran programs with gdb here
Intel® Debugger (IDB) Manual

Number of View :1261

How To Run .exe In Debug Mode Microsoft Visual Studio 2008

How to run .exe in debug mode microsoft visual studio 2008?
Here are few solutions I got for Running .exe in debug mode using the Windows debugger.

Using Devenv

Devenv allows you to set various options for the integrated development environment (IDE);

/DebugExe

Loads a Visual C++ executable under the control of the debugger. This switch is not available for Visual Basic or Visual C# executable.

Example : if your win32 binary executable name is test.exe then, to run this win32 binary in debug mode use this command on windows command prompt.

C:\tmp>devenv /DebugExe test.exe

Your default debugger will start and loads this binary for debug mode. Then just hit F10 Key to go to main function. For Now on your debugging starts, ie to step into function use F11 key, you can put breakpoints and all debugging stuff.
I assume that you have compiled the binary test.exe with debug flag enabled, else debugger will not find the debug symbols and will not load the code.

Using Image File Execution Options

To setup an application to launch the debugger automatically.
How to: Launch the Debugger Automatically
the Image File Execution Options folder, locate the name of the application you want to debug, such as myapp.exe. If you cannot find the application you want to debug:

  1. right-click the Image File Execution Options folder, and on the shortcut menu, click New Key.
  2. Right-click the new key, and on the shortcut menu, click Rename.
  3. Edit the key name to the name of your application; myapp.exe, in this example.

read more
How to open a file, and go to a line number
devenv /edit E:\code.cpp /command “edit.goto 45″

In this example, devenv will open the code.cpp file, and go to line 45.

Number of View :1239

How To Resolve Error __curr_eh_stack_entry and __eh_curr_region With pgcpp C++ Compiler

Was getting Error __curr_eh_stack_entry and __eh_curr_region With pgcpp C++ Compiler.
check out complete man pgcpp - The Portland Group Inc. C++ compiler

Building an application software using pgcc compiler, developed by C++ Language generates two external references of symbols [__curr_eh_stack_entry] and [__eh_curr_region], and results in kink error. Why?

How To Resolve Error __curr_eh_stack_entry and __eh_curr_region With pgcpp C++ Compiler?

Answer:
Compiler automatically generates these symbols when -exception (C++ exception handling) and -rtti=on (Runtime type information) options are used. If these option is not required to use, Please do not enable them.
source

-rtti(default) –no_rtti An pgcc compiler option switch.
Enable (disable) support for RTTI (runtime type Information) features: dynamic_cast, typeid.

Number of View :471

How To _access Function For Long File Names As Path In Winddows Programming Use UNC

I use the function _access to check for file/directory existence in my program,
Problem definition: I have noticed that the function can’t deal with long file names.  I wanted to check if file is available or not at path located “C:\Documents and Settings\0001″, did Google search on how to give long file names in windows..

How To _access Function For Long File Names As Path In Winddows Programming make Use of UNC standards

Solution use the UNC(Universal Naming Convention) conventions for path to be specified while working with windows programs.

ie the path should be “C:\\Documents and Settings\\0001″

Now The next problem is wanted to use period ie . in file name path,

Eg. I need to use the path as “C:\\Documents and Settings\\.test\\0001″
So tried with something like “\\.\” But The “\\.\” prefix will access the Win32 device namespace instead of the Win32 file namespace.

Then how to Turns off automatic expansion of the path string? Use  the “\\?\” prefix also allows the use of “..” and “.” in the path names. To specify an extended-length path, use the “\\?\” prefix. For example, “\\?\D:\<very long path>”.  Read more about Naming Files, Paths, and Namespaces

That did not help much, and tried directly with “C:\\Documents and Settings\\.test\\0001″ It works.
you can also try the PathFileExists function

access function Return Value

Each function returns 0 if the file has the given mode. The function returns –1 if the named file does not exist or is not accessible in the given mode;

Do share your questions and views..

Number of View :474

Fork Implementation In Windows Operating System Vfork Implement in Win32

With little understanding of fork basics here are few more findings on how to vfork implementation in windows operating system and
fork implementation on win32
AT&T Labs Research - Software Tools pick out UWIN: Unix on Windows 95 and NT Machines
Major difference in Linux/Unix functionality and WIN32 applications
Process control and management:
Fork implementation
processes can be created using the fork(2) function, in win32 includes a spawn family of functions that combines the functionality of fork/exec for efficiency.
File descriptor
Open files, pipes, sockets, fifos, and character and block special devices files have file descriptors associated with them. In windows it is called handle.
signals
Most of the unix/linux signals are absent in windows, like SIGALRM
SIGCHLD
SIGHUP
SIGINT
SIGKILL
SIGPIPE
SIGQUIT
SIGUSR1
SIGUSR2
these can be implemented using replacement methods like SIGALRM Time-out alarm can be implemented using SetTimer – WM_TIMER – CreateWaitableTimer
SIGCHLD Change in status of child can be implemented using WaitForSingleObject
Terminal interface for consoles, sockets, and serial lines

sockets based on WINSOCK:

File control locking:

Memory mapping and shared memory
mmap()

System V IPC
semaphore; Shmget can be implemented using CreateFileMaping or
OpenFileMapping
shmdt can be implemented using UnmapViewOfFile
shmat can be implemented using MapViewOfFile
Pipe to _pipe
Close to _close

Runtime linking of dynamically linked libraries : like The dlopen(), dlsym() interface
Error mapping from Windows to UNIX

Symbolic links
Symbolic links to files and directories can be created and can be implemented as Windows shortcuts.

Few Good References for Unix2Win porting

  1. Porting Socket Applications to Winsock
  2. Process and Thread Functions
  3. Winsock Programmer’s FAQ Articles: BSD Sockets Compatibility
  4. LibGW32C for GNU C library for Windows
  5. Unix to Windows Porting Dictionary for HPC
  6. UNIX Application Migration Guide
Number of View :751

Cross Compiling Python 2.6.2 For ARM Cross Compiling Python for Embedded Linux

Tried to Cross Compile Python 2.6.2 For my ARM board, got success to successfully port python on ARM board, On ARM board Embedded Linux is already ported and running fine.

http://www.python.org/images/python-logo.gif ==>>  http://www.arm.com/images/site/arm_logo.gif

Here are simple steps to Cross compile python for ARM target board.

1) setup ARM tool chain with X11
2) export PKG_CONFIG_PATH

install dependencies
====================

Dependencies taken from DEBIAN
——————————
1) libdb
copy

2) libsqlite3
copy and change prefix in sqlite3.pc

3) ncursesw
copy

Dependencies installed from source
———————————–
1) bzip2
edit Makefile

CC=arm-linux-gcc
AR=arm-linux-ar
RANLIB=arm-linux-ranlib
PREFIX=your_toolchain_prefix_path

make
make install

2) gdbm
./configure –host=arm-linux –target=arm-linux –prefix=/xxx/yyy –enable-shared
make
make install
3) tcl-8.4.19
cd to unix folder

export ac_cv_func_strtod=yes
export tcl_cv_strtod_buggy=1

CC=arm-linux-gcc ./configure –host=arm-linux –prefix=/xxx/yyy

make
make install DESTDIR=/xxx/yyy

Note: dont install in prefix otherwise tk is not compiling.

4) tk-8.4.19

./configure –host=arm-linux CC=arm-linux-gcc
–prefix=/xxx/yyy –with-tcl=<path to unix folder in source of tcl>

make

make install

Note: you may have to move X11R6 from toolchain to /usr because its looking  in /usr for the X11 libs. if you do so remember to take backup of your /usr/X11R6 and then restore when you are done cross compiling python. Later find out why Makefiles are looking for X11R6 in /usr and change the path in those Makefiles..

5) readline-6.1
./configure
make
make install

6) openssl-0.9.8
There is no need to type configure, a Makefile is already existing. We just need to edit it and change it with way:

INSTALLTOP=/opt/external_packages/openssl/0.9.8g/compiled/xxx-yyy-linux-gnu
OPENSSLDIR=/opt/external_packages/openssl/0.9.8g/compiled/xxx-yyy-linux-gnu

CC= xxx-yyy-linux-gnu-gcc
AR=xxx-yyy-linux-gnu-ar $(ARFLAGS) r
RANLIB= xxx-yyy-linux-gnu-ranlib
To compile and install the OpenSSL project, type successively make and make install. You should find the directories and files listed above under /opt/external_packages/openssl/0.9.8g/compiled/xxx-yyy-linux-gnu/.

change pkg-config files

Patching Python-2.6.2 before crosscompile
—————————————–
1) ./configure
2) make python Parser/pgen
3) mv python hostpython
4) mv Parser/pgen Parser/hostpgen
5) make distclean

6) apply the patch Python-2.6.2-xcompile.patch
patch -p1 < Python-2.6.2-xcompile.patch

7) In Modules/Setup.config and setup.py according to
Setup.config and setup.py (TODO: make patches for setup.py and Setup.config).
8) edit Modules/getaddrinfo.c and change “u_” to “unsigned ”

Compiling Python-2.6.2
———————-
CC=arm-linux-gcc CXX=arm-linux-g++ AR=arm-linux-ar RANLIB=arm-linux-ranlib ./configure –host=arm-linux –build=i686-pc-linux-gnu –prefix=/xxx/yyy
make HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen BLDSHARED=”arm-linux-gcc -shared” CROSS_COMPILE=arm-linux- CROSS_COMPILE_TARGET=yes
make  install HOSTPYTHON=./hostpython BLDSHARED=”arm-linux-gcc -shared” CROSS_COMPILE=arm-linux- CROSS_COMPILE_TARGET=yes prefix=~/Python-3.1.2

Dependencies – Setup.config and setup.py are configuration files are required to be modify for ARM board.

Downloads required for Cross Compiling Python for Embedded Linux

  1. Setup.config
  2. setup.py

Note -Rename python_setup_file to setup.py
Links -  Download Python

python corss compile patch used.

Number of View :1470

Ifort -extend-source Option Errors & Fortran Fixed Formatting Use nofree

Problem Definition
Working on FORTRAN source code migrations from Solaris operating system to windows XP.  Fortran being most portable code so most of the time we do not see any problems while porting fortran code, but there is always problem with columns length exceeds to default value and while compilations we forgot to take care of option extend-source.

Intel® Fortran compiler(ifort) – Option -extend-source

       -extend-source [size]
	      Specifies the column number to use to end the  statement	field
	      in  fixed-form source files. [size] can be 72, 80, or 132.  The
	      default behavior is -noextend-source, which implies column  72.
	      If  you  do  not	specify	 size,	it  is the same as specifying
	      -extend-source 132.

source ifort help or man ifort

Solution
The Makefile has a compiler flag called /extend_source:132, which basically extends the number of columns the Fortran compiler looks at. The default value is 72. /extend_source extends the number of columns that the compiler looks at to 132.

Fortran generally uses something called as Fixed Formatting - which takes 72 valid columns, ignores the rest and also considers tabs and spaces as comments inside a statement field.
/nofree tells the compiler that fixed formatting needs to be used. Most of the time code follows fixed formatting.

TO remove all compiler errors which pertain to syntax errors at Format statement just add some variable in your makefile, like
COLEXTEND=/extend_source:132

And when facing problem while compiling any fortran module in Windows just compile with COLEXTEND= /nofree.

example of make command, assuming windows makefile name as win.make

on command prompt type : nmake /f win.make COLEXTEND=/nofree

Good luck and do comment your experiences as well.

Related problem regarding

-extend-source option

Number of View :894

How To Capture X Protocol Traffic Using Wireshark On Windows XP?

This is an experiment about use wireshark to capture X protocol traffic

Google and the wireshark manual/wiki give no hints (ie. How do you capture DISPLAY=:0.0 traffic ?). Setting wireshark to capture “local” (127.0.0.1) or “any” devices captured nothing. The remote X11
server
doesn’t support XRandR so it’s no help.

If you set DISPLAY=localhost:0 then the client will use TCP on the
loopback interface and wireshark can capture that. Of course your X
server can’t be running with “-nolisten tcp”, which is default in many
installations. thanks to Xcb thread discussion

Challenges
I want to capture localhost traffic on Windows Xp machine with Wireshark, and it fails.
Did google on it about Is there a way to get wireshark to capture packets sent from/to localhost on Windows?
Got this info from WIKI Loopback capture setup
Which says I need to install Loopback adapter and steps here for Microsoft: How to install the Microsoft Loopback adapter in Windows XP

This method did not help much expect able to capture only ARP packets,

Capturing local traffic on Windows XP Route method
> route add 155.132.130.129 mask 255.255.255.255 155.132.130.1 metric 1
where 155.132.130.129 is your local IP, and 155.132.130.1 that of your default gateway. You must have “Advanced TCP/IP Settings > Automatic metric” disabled! What it does is basically force each packet intended for localhost to go out to the default gateway first, from which it will come back again. Of course this means you see each packet twice.

===Not directly, but if you are on a network with a gateway, you can use the
command-line ROUTE command to redirect the packets through the gateway, which will bounce the packets back at your machine so Ethereal/Wireshark can capture them.  You can use comview tool. It can fullfil your wish. Wireshark does not use IM driver but it uses protocol driver.

Still digging on How To Capture X Protocol Traffic Using Wireshark On Windows XP?

Number of View :317

Parse error: wp-content/themes/grid_focus/functions.php on line 6

Parse error: wp-content/themes/grid_focus/functions.php on line 6:

Wooo , this error I got, when i tried to add play with functions.php file,
I am using gridfocus-wordpress template,
Reason Why I was playing with this function is, I did not see any adds when the visitor comes on the pages with under pages TAGS
Eg, when visitor comes on this page,

from google.co.in on “Posts tagged “tancet2010-rank-list” – Mahol Dot Org

I am unable to show the Adds, but it is not problem with visitor comes from google.co.in on “www.unipune.ac.in | Pune Board | MKCL Results Pune

I could not able to locate the place, so thought of playing with functions.php file
I have just added the new line in this function and boom..
Parse error: wp-content/themes/grid_focus/functions.php on line 6
Nothing is coming up, unable to save the templates as well..
Solution:
Login to FTP, download the grid focus template. , and upload the file functions.php in /wp-content/themes/grid_focus.

This saved me, since I did not have taken backup of my blog and just doing changes.

Thanks god I am back. Enjoy

Number of View :264
Content Protected Using Blog Protector By: PcDrome.

Mahol Dot Org is Digg proof thanks to caching by WP Super Cache