Open MPI logo

Open MPI User's Mailing List Archives

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

From: Andrew J Caird (acaird_at_[hidden])
Date: 2006-07-05 21:16:17


This took a long time for me to get to, but once I did, what I found was
that the closest thing to working for the PGI compilers with OpenMPI is
this command:
   mpirun --debugger "pgdbg @mpirun@ @mpirun_args@" --debug -np 2 ./cpi

It appears to work, that is, you can select a process with the "proc"
command in pgdbg and set break points and all, but pgdbg prints a lot of
error messages that are all the same:
    db_set_code_brk : DiBreakpointSet fails
which is sort of annoying, but didn't impede my debugging of my 100-line
MPI test program.

I posted this to the PGI Debugger Forum:
   http://www.pgroup.com/userforum/viewtopic.php?p=1969
and got a response saying (hopefully Mat doesn't mind me quoting him)::

> Hi Andy,
> Actually I'm pleasantly surprised that PGDBG works at all with OpenMPI
> since PGDBG currently only supports MPICH. While we're planning on
> adding OpenMPI and MPICH-2 support later this year, in the immediate
> future, there isn't a work around this problem, other than to use
> MPICH.
> Thanks,
> Mat

So I guess the short answer is that is might sort of work if you really
need it, otherwise it's best to wait a little while.

--andy

On Fri, 16 Jun 2006, Jeff Squyres (jsquyres) wrote:

> I'm afraid that I'm not familiar with the PG debugger, so I don't know
> how it is supposed to be launched.
>
> The intent with --debugger / --debug is that you could do a single
> invocation of some command and it launches both the parallel debugger
> and tells that debugger to launch your parallel MPI process (assumedly
> allowing the parallel debugger to attach to your parallel MPI process).
> This is what fx2 and Totalview allow, for example.
>
> As such, the "--debug" option is simply syntactic sugar for invoking
> another [perhaps non-obvious] command. We figured it was simpler for
> users to add "--debug" to the already-familiar mpirun command line than
> to learn a new syntax for invoking a debugger (although both would
> certainly work equally well).
>
> As such, when OMPI's mpirun sees "--debug", it ends up exec'ing
> something else -- the parallel debugger command. In the example that I
> gave in http://www.open-mpi.org/community/lists/users/2005/11/0370.php,
> mpirun looked for two things in your path: totalview and fx2.
>
> For example, if you did this:
>
> mpirun --debug -np 4 a.out
>
> If it found totalview, it would end up exec'ing:
>
> totalview @mpirun@ -a @mpirun_args@
> which would get substituted to
> totalview mpirun -a -np 4 a.out
>
> (note the additional "-a") Which is the totalview command line syntax to
> launch their debugger and tell it to launch your parallel process. If
> totalview is not found in your path, it'll look for fx2. If fx2 is
> found, it'll invoke:
>
> fx2 @mpirun@ -a @mpirun_args@
> which would get substitued to
> fx2 mpirun -a -np 4 a.out
>
> You can see that fx2's syntax was probably influenced by totalview's.
>
> So what you need is the command line that tells pgdbg to do the same
> thing -- launch your app and attach to it. You can then substitute that
> into the "--debugger" option (using the @mpirun@ and @mpirun_args@
> tokens), or set the MCA parameter "orte_base_user_debugger", and then
> use --debug. For example, if the pgdbg syntax is similar to that of
> totalview and fx2, then you could do the following:
>
> mpirun --debugger pgdbg @mpirun@ -a @mpirun_args@ --debug -np 4
> a.out
> or (assuming tcsh)
> shell% setenv OMPI_MCA_orte_base_user_debugger "pgdbg @mpirun@
> -a @mpirun_args@"
> shell% mpirun --debug -np 4 a.out
>
> Make sense?
>
> If you find a fixed format for pgdb, we'd be happy to add it to the
> default value of the orte_base_user_debugger MCA parameter.
>
> Note that OMPI currently only supports the Totalview API for attaching
> to MPI processes -- I don't know if pgdbg requires something else.