Edit

Share via


MPI_Comm_spawn_multiple function

Spawns multiple binaries or the same binary with multiple sets of arguments, establishing communication with them and placing them in the same MPI_COMM_WORLD.

Syntax

int MPIAPI MPI_Comm_spawn_multiple(
            int                        count,
            _In_count_(count) char     *array_of_commands[],
            _In_opt_count_(count) char **array_of_argv[],
            _In_count_(count) int      array_of_maxprocs[],
            _In_count_(count) MPI_Info array_of_info[],
            int                        root,
            MPI_Comm                   comm,
  _Out_     MPI_Comm                   *intercomm,
  _Out_opt_ int                        array_of_errcodes[]
);

Parameters

  • count
    Number of commands.

  • array_of_commands
    Programs to be executed.

  • array_of_argv
    Arguments for commands.

  • array_of_maxprocs
    Maximum number of processes to start for each command.

  • array_of_info
    Info objects telling the runtime system where and how to start 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 newly spawned group.

  • array_of_errcodes [out, optional]
    One error 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_MULTIPLE(COUNT, ARRAY_OF_COMMANDS, ARRAY_OF_ARGV,
                ARRAY_OF_MAXPROCS, ARRAY_OF_INFO, ROOT, COMM, INTERCOMM,
                ARRAY_OF_ERRCODES, IERROR)
        INTEGER COUNT, ARRAY_OF_INFO(*), ARRAY_OF_MAXPROCS(*), ROOT, COMM,
        INTERCOMM, ARRAY_OF_ERRCODES(*), IERROR
        CHARACTER*(*) ARRAY_OF_COMMANDS(*), ARRAY_OF_ARGV(COUNT, *)

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