Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] Handling output of processes
From: Allen Barnett (allen_at_[hidden])
Date: 2009-01-23 07:29:44


On Thu, 2009-01-22 at 06:33 -0700, Ralph Castain wrote:
> If you need to do this with a prior release....well, I'm afraid it
> won't work. :-)

As a quick hack for 1.2.x, I sometimes use this script to wrap my
executable:
---------------------------------------------------------------
#!/bin/sh
# sompi.sh: Send each rank's output to a separate file.
# Note use of undocumented OMPI 1.2.x environment variables!
exec "$*" > "listing.$OMPI_MCA_ns_nds_num_procs.$OMP_MCA_ns_nds_vpid"
---------------------------------------------------------------

Then do:

$ mpirun -np 3 ~allen/bin/sompi.sh parallel_program

As the processes run, you can "tail" the individual listing files to see
what's happening. Of course, the working directory has to be writable
and you have to find the machine and directory where the output is being
redirected to, and so on...

Allen

> On Jan 22, 2009, at 1:58 AM, jody wrote:
>
> > Hi
> > I have a small cluster consisting of 9 computers (8x2 CPUs, 1x4 CPUs).
> > I would like to be able to observe the output of the processes
> > separately during an mpirun.
> >
> > What i currently do is to apply the mpirun to a shell script which
> > opens a xterm for each process,
> > which then starts the actual application.
> >
> > This works, but is a bit complicated, e.g. finding the window you're
> > interested in among 19 others.
> >
> > So i was wondering is there a possibility to capture the processes'
> > outputs separately, so
> > i can make an application in which i can switch between the different
> > processor outputs?
> > I could imagine that could be done by wrapper applications which
> > redirect the output over a TCP
> > socket to a server application.
> >
> > But perhaps there is an easier way, or something like this alread
> > does exist?
> >
> > Thank You
> > Jody
> > _______________________________________________
> > users mailing list
> > users_at_[hidden]
> > http://www.open-mpi.org/mailman/listinfo.cgi/users
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>

-- 
Allen Barnett
E-Mail: allen_at_[hidden]
Skype:  allenbarnett
Ph:     518-887-2930