MPI_Group_difference function

Creates a new group from the difference between two existing groups.

Syntax

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

Parameters

  • group1
    The first group.

  • group2
    The second group.

  • newgroup [out]
    A pointer to a handle that represents a new group that contains all elements in the first group that are not present in the second group. The function returns MPI_GROUP_EMPTY if the new group is empty.

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_DIFFERENCE(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, on 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