8.5.3. (Approximate) Current Practice #3

PreviousUpNext
Up: Motivating Examples Next: Communication Safety Example Previous: Current Practice #2


Example

Image file

Example (Approximate) Current Practice #3 illustrates how a group consisting of all but the zeroth MPI process of the ``all'' group is created, and then how a communicator is formed (commWorker) for that new group. The new communicator is used in a collective call, and all MPI processes execute a collective call in the MPI_COMM_WORLD context. This example illustrates how the two communicators (that inherently possess distinct contexts) protect communication. That is, communication in MPI_COMM_WORLD is insulated from communication in commWorker, and vice versa.

In summary, ``group safety'' is achieved via communicators because distinct contexts within communicators are enforced to be unique on any MPI process.


PreviousUpNext
Up: Motivating Examples Next: Communication Safety Example Previous: Current Practice #2


Return to MPI-4.1 Standard Index
Return to MPI Forum Home Page

(Unofficial) MPI-4.1 of November 2, 2023
HTML Generated on November 19, 2023