Description
Problem
The MPI-3.1 standard is unclear on which accumulate-style operations are atomic with respect to each other. In particular, by default, we say that "same op" and "no op" are atomic with respect to each other. But this does not specify:
-
If two different functions using the same
MPI_Op
are atomic with respect to each other. -
If compare-and-swap (which does not have an
MPI_Op
argument) is atomic with respect to any of the other accumulate-style operations.
An additional problem is that saying that "same op" is atomic does not tell the MPI implementation what that operation is. MPI implementations can benefit from knowing what that operation is in order to decide what operations can be done, for example, in hardware, while maintaining atomicity.
Proposal
This proposal makes two major changes:
-
It changes the default behavior of MPI to be atomic with respect to all accumulate-style operations instead of just
same_op_no_op
. This sets the default to the most conservative behavior and allows users to weaken such guarantees by using info keys, which is the same model that we use everywhere else in the standard. -
It allows users to specify exactly which operations they would use instead of simply saying
same_op_no_op
, which is more helpful for implementers to optimize performance.
Impact on Implementations
In MPI-3.1, implementations were only required to maintain atomicity for same_op_no_op
. This proposal changes the default to be atomic for all accumulate-style operations.
The additional info keys gives more room for performance optimization, which can be used by implementations, if desired.
Impact on Users
Some cases that could have been specified with the old key can no longer be specified with the new key. However, we expect the impact on applications to be minimal to non-existent.
Final Proposal PDF
Pull Request
Metadata
Metadata
Type
Projects
Status