[Mpi3-rma] MPI-3 UNIFIED model clarification
balaji at mcs.anl.gov
Mon Jul 29 23:30:02 CDT 2013
On 07/29/2013 11:21 PM, Underwood, Keith D wrote:
>> On 07/29/2013 10:58 PM, Underwood, Keith D wrote:
>> Are you saying that the architecture cannot track that these two are
>> nonoverlapping buffers?
> Exactly. MPI_Recv takes a void* and a length. Because MPI_recv
> knows that the architecture is not parsing the arguments and
> semantics of MPI_Recv, it must memory barrier (if that is an issue
> for the implementation).
The compiler can't track this, but the architecture should be able to if
it's looking at bytes accessed.
>> Put(a, P1)
>> flag = 1;
>> Put(flag, P1)
>> flag = 0;
>> while (flag);
>> read a
> Now, this is an interesting example. Do we promise that this will work?
We say that the once the flag turns 1, it'll stay 1. The origin
guarantees that the flag only turns 1 after the data 'a' is visible at
the target process for load/store.
> Of course, while(flag) will be optimized away by a lot of compilers
> without some magic annotation that would prevent the read from
> crossing it...
I can't get any compiler to optimize it away.
More information about the mpiwg-rma