Skip to main content

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

Dear Greg,

Thank you for your time and detailed reply.

I seems to get understand but still not sure.

It's the mechanism of launching an Openmpi job: first allocate resource for it, then launch some processes.
Independent processes can connect to each other to become an Openmpi parallel application by reading 3 variables OMPI_MCA_ns_nds_jobid, OMPI_MCA_ns_nds_vpid and OMPI_MCA_ns_nds_num_procs. It's just the inside mechanism of Openmpi. Am I right? If yes, is it a hard work to find this?

It's a great design of your debugger, I hope you are happy in handling MPICH2!

I am really busy before July.  I can try it after these hard days if you still need.

Very best regards,
Andy

2008/3/20, Greg Watson <g.watson@xxxxxxxxxxxx>:
Andy,

Sorry for the delay in replying.

You are correct about how the debugger is started for Open MPI. For a
debug job, the proxy requests a node allocation for the application
(but does not launch it), then it launches the debugger. The debugger
starts a gdb session on each node, which in turn loads and starts the
application executable. The Open MPI connection information (job ID,
etc.) is passed to the application via the environment variables. I'm
looking at providing a similar mechanism for MPICH2 applications.

The debugger and the application being debugged are both MPI
applications, but they have to be separate so the gdb can be attached
to the application and then be controlled from the debugger.

Currently, output from the application is directed to /dev/null when
it is being debugged. Feiyi Wang from ORNL provided a pseudo terminal
patch (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=205862) but
unfortunately I have not had time to add support to the debugger,
since the output also needs to be routed back to the proxy so that it
could be displayed in the Eclipse console. If this is something you
would be interested in working on, please let me know!

There is some debugger documentation here: http://wiki.eclipse.org/PTP/designs/2.x
  but unfortunately it's a bit limited. Please feel free to ask
questions if there is anything else you need to know.

Regards,

Greg



On Mar 17, 2008, at 4:56 AM, Zhao Haixiang wrote:

> 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
>
>

> _______________________________________________
> ptp-dev mailing list
> ptp-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ptp-dev

_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev


Back to the top