On May 31, 2005, at 6:54 AM, Michael Lees wrote:
> Apologies if this is answered in the manual or FAQ - I have looked and
> can't seem to find it if it is.
>
> I understand you do the following with mpiexec.
> shell$ mpiexec c0 manager : C worker
> Which will start one copy of manager on c0 and one copy of worker on
> all other processors.
Slight correction -- it'll start worker on *all* processors (including
c0).
> Or you can use an equivalent application schema...
> c0 manager
> C worker
> In a single processor network is this equivalent to,
> n0 manager
> N worker
Correct.
> What I would like to be able to do is, with two nodes, start one copy
> of manager on c0 and n copies of worker of c1. Is this possible? Also
> is there anyway to specify the application schema in terms of ranks,
> ie., c0 contains rank 0 and c1 contains ranks 1--n
Yes, there is a way to do this.
LAM actually distinguishes between *where* to run and *how many*
processes to run, although specifying one without the other is the most
common form, and implies a corresponding value.
The *where* question is answered with things like C, N, cX, and nX.
The *how many* is answered with options like -np. For example:
- "C" says "where", but it implies to run 1 process per CPU (for
however many CPUs you have)
- "N" says "where", but it implies to run 1 process per node (for
however many nodes you have)
- "n0-3" says "where", and implies to run 4 processes.
- "-np 5" says "how many", but it implies to run 1 process per CPU
If you specify *both*, then nothing is implied, and you control
everything. For example, with your scenario above, you want to do:
mpiexec c0 master : n1 -np 4 worker
Which will start up the master on c0 and then start up 4 copies of
"worker" on n1. You can get fancier, too, such as:
mpiexec c0 master : c1-7 -np 14 worker
...and so on.
--
{+} Jeff Squyres
{+} jsquyres_at_[hidden]
{+} http://www.lam-mpi.org/
|