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

use ALL_STREAM_UNITS_ISSUED to indicate if all stream units are issued out.


Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@anl.gov>
parent a9849cd1
......@@ -548,6 +548,7 @@ static int issue_put_op(MPIDI_RMA_Op_t * rma_op, MPID_Win * win_ptr,
/* --END ERROR HANDLING-- */
}
#define ALL_STREAM_UNITS_ISSUED (-1)
/* issue_acc_op() send ACC packet header and data. */
#undef FUNCNAME
......@@ -685,7 +686,7 @@ static int issue_acc_op(MPIDI_RMA_Op_t * rma_op, MPID_Win * win_ptr,
} /* end of for loop */
/* Mark that all stream units have been issued */
rma_op->issued_stream_count = -1;
rma_op->issued_stream_count = ALL_STREAM_UNITS_ISSUED;
fn_exit:
MPIDI_RMA_FUNC_EXIT(MPID_STATE_ISSUE_ACC_OP);
......@@ -933,7 +934,7 @@ static int issue_get_acc_op(MPIDI_RMA_Op_t * rma_op, MPID_Win * win_ptr,
} /* end of for loop */
/* Mark that all stream units have been issued */
rma_op->issued_stream_count = -1;
rma_op->issued_stream_count = ALL_STREAM_UNITS_ISSUED;
fn_exit:
MPIDI_RMA_FUNC_EXIT(MPID_STATE_ISSUE_GET_ACC_OP);
......
......@@ -378,7 +378,8 @@ static inline int issue_ops_target(MPID_Win * win_ptr, MPIDI_RMA_Target_t * targ
}
if ((curr_op->pkt.type == MPIDI_CH3_PKT_ACCUMULATE ||
curr_op->pkt.type == MPIDI_CH3_PKT_GET_ACCUM) && curr_op->issued_stream_count > 0) {
curr_op->pkt.type == MPIDI_CH3_PKT_GET_ACCUM) &&
curr_op->issued_stream_count != ALL_STREAM_UNITS_ISSUED) {
/* For ACC-like operations, if not all stream units
* are issued out, we stick to the current operation,
* otherwise we move on to the next operation. */
......
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