LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2004-11-18 08:19:24


On Nov 16, 2004, at 2:22 PM, David Cox wrote:

> A while ago I posted a question asking how to start up
> several processes such that LAM would automatically
> wrap around if the number of programs was greater than
> the number of CPUs. Per Jeff's suggestion, I
> currently have a scipt that generates an app schema
> like this:
> c0 program0
> c1 program1
> ...
> cX programX.
>
> However, if I have more programs than CPUs I get the
> following error
> mpirun: cannot start my_program on ?: invalid node
> The same error also occurs with mpiexec c0 prog0 : c1
> prog1 : etc.

Yikes -- I stand corrected! Sorry about that. :-(

(I could have sworn that I implemented this at one point, but upon
further reflection, I'm pretty sure that I was [mistakenly] thinking of
the wraparound factor for MPI_Info in MPI_COMM_SPAWN*)

> Is there another way to do this, or is there a way for
> my script to determine how many CPUs are available and
> do the wrapping on its own? The original post is
> below. Thanks,

You can use the lamnodes command -- it will tell you how many nodes and
CPUs you have. Should be a relatively easy-to-parse format. See
lamnodes -h for all of its options (you can suppress some of the
output, perhaps making it easier to parse).

-- 
{+} Jeff Squyres
{+} jsquyres_at_[hidden]
{+} http://www.lam-mpi.org/