diff --git a/src/mpid/ch4/src/ch4_coll_impl.h b/src/mpid/ch4/src/ch4_coll_impl.h index 4643a6b158b..75971707629 100644 --- a/src/mpid/ch4/src/ch4_coll_impl.h +++ b/src/mpid/ch4/src/ch4_coll_impl.h @@ -597,10 +597,11 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_intra_composition_alpha(const void *se /* intranode reduce on all nodes */ if (comm->node_comm != NULL) { #ifndef MPIDI_CH4_DIRECT_NETMOD - coll_ret = MPIDI_SHM_mpi_reduce(sendbuf, recvbuf, count, datatype, op, 0, comm->node_comm, - errflag); + coll_ret = + MPIDI_SHM_mpi_reduce(sendbuf, recvbuf, count, datatype, op, root, comm->node_comm, + errflag); #else - coll_ret = MPIDI_NM_mpi_reduce(sendbuf, recvbuf, count, datatype, op, 0, comm->node_comm, + coll_ret = MPIDI_NM_mpi_reduce(sendbuf, recvbuf, count, datatype, op, root, comm->node_comm, errflag); #endif /* MPIDI_CH4_DIRECT_NETMOD */ @@ -670,11 +671,12 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_Reduce_intra_composition_beta(const void *sen if (comm->node_comm != NULL && MPIR_Get_intranode_rank(comm, root) == -1) { #ifndef MPIDI_CH4_DIRECT_NETMOD coll_ret = - MPIDI_SHM_mpi_reduce(sendbuf, tmp_buf, count, datatype, op, 0, comm->node_comm, + MPIDI_SHM_mpi_reduce(sendbuf, tmp_buf, count, datatype, op, root, comm->node_comm, errflag); #else coll_ret = - MPIDI_NM_mpi_reduce(sendbuf, tmp_buf, count, datatype, op, 0, comm->node_comm, errflag); + MPIDI_NM_mpi_reduce(sendbuf, tmp_buf, count, datatype, op, root, comm->node_comm, + errflag); #endif /* MPIDI_CH4_DIRECT_NETMOD */ MPIR_ERR_COLL_CHECKANDCONT(coll_ret, errflag, mpi_errno); }