Communicators and Groups
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:
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.