diff --git a/ompi/mpi/c/ibcast.c b/ompi/mpi/c/ibcast.c index 94b821c5b4c..f3f248e949b 100644 --- a/ompi/mpi/c/ibcast.c +++ b/ompi/mpi/c/ibcast.c @@ -96,6 +96,13 @@ int MPI_Ibcast(void *buffer, int count, MPI_Datatype datatype, } } + /* If there's only one node, or if the count is 0, we're done */ + + if ((OMPI_COMM_IS_INTRA(comm) && ompi_comm_size(comm) <= 1) || + 0 == count) { + return MPI_SUCCESS; + } + OPAL_CR_ENTER_LIBRARY(); /* Invoke the coll component to perform the back-end operation */ diff --git a/ompi/mpi/c/ireduce_scatter_block.c b/ompi/mpi/c/ireduce_scatter_block.c index fc85df7f893..3c7cc6ec7ff 100644 --- a/ompi/mpi/c/ireduce_scatter_block.c +++ b/ompi/mpi/c/ireduce_scatter_block.c @@ -97,6 +97,11 @@ int MPI_Ireduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount, OMPI_ERRHANDLER_CHECK(err, comm, err, FUNC_NAME); } + if (0 == recvcount) { + *request = &ompi_request_empty; + return MPI_SUCCESS; + } + OPAL_CR_ENTER_LIBRARY(); /* Invoke the coll component to perform the back-end operation */ diff --git a/ompi/mpi/c/reduce_scatter_block.c b/ompi/mpi/c/reduce_scatter_block.c index 7c12fdd495a..0883ab26773 100644 --- a/ompi/mpi/c/reduce_scatter_block.c +++ b/ompi/mpi/c/reduce_scatter_block.c @@ -94,6 +94,9 @@ int MPI_Reduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount, OMPI_CHECK_DATATYPE_FOR_SEND(err, datatype, recvcount); OMPI_ERRHANDLER_CHECK(err, comm, err, FUNC_NAME); } + if (0 == recvcount) { + return MPI_SUCCESS; + } OPAL_CR_ENTER_LIBRARY();