diff --git a/ompi/mca/coll/base/coll_base_reduce.c b/ompi/mca/coll/base/coll_base_reduce.c index 37585dd0b6..5c5585141f 100644 --- a/ompi/mca/coll/base/coll_base_reduce.c +++ b/ompi/mca/coll/base/coll_base_reduce.c @@ -99,7 +99,8 @@ int ompi_coll_base_reduce_generic( const void* sendbuf, void* recvbuf, int origi /* If this is a non-commutative operation we must copy sendbuf to the accumbuf, in order to simplfy the loops */ - if (!ompi_op_is_commute(op)) { + + if (!ompi_op_is_commute(op) && MPI_IN_PLACE != sendbuf) { ompi_datatype_copy_content_same_ddt(datatype, original_count, (char*)accumbuf, (char*)sendtmpbuf);