All MPI communication is relative to a communicator, which contains a context and a group. The group is just a set of processes. Processes may have different ranks in different communicators, as shown below:

For example, a particular process may be rank 1 in the global communicator and rank 0 in a different communicator.
For example, a particular process may be rank 1 in the global communicator and rank 0 in a different communicator.

Communicators can also overlap completely. This is a good way of distinguishing among sets of messages that serve entirely different purposes in the same process group, e.g., messages sent within the main program vs. messages sent within a library.

 
©   Cornell University  |  Center for Advanced Computing  |  Copyright Statement  |  Inclusivity Statement