MPI_Comm_spawn function

Spawns up to maxprocs instances of a single MPI application.

Syntax

int MPIAPI MPI_Comm_spawn(
  _In_  char                        *command,
  _In_  char                        *argv[],
        int                         maxprocs,
        MPI_Info                    info,
        int                         root,
        MPI_Comm                    comm,
  _Out_ MPI_Comm                    *intercomm,
        _Out_opt_cap_(maxprocs) int array_of_errcodes[]
);

Parameters

  • command [in]
    Name of program to be spawned.

  • argv [in]
    Arguments to command.

  • maxprocs
    Maximum number of processes to start.

  • info
    A set of key-value pairs telling the runtime system where and how to start the processes.

  • root
    Rank of process in which previous arguments are examined.

  • comm
    Intracommunicator containing group of spawning processes.

  • intercomm [out]
    Intercommunicator between original group and the newly spawned group.

  • array_of_errcodes
    One code per process.

Return value

Returns MPI_SUCCESS on success. Otherwise, the return value is an error code.

In Fortran, the return value is stored in the IERROR parameter.

Fortran

    MPI_COMM_SPAWN(COMMAND, ARGV, MAXPROCS, INFO, ROOT, COMM, INTERCOMM,
                ARRAY_OF_ERRCODES, IERROR)
        CHARACTER*(*) COMMAND, ARGV(*)
        INTEGER INFO, MAXPROCS, ROOT, COMM, INTERCOMM, ARRAY_OF_ERRCODES(*),
        IERROR

Requirements

Product

HPC Pack 2012 MS-MPI Redistributable Package, HPC Pack 2008 R2 MS-MPI Redistributable Package, HPC Pack 2008 MS-MPI Redistributable Package or HPC Pack 2008 Client Utilities

Header

Mpi.h; Mpif.h

Library

Msmpi.lib

DLL

Msmpi.dll

See also

MPI Process Management Functions