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

Modify MPI_Win_complete to only wait for local completion.


Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@anl.gov>
parent 06dbf44b
......@@ -345,8 +345,6 @@ static inline int issue_ops_target(MPID_Win * win_ptr, MPIDI_RMA_Target_t * targ
/* piggyback on last OP. */
if (target->sync.sync_flag == MPIDI_RMA_SYNC_FLUSH) {
flags |= MPIDI_CH3_PKT_FLAG_RMA_FLUSH;
if (target->win_complete_flag)
flags |= MPIDI_CH3_PKT_FLAG_RMA_DECR_AT_COUNTER;
}
else if (target->sync.sync_flag == MPIDI_RMA_SYNC_UNLOCK) {
flags |= MPIDI_CH3_PKT_FLAG_RMA_UNLOCK;
......@@ -355,6 +353,8 @@ static inline int issue_ops_target(MPID_Win * win_ptr, MPIDI_RMA_Target_t * targ
* operation on out-of-order network). */
flags &= ~MPIDI_CH3_PKT_FLAG_RMA_FLUSH;
}
if (target->win_complete_flag)
flags |= MPIDI_CH3_PKT_FLAG_RMA_DECR_AT_COUNTER;
}
/* only increase ack counter when FLUSH or UNLOCK flag is set,
......
......@@ -750,8 +750,8 @@ int MPIDI_Win_complete(MPID_Win * win_ptr)
if (curr_target != NULL) {
/* set sync_flag in sync struct */
if (curr_target->sync.sync_flag < MPIDI_RMA_SYNC_FLUSH) {
curr_target->sync.sync_flag = MPIDI_RMA_SYNC_FLUSH;
if (curr_target->sync.sync_flag < MPIDI_RMA_SYNC_FLUSH_LOCAL) {
curr_target->sync.sync_flag = MPIDI_RMA_SYNC_FLUSH_LOCAL;
}
curr_target->win_complete_flag = 1;
}
......@@ -773,7 +773,7 @@ int MPIDI_Win_complete(MPID_Win * win_ptr)
mpi_errno = MPIDI_CH3I_RMA_Cleanup_ops_win(win_ptr, &local_completed, &remote_completed);
if (mpi_errno != MPI_SUCCESS)
MPIU_ERR_POP(mpi_errno);
if (!remote_completed) {
if (!local_completed) {
mpi_errno = wait_progress_engine();
if (mpi_errno != MPI_SUCCESS)
MPIU_ERR_POP(mpi_errno);
......@@ -782,7 +782,7 @@ int MPIDI_Win_complete(MPID_Win * win_ptr)
* in this function call. */
progress_engine_triggered = 1;
}
} while (!remote_completed);
} while (!local_completed);
/* Cleanup all targets on this window. */
mpi_errno = MPIDI_CH3I_RMA_Cleanup_targets_win(win_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