On Tue, Oct 30, 2012 at 6:26 AM, Torsten Hoefler <span dir="ltr"><<a href="mailto:htor@illinois.edu" target="_blank">htor@illinois.edu</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>> Since in the MPI standard, we don't specify that the user needs to<br>
> call a WIN_SYNC in this case, I'm asking if the MPI implementation<br>
> needs to do a memory barrier internally.<br>
</div>Yes, win_synch is only needed in the separate model, which would then do<br>
a memory barrier. The MPI library has to guarantee that there is no<br>
inconsistency between public and private copy in the unified model (or<br>
it cannot claim that it supports unified).</blockquote></div><br><div>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 environment).<br>
<br>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.<br></div>