144. Group Accessors

PreviousUpNext
Up: Group Management Next: Group Constructors Previous: Group Management

MPI_GROUP_SIZE(group, size)
IN group group (handle)
OUT size number of processes in the group (integer)

int MPI_Group_size(MPI_Group group, int *size)

MPI_Group_size(group, size, ierror)
TYPE(MPI_Group), INTENT(IN) :: group
INTEGER, INTENT(OUT) :: size
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
MPI_GROUP_SIZE(GROUP, SIZE, IERROR)
INTEGER GROUP, SIZE, IERROR

MPI_GROUP_RANK(group, rank)
IN group group (handle)
OUT rank rank of the calling process in group, or MPI_UNDEFINED if the process is not a member (integer)

int MPI_Group_rank(MPI_Group group, int *rank)

MPI_Group_rank(group, rank, ierror)
TYPE(MPI_Group), INTENT(IN) :: group
INTEGER, INTENT(OUT) :: rank
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
MPI_GROUP_RANK(GROUP, RANK, IERROR)
INTEGER GROUP, RANK, IERROR

MPI_GROUP_TRANSLATE_RANKS(group1, n, ranks1, group2, ranks2)
IN group1group1 (handle)
IN n number of ranks in ranks1 and ranks2 arrays (integer)
IN ranks1array of zero or more valid ranks in group1
IN group2group2 (handle)
OUT ranks2array of corresponding ranks in group2, MPI_UNDEFINED when no correspondence exists.

int MPI_Group_translate_ranks(MPI_Group group1, int n, const int ranks1[], MPI_Group group2, int ranks2[])

MPI_Group_translate_ranks(group1, n, ranks1, group2, ranks2, ierror)
TYPE(MPI_Group), INTENT(IN) :: group1, group2
INTEGER, INTENT(IN) :: n, ranks1(n)
INTEGER, INTENT(OUT) :: ranks2(n)
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
MPI_GROUP_TRANSLATE_RANKS(GROUP1, N, RANKS1, GROUP2, RANKS2, IERROR)
INTEGER GROUP1, N, RANKS1(*), GROUP2, RANKS2(*), IERROR

This function is important for determining the relative numbering of the same processes in two different groups. For instance, if one knows the ranks of certain processes in the group of MPI_COMM_WORLD, one might want to know their ranks in a subset of that group.

MPI_PROC_NULL is a valid rank for input to MPI_GROUP_TRANSLATE_RANKS, which returns MPI_PROC_NULL as the translated rank.

MPI_GROUP_COMPARE(group1, group2, result)
IN group1 first group (handle)
IN group2 second group (handle)
OUT result result (integer)

int MPI_Group_compare(MPI_Group group1,MPI_Group group2, int *result)

MPI_Group_compare(group1, group2, result, ierror)
TYPE(MPI_Group), INTENT(IN) :: group1, group2
INTEGER, INTENT(OUT) :: result
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
MPI_GROUP_COMPARE(GROUP1, GROUP2, RESULT, IERROR)
INTEGER GROUP1, GROUP2, RESULT, IERROR

MPI_IDENT results if the group members and group order is exactly the same in both groups. This happens for instance if group1 and group2 are the same handle. MPI_SIMILAR results if the group members are the same but the order is different. MPI_UNEQUAL results otherwise.


PreviousUpNext
Up: Group Management Next: Group Constructors Previous: Group Management


Return to MPI-3.1 Standard Index
Return to MPI Forum Home Page

(Unofficial) MPI-3.1 of June 4, 2015
HTML Generated on June 4, 2015