[Mpi3-rma] Memory barriers in MPI_WIN_LOCK_ALL mode

Jed Brown jedbrown at mcs.anl.gov
Tue Oct 30 09:18:06 CDT 2012

On Tue, Oct 30, 2012 at 6:26 AM, Torsten Hoefler <htor at illinois.edu> wrote:

> > Since in the MPI standard, we  don't specify that the user needs to
> > call a WIN_SYNC in this case, I'm  asking if the MPI implementation
> > needs to do a memory barrier internally.
> Yes, win_synch is only needed in the separate model, which would then do
> a memory barrier. The MPI library has to guarantee that there is no
> inconsistency between public and private copy in the unified model (or
> it cannot claim that it supports unified).

I thought we had gone through this example before in the thread with
Maclaren, but in general, the reader needs to issue a read memory barrier
after seeing the hand wave and before accessing the window. There is
nothing that the writer can do to guarantee memory ordering for ensuing the
local read at the target (this could be happening in a threaded

Since x86 does not reorder loads, you don't have to do anything there, but
on POWER and ARM (and of course the dreaded Alpha), you need the read
memory barrier.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpi-forum.org/pipermail/mpiwg-rma/attachments/20121030/0ba4d28b/attachment-0001.html>

More information about the mpiwg-rma mailing list