From 8ee21732cd938d25cad1c0d80c592aee63981e7d Mon Sep 17 00:00:00 2001 From: degomme Date: Wed, 3 Apr 2019 16:37:06 +0200 Subject: [PATCH] mpi_ireduce and iallreduce are not yet ready for derived datatypes. Should have CLAMR proxy app back on tracks. --- src/smpi/colls/smpi_default_selector.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/smpi/colls/smpi_default_selector.cpp b/src/smpi/colls/smpi_default_selector.cpp index 1aebcf6a9b..69b2029f6c 100644 --- a/src/smpi/colls/smpi_default_selector.cpp +++ b/src/smpi/colls/smpi_default_selector.cpp @@ -90,7 +90,7 @@ int Coll_reduce_default::reduce(void *sendbuf, void *recvbuf, int count, MPI_Dat MPI_Comm comm) { //non commutative case, use a working algo from openmpi - if (op != MPI_OP_NULL && not op->is_commutative()) { + if (op != MPI_OP_NULL && (datatype->flags() & DT_FLAG_DERIVED || not op->is_commutative())) { return Coll_reduce_ompi_basic_linear::reduce(sendbuf, recvbuf, count, datatype, op, root, comm); } MPI_Request request; @@ -100,6 +100,9 @@ int Coll_reduce_default::reduce(void *sendbuf, void *recvbuf, int count, MPI_Dat int Coll_allreduce_default::allreduce(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) { + //FIXME: have mpi_ireduce and iallreduce handle derived datatypes correctly + if(datatype->flags() & DT_FLAG_DERIVED) + return Coll_allreduce_ompi::allreduce(sendbuf, recvbuf, count, datatype, op, comm); int ret; ret = Coll_reduce_default::reduce(sendbuf, recvbuf, count, datatype, op, 0, comm); if(ret==MPI_SUCCESS) -- 2.20.1