5.3.1. Group Accessors


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)
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)
INTEGER GROUP, RANK, IERROR

MPI_GROUP_TRANSLATE_RANKS (group1, n, ranks1, group2, ranks2)
[ IN group1] group1 (handle)
[ IN n] number of ranks in ranks1 and ranks2 arrays (integer)
[ IN ranks1] array of zero or more valid ranks in group1
[ IN group2] group2 (handle)
[ OUT ranks2] array of corresponding ranks in group2, MPI_UNDE- FINED when no correspondence exists.

int MPI_Group_translate_ranks (MPI_Group group1, int n, int *ranks1, MPI_Group group2, int *ranks2)

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_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)
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.



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


Return to MPI Standard Index
Return to MPI home page