5.3.2.0.6 The array_of_errcodes argument

The array_of_errcodes is an array of length maxprocs in which MPI-/ reports the status of each process that MPI-/ was requested to start. If all maxprocs processes were spawned, array_of_errcodes is filled in with the value MPI_SUCCESS. If only $m$ ( $0 \leq m < \penalty10000\hskip 0pt plus 8em\penalty4800\hskip 0pt plus-8em\penalty10000 {\sf maxprocs}$) processes are spawned, $m$ of the entries will contain MPI_SUCCESS and the rest will contain an implementation-specific error code indicating the reason MPI-/ could not start the process. MPI-/ does not specify which entries correspond to failed processes. An implementation may, for instance, fill in error codes in one-to-one correspondence with a detailed specification in the info argument. These error codes all belong to the error class MPI_ERR_SPAWN if there was no error in the argument list. In C or Fortran, an application may pass MPI_ERRCODES_IGNORE if it is not interested in the error codes. In C++ this constant does not exist, and the array_of_errcodes argument may be omitted from the argument list.

Advice to implementors. MPI_ERRCODES_IGNORE in Fortran is a special type of constant, like MPI_BOTTOM. See the discussion in Section 2.5.4 on page [*].(End of advice to implementors.)



MPI_COMM_GET_PARENT(parent)

OUT
parent the parent communicator (handle)

int MPI_Comm_get_parent(MPI_Comm *parent)



MPI_COMM_GET_PARENT(PARENT, IERROR) INTEGER PARENT, IERROR



int MPI::Comm::Get_parent()



static MPI::Intercomm

If a process was started with MPI_COMM_SPAWN or MPI_COMM_SPAWN_MULTIPLE, MPI_COMM_GET_PARENT returns the ``parent'' intercommunicator of the current process. This parent intercommunicator is created implicitly inside of MPI_INIT and is the same intercommunicator returned by SPAWN in the parents.

If the process was not spawned, MPI_COMM_GET_PARENT returns MPI_COMM_NULL.

After the parent communicator is freed or disconnected, MPI_COMM_GET_PARENT returns MPI_COMM_NULL.

Advice to users. MPI_COMM_GET_PARENT returns a handle to a single intercommunicator. Calling MPI_COMM_GET_PARENT a second time returns a handle to the same intercommunicator. Freeing the handle with MPI_COMM_DISCONNECT or MPI_COMM_FREE will cause other references to the intercommunicator to become invalid (dangling). Note that calling MPI_COMM_FREE on the parent communicator is not useful. (End of advice to users.)

Rationale. The desire of the Forum was to create a constant MPI_COMM_PARENT similar to MPI_COMM_WORLD. Unfortunately such a constant cannot be used (syntactically) as an argument to MPI_COMM_DISCONNECT, which is explicitly allowed. (End of rationale.)

MPI-Standard for MARMOT