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
Débutant
2 073 Visites

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 Compliments
3 Réponses
Kenneth_C_Intel
Employé
2 073 Visites

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 Compliments
diedro
Débutant
2 073 Visites

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 Compliments
TimP
Contributeur émérite III
2 073 Visites

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 Compliments
Répondre