Commit 4b5a188a authored by Xin Zhao's avatar Xin Zhao Committed by Pavan Balaji
Browse files

fix bug: add a memory barrier in win_fence.

Do a memory barrier when winow is allocated by MPI_Win_allocate_shared,
if this fence is (1) not call with MPI_MODE_NO_PROCEDE; (2) not the very
first fence; (3) not following a fence with MPI_MODE_NO_SUCCEED.
Signed-off-by: Pavan Balaji's avatarPavan Balaji <>
parent a35fa10b
......@@ -330,6 +330,12 @@ int MPIDI_Win_fence(int assert, MPID_Win *win_ptr)
int nRequest = 0;
int nRequestNew = 0;
MPIDI_VC_t *orig_vc, *target_vc;
/* Ensure ordering of load/store operations. */
if (win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED) {
/* This is the second or later fence. Do all the preceding RMA ops. */
comm_ptr = win_ptr->comm_ptr;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment