Parallel debugging (MPI) - Part 1
Ahem, ahem, searching a needle in a hay stack is easy compared to parallel debugging in MPI, or as a matter parallel debugging. Having overstated the problem in our hands, there are few solutions or workarounds of how to get our hands in the dirty waters and have some fun.
There are two ways (as always) to get our work done, either use free tools or give an arm or leg to buy a fancy debugger.
2. Free debuggers, gdb / valgrind to some extent, Eclipse PTP, etc
(Let us know for any others out there)
Read complete article by the chaps at OpenMPI.
1. gdb
gdb can be used as follows;
mpirun -np <NP> xterm -e gdb ./program |
This the launches xterm windows in which I can do
run <arg1> <arg2> ... <argN> |
Should work the same with ddd (GUI for gdb)
2. valgrind (more at this link)
First of all, you have to make sure that Valgrind 3.2.0 or later is installed, and Open MPI is compiled with Memchecker enabled. Then simply run you application with Valgrind, e.g.:
mpirun -np 2 valgrind ./program |
0 comments:
Post a Comment