The discussion has dealt so far with intra-communication: communication
within a group. MPI also supports inter-communication: communication
between two non-overlapping groups. When an application is built by composing
several parallel modules, it is convenient to allow one module to communicate
with another using local ranks for addressing within the second module. This
is especially convenient in a client-server computing paradigm, where either
client or server are parallel. The support of inter-communication
also provides a mechanism for the extension of MPI to a dynamic model where
not all processes are preallocated at initialization time. In such a
situation, it becomes necessary to support communication across ``universes.''
Inter-communication is supported by objects called inter-communicators.
These objects bind two groups together with communication contexts shared by
both groups.
For inter-communicators, these features work as follows:
- Contexts provide the ability to have
a separate safe ``universe''
of message passing between the two groups. A send in the local
group is always a receive in the remote group, and vice versa.
The system manages this differentiation process.
The use of separate communication
contexts by distinct libraries (or distinct library invocations)
insulates communication internal to the library execution from
external communication. This allows the invocation of the library even if
there are pending communications
on ``other'' communicators, and avoids the need to
synchronize entry or exit into library code.
There is no general-purpose
collective communication on inter-communicators, so
contexts are used just to isolate point-to-point communication.
- A local and remote group specify the recipients and destinations
for an inter-communicator.
- Virtual topology is undefined for an inter-communicator.
- As before,
attributes cache defines the local information that the user or
library has added to a communicator for later reference.
MPI provides mechanisms for creating and manipulating inter-communicators.
They are used for point-to-point communication in an related manner to
intra-communicators. Users who do not need inter-communication
in their applications can safely ignore this extension. Users who
need collective operations via inter-communicators must layer it on top
of MPI . Users who require inter-communication between overlapping groups
must also layer this capability on top of MPI .
MPI-Standard for MARMOT