[mpich-discuss] mpich-discuss Digest, Vol 40, Issue 15

Jed Brown jedbrown at mcs.anl.gov
Tue Jan 10 21:59:15 CST 2012


On Tue, Jan 10, 2012 at 16:23, Jie Chen <jiechen at mcs.anl.gov> wrote:

> If using one sided operations, between every "do something" and "get
> data", I need to put a MPI_Win_fence() to synchronize processes. The fence
> works as barrier, meaning every process has to wait the slowest one to
> finish "do something" before it can get data from some other process. Since
> the work loads of "do something" are different among processes, I am
> concerned about the time wasted in the fence.


Fence is not a good memory synchronization mechanism for this usage, but
there are two other ways.


> In fact, in this particular scenario, one sided operations offer no
> superiority over send/recv.


Only that you don't need to determine how many accesses will occur.


> There is alternative to fence, namely MPI_Win_lock(); I am not sure if it
> would have such a barrier effect though.


MPI_Win_lock() is not collective.

You can get a completion model with similar synchronization to
point-to-point communication, but without needing to know the number of
accesses to your window, with MPI_Win_post/start/complete/wait.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20120110/bd232863/attachment.htm>


More information about the mpich-discuss mailing list