MPI_Group_union function

Creates a new group from the union of two existing groups.

Syntax

int MPIAPI MPI_Group_union(
        MPI_Group group1,
        MPI_Group group2,
  _Out_ MPI_Group *newgroup
);

Parameters

  • group1
    The first group.

  • group2
    The second group.

  • newgroup [out]
    On return, contains a pointer to a new group that represents all elements in either group.

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_GROUP_UNION(GROUP1, GROUP2, NEWGROUP, IERROR)
        INTEGER GROUP1, GROUP2, NEWGROUP, IERROR 

Remarks

This is a local operation. Different processes can define distinct groups. A process can define a group that does not include itself.

The MPI implementation does not provide a mechanism to build a group from scratch, but only from existing groups. The base group, upon which all other groups are defined, can be retrieved by using the MPI_Comm_group function. It is the group that is associated with the initial communicator MPI_COMM_WORLD.

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 Group Functions

MPI_Comm_group