Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ptp-dev] How debugger works?

Hi,
I have a question about the procedure of debugger starting. From the source code, it seems like this:

1. spawn an openmpi job myApp, but not run, return its jobid: jobid0.

2. launch another openmpi job sdm, which run gdb as following: ( 2 for example)
gdb -q -tty /dev/null -i mi myApp
gdb -q -tty /dev/null -i mi myApp

3. set some variables inside gdb, pass jobid0 to gdb
-gdb-set environment OMPI_MCA_ns_nds_jobid=5
-gdb-set environment OMPI_MCA_ns_nds_vpid=1
-gdb-set environment OMPI_MCA_ns_nds_num_procs=2

I hope i didn't miss something. 
The two myApps started in above way are two seperate applications, right? Can these two myApps work as one paralle application? Why need jobid0? When to use OMPI_MCA_ns_nds_jobid, OMPI_MCA_ns_nds_vpid? Can you explain how this procedure can debug a parallel application rightly?

It seems myApp can't have any input or output, right?

Openmpi faq gives an example of using gdb to debug openmpi program by attaching gdb to existing parallel processes. But I am not sure about the way ptp use. Is there any relevant openmpi doc?

Thank you in advance.

Andy



Back to the top