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: 2003-08-06 14:52:59


On Tue, 5 Aug 2003, Valter Toffolo wrote:

> [snipped]
> The problem is when a workstation goes to node mode, and it lamgrows the
> environment. I need a way to know the LAM machine has grown at
> application level. I've tried using MPI_Attr_get to get the universe
> size every once in a while, but as long as the application is running,
> MPI_Attr_get will return the same universe size it returned the first
> time I called MPI_Attr_get, even though lamshrink or lamgrow is run. So

This is a good point -- we fix this number at MPI_INIT time, and never
modify it afterwards. Hmm.

> the first issue is 'how will my application know LAM machine has
> grown?'.

In the present version, you'll have to provide some external data somehow.

There are LAM-specific methods (meaning beneath the MPI layer) that you
could use, but I don't think that I'd advise using them because since
they're not published, we are free to change them at any time.

> As it knows the environment has grown, I will need to spawn another
> process on the new node. I could use MPI_Info_set with
> "lam_spawn_sched_round_robin", set the initial node and run one process
> there. However, I'm looking for a portable way to do it, if there is
> any.

Not really, no. The point of the MPI_Info is to allow MPI implementations
freedom to implement features in their own way.

> Anyway, I will need a mechanism so the application can know which number
> is the new node the environment got, so it can spawn a process there.

My best suggestion at this point would be to either write out a file with
the new size (perhaps as a result of "lamnodes | wc -l", or something like
that), or perhaps connect to the MPI application with
MPI_Comm_accept/connect and pass in the information that way.

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