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-12-03 19:27:33


On Dec 3, 2004, at 5:54 AM, Gabriel Antoine Louis Paillard wrote:

> I would like to know, if we can invoke the MPI_Comm_spawn function,
> just as a root process ?

Not quite sure what you mean here by "just as a root process"...?

The MPI_COMM_SPAWN call is collective over all processes in the
communicator. Hence, every process in the communicator must call
COMM_SPAWN.

If you only want one communicator to call COMM_SPAWN, then you can use
the communicator MPI_COMM_SELF (which, by definition, only includes the
local process) as the argument to MPI_COMM_SPAWN. But then note that
only that one parent process will be able to communicate with the
spawned children.

> And if not, how can we proceed to call
> MPI_Comm_spawn from every rank of a group with differents arguments ?

As per MPI-2 p84, the command, argv, maxprocs, and info arguments to
MPI_COMM_SPAWN are only significant in the root process. The root and
comm arguments must be the same across all processes in the
communicator. The intercomm and array_of_errorcodes arguments will be
filled by MPI upon return from MPI_COMM_SPAWN in all processes in the
communicator.

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