[mpich-discuss] MPI RMA

Nick Radcliffe nradclif at cray.com
Fri Feb 8 11:36:38 CST 2013


Hi,

I have a question about MPI RMA, and the ANL regression tests for RMA in particular. The tests mixedsync.c and epochtest.c seem to have contradictory views of fence synchronization.

epochtest.c seems to suggest that access/exposure epochs opened by a call to MPI_Win_fence are not closed until a call to MPI_Win_fence with assert==MPI_MODE_NOSUCCEED. The test looks roughly like this:

MPI_Win_fence(MPI_MODE_NOPRECEDE, win)
if (rank == src) MPI_Put
MPI_Win_fence(0, win)
if (rank == dest) MPI_Put
etc...
MPI_Win_fence(MPI_MODE_NOSUCCEED, win)

Since there is a call to MPI_Put after the second call to MPI_Win_fence, it would seem that the second call could not have ended the access epoch for dest, or the exposure epoch for src (which is the target of the second Put).

On the other hand, the test mixedsync.c looks roughly like this:

if (rank == src) {
    MPI_Win_lock(...,win)
    MPI_Put
    MPI_Win_unlock(...,win)
}

MPI_Win_fence(0, win)
if (rank == src) MPI_Put
MPI_Win_fence(0, win)

if (rank == src) {
    MPI_Win_lock(...,win)
    MPI_Put
    MPI_Win_unlock(...,win)
}

The problem is that it is erroneous to call MPI_Win_lock on a window while that window is exposed due to a call to MPI_Win_fence. If mixedsync.c is not erroneous, then the second call to MPI_Win_fence must end the exposure epoch on win, contradicting what's implied about fence synchronization by epochtest.c.

Sorry for the long post, but if anyone can shed some light on this for me, I would greatly appreciate it.




More information about the discuss mailing list