[mpiwg-rma] Atomicity of Accumulates

Jeff Hammond jeff.science at gmail.com
Wed Aug 16 12:38:20 CDT 2017


On Wed, Aug 16, 2017 at 2:24 AM, Simon Schwitanski <
simon.schwitanski at rwth-aachen.de> wrote:

> Hello,
>
> I have got a question about the atomicity of accumulate operations as
> described in 11.7.1. It says (page 461, lines 8 - 11):
>
> > The previous correctness conditions imply that a location updated by a
> > call to an accumulate operation cannot be accessed by a load or an RMA
> > call other than accumulate until the accumulate operation has completed
> > (at the target).
>
> I am a little bit confused about what this actually means: Does it mean
> that local load accesses on the target are (somehow) delayed if there is
> an ongoing accumulate operation to the same location? Or does it just
> mean that concurrent load accesses are forbidden and lead to undefined
> behavior? And why does this not hold for store accesses?
>
>
The MPI standard does not specify how atomicity is implemented.  It can use
hardware atomics or regular instructions with mutual exclusion.  Both of
these serialize, but at different granularity.

The behavior of concurrency MPI_Accumulate and direct local access is not
defined, although it is allowed.  If you want to read memory concurrently
with an MPI_Accumulate, use MPI_Get_accumulate(MPI_NO_OP) or
MPI_Fetch_op(MPI_NO_OP).

Jeff


> Thanks!
>
>
> Simon
> _______________________________________________
> mpiwg-rma mailing list
> mpiwg-rma at lists.mpi-forum.org
> https://lists.mpi-forum.org/mailman/listinfo/mpiwg-rma
>



-- 
Jeff Hammond
jeff.science at gmail.com
http://jeffhammond.github.io/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpi-forum.org/pipermail/mpiwg-rma/attachments/20170816/1ed5d70c/attachment.html>


More information about the mpiwg-rma mailing list