[Mpi3-rma] RMA Example 11.10
balaji at mcs.anl.gov
Wed Jun 12 07:28:22 CDT 2013
On 06/12/2013 03:15 AM, Marc-Andre Hermanns wrote:
> I was just reading the RMA chapter to understand the semantics of the
> new calls. I came across Example 11.10 (page 459) and I think I'd need
> some clarification.
> Does the local store not show in the public window because it is not
> wrapped in an access epoch?
Correct. In the separate model, the MPI implementation may copy the
public window into the private window (possibly in software) on an
MPI_WIN_LOCK, thus losing that change to X.
> Would it be the same in unified mode?
Yes. In the unified model, the change to X will not be lost, but the
GET might not get the value yet, because the WIN_LOCK might not do a
memory barrier (or at least a store fence).
> On a side note:
> The example spans process B's access epoch over a call to MPI_Barrier.
> Doesn't this bear the danger of a deadlock?
Why will this deadlock? MPI_WIN_LOCK cannot block for uncontended locks.
> Consider a process C that has the same calling sequence as process B. If
> C get's the lock granted in MPI_Lock and process B's call to MPI_Lock
> blocks to wait for the lock to be granted, C will never release the
> lock, as it waits for process B to join the barrier. B, however, waits
> for the lock and will never enter the barrier.
They are all using SHARED lock.
More information about the mpiwg-rma