MPI_Comm_get_parent function

Returns the parent communicator for this process.

Syntax

int MPIAPI MPI_Comm_get_parent(
  _Out_ MPI_Comm *parent
);

Parameters

  • parent [out]
    The parent communicator.

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_GET_PARENT(PARENT, IERROR)
        INTEGER PARENT, IERROR

Remarks

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 MPI_Comm_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.

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