-
MPI-2 extends the meaning of some (mainly collective) functions to intercommunicators.
-
Creation of intercommunicators
MPI_Comm_create(MPI_Comm old, MPI_Group group, MPI_Comm *new)
meaning: newcomm contains the corresponding local subgroups
-
(the group argument has to be identical inside a local group)
-
unidirectional data flow (functions with root task)
MPI_Bcast(void* buf, int count, MPI_Datatype type, int root, MPI_Comm comm)
Meaning: task root in group A sends to all tasks in group B
root = MPI_ROOT for task root,
= MPI_PROC_NULL for other tasks of group A
= rank(root) for all tasks of group B
-
bidirectional data flow (functions without root task)
MPI_Allreduce(void* sendbuf, void* recvbuf, int count, MPI_Datatype type, MPI_Op op, MPI_Comm comm)
Meaning: all tasks in group B receive the reduction of all values in group A and
vice versa.