Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] Debugging OpenMPI calls
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2009-09-28 11:40:20


You might want to just configure Open MPI with:

   ./configure CFLAGS=-g3 ...

That will pass "-g3" to every Makefile in Open MPI.

FWIW: I do variants on this technique and gdb is always able to jump
to the right source location if I "break MPI_Barrier" (for example).
We actually have a "--enable-debug" option to OMPI's configure, but it
does turn on a bunch of other debugging code that will definitely
result in performance degradation at run-time (one of its side effects
is to add "-g" to every Makefile).

On Sep 28, 2009, at 5:57 AM, Aniruddha Marathe wrote:

> Hello,
>
> I am new to OpenMPI library and I am trying to step through common MPI
> communication calls using gdb. I attach gdb to one of the processes
> (using the steps mentioned on the OpenMPI Debugging FAQ page) and set
> a breakpoint on 'MPI_Barrier' and expect gdb to jump into the
> definition of MPI_Barrier function.
>
> I've manually added -g3 compilation flag to the Makefiles in some of
> the directories that I thought relevant ({ROOT}/ompi/mpi/c etc). I
> also specified the source file paths in gdb using the 'dir' command.
> However, gdb is unable to jump into the appropriate source location
> when it hits the breakpoint.
>
> Could anyone please let me know if I am missing something here?
>
> Thanks for looking into my post.
>
> Regards,
> Aniruddha
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>

-- 
Jeff Squyres
jsquyres_at_[hidden]