Can anyone help me understand how MPI Communicator

2019-09-04 10:20发布

问题:

Can anyone help me get my head around the MPI Groups, Inter and Intra communicators. I have already gone through the MPI documentation(http://www.mpi-forum.org/docs/mpi-2.2/mpi22-report.pdf ) and I couldnt make good sense of these concepts. I would especially appreciate any code in the area of Inter communicators and communicator partitioning into groups within one communicator e.g. (MPI_COMM_WORLD) this is because I think I can also learn by experimenting on live code .

回答1:

Can you expand upon what specifically doesn't make sense to you?

Generally speaking, however, I can say this: An MPI group is a set of processes. An MPI communicator is a way of talking between processes. If the communication is within a single group, then you are using an intracommunicator. If the communication is between two disjoing groups, then you're using an intercommunicator.

While you generally think of a communicator as spanning processes, each communicator is actually unique to a process. A communicator can be thought of as a handle to an object (group attribute) that describes a group of processes.