MPI COMM GROUP Definition of mPl comm group Used to return the group underlying the communicator,; you get a handle to the group of comm The MPl COMM GROUP routine determines the group handle of a communicator int MPl Comm group( MPl Comm comm, MPI Group * group The function returns an int error flag Variable Name C Type In/Out Description comm MPI Comm Input Communicator handle group MPL_Group* Output Group handle
MPI_COMM_GROUP • Definition of MPI_COMM_GROUP – Used to return the group underlying the communicator; you get a handle to the group of comm. • The MPI_COMM_GROUP routine determines the group handle of a communicator. int MPI_Comm_group( MPI_Comm comm, MPI_Group *group ) • The function returns an int error flag. Variable Name C Type In/Out Description comm MPI_Comm Input Communicator handle group MPI_Group * Output Group handle
MPI COMM GROUP EXample Include " mpi.h MPI Comm comm world MPI Group group world comm world MPI COMM WORLD MPI Comm group(comm world, &group world)
MPI_COMM_GROUP • Example #include "mpi.h" MPI_Comm comm_world; MPI_Group group_world; comm_world = MPI_COMM_WORLD; MPI_Comm_group(comm_world, &group_world);
MPI COMM GROUP Definition of mel comm world Default communicator consisting of all processes Definition of mel group incl Used to form a new group from the processes belonging to group within specified ranks Definition of mpl comm create Used to create a new intracommunicator from the processes listed in new group Definition of mpl group rank Used to return the rank of the calling process in group
MPI_COMM_GROUP • Definition of MPI_COMM_WORLD – Default communicator consisting of all processes. • Definition of MPI_GROUP_INCL – Used to form a new group from the processes belonging to group within specified ranks. • Definition of MPI_COMM_CREATE – Used to create a new intracommunicator from the processes listed in new_group. • Definition of MPI_GROUP_RANK – Used to return the rank of the calling process in group
MPI COMM GROUP Associated with a communicator is its group identity, or handle. In the above example, we used MPI COMM GROUP to obtain the group handle of the communicator mpi comm world. this handle can then be used as input to the routine MPl GROUP INCL to select among the processes of one group to form another(new) group MPI COMM CREaTE to create a new communicator whose members are those of the new group MPI GROUP RANK to find the current process rank's equivalent process rank in a group
MPI_COMM_GROUP • Associated with a communicator is its group identity, or handle. In the above example, we used MPI_COMM_GROUP to obtain the group handle of the communicator MPI_COMM_WORLD. This handle can then be used as input to the routine – MPI_GROUP_INCL to select among the processes of one group to form another (new) group; – MPI_COMM_CREATE to create a new communicator whose members are those of the new group; – MPI_GROUP_RANK to find the current process rank's equivalent process rank in a group
MPI GROUP NCL
MPI_GROUP_INCL