Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

debugging in MPI linux

diedro
Beginner
1,672 Views

Dear all,

I work in intel fortran linux environment so I usually debug with simple write(*,*) and PAUSE in my code.

I have seen that this way is not possible with MPI. When I try to insert a PAUSE in may code I get:

PAUSE prompt> To continue from background, execute 'kill -15 5620'
To continue from background, execute 'kill -15 5621'

Do yuo know another and a better way to debug in MPI in linux?

Thanks a lot

0 Kudos
3 Replies
Kenneth_C_Intel
Employee
1,672 Views

If you are using Intel MPI you can use GDB

-gdb

Use this option to run <executable> under the GNU* debugger. For example:

$ mpiexe.hydra -gdb -n <# of processes> <executable>

 

Regards,

Kenneth

Intel Developer Support

 

0 Kudos
diedro
Beginner
1,672 Views

Dear K.,

I am running openMPI with Intel.

I am not able to recognize the -gdb command.

do i have to use it when i compile or when i run the program?

Thanks a lot

0 Kudos
TimP
Honored Contributor III
1,672 Views

Note that OpenMPI has an excellent FAQ on debugging:

http://www.open-mpi.org/faq/?category=debugging

You must include -g in the mpifort options if you want to step into your application and view source code.  You should prefer the gdb which comes with current versions of ifort.

Intel Forums can't take the place of the application specific FAQs and forums, which are excellent in the case of openmpi.

0 Kudos
Reply