[Mpi3-rma] MPI-3.1 consideration slides
Pavan Balaji
balaji at mcs.anl.gov
Sun Dec 2 09:30:46 CST 2012
On 12/02/2012 05:27 AM US Central Time, Torsten Hoefler wrote:
> The only thing I disagree to is slide 6. Win_sync really does nothing
> in the separate case. Your example would work on shared memory if
> flush issues a memory barrier *and* MPI_Barrier() is an optimization
> barrier (which is is in C and needs to be ensured in Fortran anyway).
> But we can discuss next week.
The problem here is that MPI_BARRIER is a process barrier, not a memory
barrier. FWIW, with current compilers, which do not reorder
instructions across functions, this should work correctly. But this is
a correctness concern when compilers do more than that, e.g., IPC
optimizations.
An alternative would be to leave it as-is, and add a note that we assume
the compiler will not reorder instructions here because it's a function
call, though I don't prefer this alternative.
-- Pavan
--
Pavan Balaji
http://www.mcs.anl.gov/~balaji
More information about the mpiwg-rma
mailing list