Commit 8f1b4bd2 authored by Pavan Balaji's avatar Pavan Balaji
Browse files

Win_flush_all optimization.



During a win_flush_all, if a target does not have any operations to
flush out, don't call the win_flush function at all.  This reduces the
number of function calls on large systems where the RMA operations are
sparsely issued.
Signed-off-by: default avatarXin Zhao <xinzhao3@illinois.edu>
parent 441d189a
......@@ -2169,6 +2169,8 @@ int MPIDI_Win_flush_all(MPID_Win *win_ptr)
* make asynchronous progress. Currently this is handled by Win_flush().
*/
for (i = 0; i < MPIR_Comm_size(win_ptr->comm_ptr); i++) {
if (MPIDI_CH3I_RMA_Ops_head(&win_ptr->targets[i].rma_ops_list) == NULL)
continue;
if (win_ptr->targets[i].remote_lock_state != MPIDI_CH3_WIN_LOCK_NONE) {
mpi_errno = win_ptr->RMAFns.Win_flush(i, win_ptr);
if (mpi_errno != MPI_SUCCESS) { MPIU_ERR_POP(mpi_errno); }
......
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