From 9c36c28816385c4e1080a18296982fa876c5a5a8 Mon Sep 17 00:00:00 2001 From: Valentin Petrov Date: Fri, 13 Nov 2020 13:16:23 +0200 Subject: [PATCH] coll/hcoll: scatterv inplace fix Signed-off-by: Valentin Petrov (cherry picked from commit 9fa0015) --- ompi/mca/coll/hcoll/coll_hcoll_ops.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ompi/mca/coll/hcoll/coll_hcoll_ops.c b/ompi/mca/coll/hcoll/coll_hcoll_ops.c index a4e83f9943..0f52a25b75 100644 --- a/ompi/mca/coll/hcoll/coll_hcoll_ops.c +++ b/ompi/mca/coll/hcoll/coll_hcoll_ops.c @@ -413,6 +413,10 @@ int mca_coll_hcoll_scatterv(const void* sbuf, const int *scounts, const int *dis mca_coll_hcoll_module_t *hcoll_module = (mca_coll_hcoll_module_t*)module; stype = ompi_dtype_2_hcoll_dtype(sdtype, NO_DERIVED); rtype = ompi_dtype_2_hcoll_dtype(rdtype, NO_DERIVED); + if (rbuf == MPI_IN_PLACE) { + assert(root == comm->c_my_rank); + rtype = stype; + } if (OPAL_UNLIKELY(HCOL_DTE_IS_ZERO(stype) || HCOL_DTE_IS_ZERO(rtype))) { /*If we are here then datatype is not simple predefined datatype */ /*In future we need to add more complex mapping to the dte_data_representation_t */