[Mpi3-rma] Conflicting accesses

James Dinan dinan at mcs.anl.gov
Thu Dec 16 12:46:26 CST 2010


On 12/16/2010 12:21 PM, Torsten Hoefler wrote:
>> Ewww...  yeah, I think that should work.  Would this also work?  It
>> might be cheaper and easier to program than the barrier...
 >
> I would suspect that barrier is the easiest for average programmers.

This idiom of update shared followed by barrier is actually pretty 
common in PGAS code - especially in non-performance critical parts.

>> Rank 0:
>> (addr 42 starts as 0)
>> MPI_Put(rank=1, addr=0, size=1912)
>> MPI_Flush(rank=1)
>> MPI_Accumulate(rank=1, addr=42, MPI_REPLACE, 1)
>> MPI_Flush(rank=1)
>>
>> Rank 1:
>> while (temp == 0) {MPI_GetAccumulate(rank=1, addr=42,&temp); MPI_Flush(rank=1);}
>> MPI_Get(rank=1, addr=12)
>
> Yes, that should work but would poll on address 42 (many messages). (You
> are aware that the accumulate address overlaps with the Put buffer,
> which is ok here but might be unexpected).

Looks okay to me too (minus the overlap), this is definitely something 
we need to support.  We can also use two-sided messaging to notify to a 
waiting process:

Rank 0:
MPI_Put(rank=1, addr=0, size=1912)
MPI_Flush(rank=1)
MPI_Send(rank=1,tag=NOTIFY_TAG,...)

Rank 1:
MPI_Recv(rank=MPI_SOURCE_ANY,tag=NOTIFY_TAG,...)
MPI_Get(rank=1, addr=12)


  ~Jim.



More information about the mpiwg-rma mailing list