[mpich-discuss] Running mpiexec/mpd only locally, possible?

Ralph Butler rbutler at mtsu.edu
Thu Oct 30 09:23:45 CDT 2008


There are really 3 issues here.

(1)  When you say this:

> (host1) mpd --listenport=1234 --daemon
> (host1) mpd --host=host1 --port=1234 --daemon
> (host1) mpiexec -n 2 ./myjob
> (host1) mpdallexit

you are really trying to start 2 mpds on host1 and attempting to use  
them
for a single job.  The second mpd should fail because it is on the  
same host
and yet the -n option was not used.  However, it should NOT be  
necessary (or
even useful) to start the second mpd.    The -n option is really only  
for development
and should not be necessary for normal operation.
Just take out the second execution of mpd, and use a single mpd on host1
to start all processes for that one job (./myjob).

(2)  A single mpd can be used to start multiple jobs simultaneously.
For example, start an mpd.  Then, in one window, run:
         mpeixec -n 1 sleep 99
Then, in another window, run the same mpiexec.  Both of them should run
just fine on the same host under the control of the single mpd.

(3)  Itt is possible to run two (or more) mpds on a single host such  
that
different jobs can use the separate mpds simultaneously.  This is  
actually
an undocumented feature.  The key is:  how do you identify which mpd  
to talk
to when running mpiexec.  The magic is an env var named MPD_CON_EXT.

The env var MPD_CON_EXT can be set to some non-null value
before you start an mpd.  This char str then becomes an extension
to be attached to that mpd's unix socket's filename in /tmp.  Any
program that then tries to access that mpd should ALSO have the env var
set to the same value.   This includes mpiexec.  This technique even  
works
fine in conjunction with mpdboot on my cluster, but I do
not run additional software such as PBS, grid engines, etc.

--ralph


On ThuOct 30, at Thu Oct 30 5:59AM, Sebastian Nowozin wrote:

>
> Hello,
>
> I use a cluster system which uses sgetools as scheduler; there is no
> integration with MPI.  Still users are able to run mpich2 by  
> scheduling
> by interactive login and scheduling mpd jobs.
>
> I now want to run a program which needs at least two  MPI processes (0
> and 1) to work.  Normally, the commands
>
> (host1) mpd --listenport=1234 --daemon
> (host*) mpd --host=host1 --port=1234
> (host1) mpiexec -n 100 ./myjob
> (host1) mpdallexit
>
> do the job just fine.  I now want to run a program many times with  
> just
> two processes, like
>
> (host1) mpd --listenport=1234 --daemon
> (host1) mpd --host=host1 --port=1234 --daemon
> (host1) mpiexec -n 2 ./myjob
> (host1) mpdallexit
>
> On many different host1's.  The problem is that as a single user I can
> only run one mpd per host.
>
> Is there some kind of wrapper-script, which can be run like:
>
> (host1) mpiexec_local -n 2 ./myjob
>
> which takes care of setting up a set of mpd's, runs mpiexec and tears
> the mpd's down.  The mpd's should not interfere (nor even know) about
> any other mpd's which might be running on that host.  This might be
> really useful also for simple multicore systems where MPICH2 is used
> instead of threads.
>
> Thanks,
> Sebastian




More information about the mpich-discuss mailing list