Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2005-09-28 13:40:42

On Sep 28, 2005, at 2:29 PM, Greg Watson wrote:

> Can someone tell me how to run multiple processes on a node?
> I tried 'mpirun -np 4 --map n0-1 ./x' but it didn't work - just run
> on all 4 nodes.

I have to admit that I don't know how it works for bproc, but if you
give a hostfile, we obey the "slots" keyword for each host (there's a
few synonyms for this as well). For example:

host1 slots=2
host2 slots=4

When you mpirun, the default allocation scheme is to allocate "by slot"
meaning that MCW ranks 0 and 1 will be on host1, and 2-5 will be on
host2. So you can:

        mpirun -np 6 --hostfile hostfile ./x

and it should do the Right ordering for you. If you don't want this,
you can change the default mapping to be "by node", so it will allocate
one process per node until all slots are taken. For example:

        mpirun -np 2 --hostfile hostfile ./x

will put MCW rank 0 on host1 and MCW rank 1 on host2.

Unfortunately, the --map stuff is not yet implemented -- it looks
doubtful that this will make it into 1.0. :-\ Eventually, we plan to
fully support the "C" and "N" notation from LAM/MPI.

> Also, I get this output from the command 'mpirun -np 4 --map n0 ./x':

Yow -- that's a neat one! Where the heck did "3" come from? :-)

Thanks -- I'll look into this.

{+} Jeff Squyres
{+} The Open MPI Project