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    |   Access Statement
CVW material development is supported by NSF OAC awards 1854828, 2321040, 2323116 (UT Austin) and 2005506 (Indiana University)