Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

From: Brian Barrett (brbarret_at_[hidden])
Date: 2006-07-06 22:37:35

On Jul 6, 2006, at 8:27 PM, Manal Helal wrote:

> I am trying to debug my mpi program, but printf debugging is not doing
> much, and I need something that can show me variable values, and which
> line of execution (and where it is called from), something like gdb
> with
> mpi,
> is there anything like that?

There are a couple of options. The first (works best with ssh, but
can be made to work with most starting mechanisms) is to start a
bunch of gdb sessions in xterms. Something like:

   mpirun -np XX -d xterm -e gdb <your app>

The '-d' option is necessary so that mpirun doesn't close the ssh
sessions, severing its X11 forwarding channel. This has the
advantage of being free, but has the disadvantage of being a major
pain. A better option is to try a real parallel debugger, such as
TotalView or Portland Group's PGDBG. This has the advantage of
working very well (I use TotalView whenever possible), but has the
disadvantage of generally not being free.

Hope this helps,


   Brian Barrett
   Open MPI developer