This page imported from: /afs/bu.edu/cwis/webuser/web/s/c/scv/documentation/tutorials/MPI/alliance/communicators/codes/group_example.html
Example on Usages of Group Routines
The objectives of this example is to divide the member processes of MPI_COMM_WORLD
into two new groups. One group consists of all odd-numbered processes and the other
all even-numbered processes. A table is then printed to show whether a process belongs
to the odd or even group.
|
Output
A negative number indicates that the calling process does not belong to
the group.
As a matter of fact, in that case the rank number would be set to
MPI_UNDEFINED which is implementation dependent and has a value of “-3”
for SGI’s MPI and “-32766” if you are running MPICH.
|