92. Specifics for Intracommunicator Collective Operations

PreviousUpNext
Up: Communicator Argument Next: Applying Collective Operations to Intercommunicators Previous: Communicator Argument

All processes in the group identified by the intracommunicator must call the collective routine.

In many cases, collective communication can occur ``in place'' for intracommunicators, with the output buffer being identical to the input buffer. This is specified by providing a special argument value, MPI_IN_PLACE, instead of the send buffer or the receive buffer argument, depending on the operation performed.


Rationale.

The ``in place'' operations are provided to reduce unnecessary memory motion by both the MPI implementation and by the user. Note that while the simple check of testing whether the send and receive buffers have the same address will work for some cases (e.g., MPI_ALLREDUCE), they are inadequate in others (e.g., MPI_GATHER, with root not equal to zero). Further, Fortran explicitly prohibits aliasing of arguments; the approach of using a special value to denote ``in place'' operation eliminates that difficulty. ( End of rationale.)

Advice to users.

By allowing the ``in place'' option, the receive buffer in many of the collective calls becomes a send-and-receive buffer. For this reason, a Fortran binding that includes INTENT must mark these as INOUT, not OUT.

Note that MPI_IN_PLACE is a special kind of value; it has the same restrictions on its use that MPI_BOTTOM has. ( End of advice to users.)


PreviousUpNext
Up: Communicator Argument Next: Applying Collective Operations to Intercommunicators Previous: Communicator Argument


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

(Unofficial) MPI-3.1 of June 4, 2015
HTML Generated on June 4, 2015