MPI_COMM_SPAWN_MULTIPLE(3)MPI_COMM_SPAWN_MULTIPLE(3)NAMEMPI_Comm_spawn_multiple - Starts a number of MPI processes, possibly
using multiple executables, and establishes communication with them,
returning an intercommunicator
SYNOPSIS
C:
#include <mpi.h>
int MPI_Comm_spawn_multiple( count,array_of_commands, array_of_argv,
array_of_maxprocs, array_of_info, root, comm, intercomm,
array_of_errcodes )
int count, array_of_maxprocs[], root, array_of_errcodes[];
char *command[],**array_of_argv[];
MPI_Comm comm,*intercomm;
MPI_Info info[];
Fortran:
INCLUDE "mpif.h" (or USE MPI)
INTEGER count, array_of_info(*), array_of_maxprocs(*), root,
comm, intercomm, array_of_errcodes(*), ierror
CHARACTER*(*) array_of_commands(*), array_of_argv(count,*)
CALL MPI_COMM_SPAWN_MULTIPLE(count, array_of_commands, array_of_argv,
array_of_maxprocs, array_of_info, root, comm, intercomm,
array_of_errcodes, ierror)
DESCRIPTION
The MPI_Comm_spawn_multiple routine is identical to MPI_Comm_spawn except
that there are multiple executable specifications. The first argument,
count, gives the number of specifications. Each of the next four
arguments are simply arrays of the corresponding arguments in
MPI_Comm_spawn. This routine accepts the following parameters:
count Specifies the number of commands (positive integer,
significant to MPI only at root).
array_of_commands
Programs to be executed (array of strings, significant
only at root).
array_of_argv Specifies arguments for commands. MPI_ARGVS_NULL should
be used if no arguments are to be passed to the program
(array of array of strings, significant only at root).
Page 1
MPI_COMM_SPAWN_MULTIPLE(3)MPI_COMM_SPAWN_MULTIPLE(3)
array_of_maxprocs
Specifies the maximum number of processes to start for
each command (array of integers, significant only at
root).
array_of_info Info objects telling the runtime system where and how to
start processes. Currently this value is ignored.
MPI_INFO_NULL should be used if no info argument is
supplied. (array of handles, significant only at root).
root The rank of the process in which previous arguments are
examined (integer).
comm The intracommunicator containg the group of spawning
processes (handle).
intercomm Upon return, the intercommunicator between the original
group and the newly spawned group (handle).
array_of_errcodes
Upon return, reports the status of the spawned program,
one code per process. MPI_ERRCODES_IGNORE should be used
if no argument is provided (array of integers).
ierror Specifies the return code value for successful completion,
which is in MPI_SUCCESS. MPI_SUCCESS is defined in the
mpif.h file (integer).
NOTES
In this implementation, all of the spawned processes have access to
stdout and stderr. However, none of the spawned processes have access
to stdin.
Each of the array of strings in array_of_argv must conform to the syntax
described for the argv argument to MPI_Comm_spawn(3).
In this implementation, a maximum of eight commands can be spawned in a
single call to MPI_Comm_spawn_multiple. Using a value of count exceeding
8 generates an MPI_ERR_ARG message.
Error codes are the values returned by MPI routines (in C) or in the
ierror argument (in Fortran). These can be converted to error classes by
using the MPI_Error_class(3) routine.
SEE ALSOMPI_Comm_spawn(3), MPI_Comm_get_parent(3),MPI_Finalize(3)mpi(1), mpirun(1)
Page 2