On Apr 12, 2016, at 2:38 PM, dpchoudh . <dpcho...@gmail.com> wrote: > > Hello all > > I am trying to set a breakpoint during the modex exchange process so I can > see the data being passed for different transport type. I assume that this is > being done in the context of orted since this is part of process launch. > > Here is what I did: (All of this pertains to the master branch and NOT the > 1.10 release) > > 1. Built and installed OpenMPI like this: (on two nodes) > ./configure --enable-debug --enable-debug-symbols --disable-dlopen && make && > sudo make install
FWIW: You don't need to --disable-dlopen for this; using dlopen and plugins is very, very helpful (and a giant time-saver) when you're building/debugging a single BTL plugin, for example (because you can "cd opal/mca/btl/YOUR_BTL; make install" instead of a top-level install). > 2. Compiled a tiny hello-world MPI program, mpitest (on both nodes) > > 3. Since the modex exchange is a macro now, (it used to be a function call > before), I have to put the breakpoint inside a line of code in the macro; I > chose the function mca_base_component_to_string(). I hoped that choosing > --enable-debug-symbols and --disable-dlopen will make this function visible, > but may be I am wrong. Do I need to explicitly add a DLSPEC to lib tools? No, you don't need to add anything to libtool. There's two parts to the modex: 1. each component modex sending their data 2. each component selectively/lazily reading data from peers > 4. I launched gdb like this: > gdb mpirun > set args -np 2 -H bigMPI,smallMPI -mca btl tcp,self ./mpitest > b mca_base_component_to_string > run That looks reasonable, but you are probably breaking in the wrong function. Also, if your mpitest program doesn't do any MPI_Send/MPI_Recv functionality, the modex receive functionality may not be invoked. It might be better to use examples/ring_c.c as your test program. If you upgrade your GDB to the latest version, you should be able to break on a macro. > This told me that the breakpoint is not present in the executable and gdb > will try to load a shared object if needed; I chose 'yes'. > However, the breakpoint never triggers and the program runs to completion and > exits. > > I have two requests: > 1. Please help me understand what I am doing wrong. > 2. Is there a (perhaps a sequence of) switch to 'configure' that will create > the most debuggable image, while throwing all performance optimization out of > the window? This would be a great thing for a developer. --enable-debug should do ya. You might want to enable --enable-mem-debug and --enable-mem-profile, too, but those are supplementary. -- Jeff Squyres jsquy...@cisco.com For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/