[MPICH] Tracing the mpich library with gdb and xtern

Krishna Chaitanya kris.c1986 at gmail.com
Thu Jan 3 05:14:43 CST 2008


Hi Ravi,
            The problem is as simple as this :  When I issue the mpiexec
command with the gdb option, i wish to have xterm launch two debug windows
so that i can trace through sender's and the receiver's codes.
             As of now, xterm is launching two windows, but one on my local
machine and the other on the remote machine and I wish to have both
displayed on the local machine.
>         You have to set the DISPLAY variable to the IPAddress:0.0 on the
remote machine whre you are trying to run the job.
              The IPAddress should be the remote machine's or the local
machine's?

             I anyway tried both.
 At the local machine, i did  "xhost +" and got :
access control disabled, clients can connect from any host

             But, the remote node's debug window is still being launched in
the remote machine and not on the local machine.

Thanks,
Krishna Chaitanya K

On 1/3/08, Ravi Thati <gotothati at gmail.com> wrote:
>
> Hi Chaitanya,
>
>  I have not got the problem clearly.
> But still I am guessing this.
>          You have to set the DISPLAY variable to the IPAddress:0.0 on the
> remote machine whre you are trying to run the job.
>
>  Then , at the local machine
>        if windows, run XManager.
>        if Linux , run the "xhost + " command.
>
>
>
>
>
>
>
>
> On Jan 3, 2008 3:33 PM, Krishna Chaitanya < kris.c1986 at gmail.com> wrote:
>
> > Hi,
> >        Thanks for the help, guess I complicated my question
> > un-necessarily.
> >        I wish to run a program on two machines and  have two  debug
> > windows on my local machine, so that i can trace through the pt2pt code.
> > This must concern xterm and setting the display variable correctly. At this
> > stage, I have the DISPLAY set to 0.0 on both the machines and I am
> > ssh-ing into the remote machine by using the -X switch. The debug window for
> > the remote machine is getting launched at the remote terminal but is not
> > getting displayed on mine. Please let me know what needs to be done to have
> > the window displayed on my machine.
> >
> > Thanks,
> > Krishna Chaitanya K
> >
> >
> >
> >
> > On 1/2/08, Darius Buntinas <buntinas at mcs.anl.gov> wrote:
> > >
> > >
> > > I'm not sure exactly what you want to do, so here are a few ideas.
> > >
> > > If you want to start rank 0 before rank 1, you can change your test
> > > program so it calls mpi_commrank right after mpi_init.  Then set a
> > > breakpoint just after mpi_commrank, and when you hit the breakpoint,
> > > you
> > > can look at the rank and decide which one to continue running.
> > >
> > > If you can't modify the test program, you can set the breakpoint just
> > > after mpi_init, then read MPIDI_Process.my_pg_rank.  You'll have to
> > > configure MPICH2 with --enable-g=dbg to get debugging symbols added
> > > (you
> > > might also want to configure with --disable-compiler-optimizations to
> > > remove the -O2 flag and make it easier to step through the code).
> > >
> > > If you really need to know the rank of a process before mpi_init is
> > > called, you can read the PMI_RANK environment variable.  Note that
> > > mpi_init performs an implicit barrier, so if one process calls
> > > mpi_init,
> > > it won't exit until all other processes have called mpi_init, so even
> > > if
> > > you start one process before the others, it won't get past mpi_init.
> > >
> > > Hope that helps,
> > > -d
> > >
> > > On 12/31/2007 04:07 AM, Krishna Chaitanya wrote:
> > > > Hi,
> > > >                I have been tracing the flow of the mpich code by
> > > > executing a simple program having MPI_Send() and MPI_Recv(),on one
> > > > machine.  I have been using gdb along with xtern to have two windows
> > > > open at the same time as I step through the code. I wish to get a
> > > better
> > > > glimpse of the working of the point to point calls, by launching the
> > > job
> > > > on two machines and by tracing the flow in a similar manner. Could
> > > you
> > > > please tell me how I can go about it? I have a feeling that this can
> > > be
> > > > done by hard-coding the macros and telling the daemons directly that
> > > one
> > > > machine is rank1 and the other is rank2. That way, i can start rank1
> > > > process first and the rank2 process a little later and trace through
> > > the
> > > > code.
> > > >
> > > > Thanks,
> > > > Krishna Chaitanya,
> > > > Dept of Information Technology,
> > > > National Institute of Technology, Karnataka ( NITK )
> > > > India
> > > >
> > > > --
> > > > In the middle of difficulty, lies opportunity
> > >
> >
> >
> >
> > --
> > In the middle of difficulty, lies opportunity
>
>
>
>
> --
> Ravi.T
> Oom asathoma sadgamaya (Lead me from darkeness to light)
> Thamasoma jyothirgamaya ( From ignorance to truth)
> Mruthyorma amrutham gamaya (From death to eternity)
> Oom shanti shanti shantihi ( Let peace prevail everywhere)




-- 
In the middle of difficulty, lies opportunity
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20080103/e31acfd8/attachment.htm>


More information about the mpich-discuss mailing list