X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d5b29830df70e823202e384a7655e4371193ecd7..5f1dc33c9f76ee99973ba93f034f031451398ebe:/src/smpi/colls/smpi_default_selector.cpp diff --git a/src/smpi/colls/smpi_default_selector.cpp b/src/smpi/colls/smpi_default_selector.cpp index d674e4ad56..f218a4efcb 100644 --- a/src/smpi/colls/smpi_default_selector.cpp +++ b/src/smpi/colls/smpi_default_selector.cpp @@ -7,7 +7,7 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "colls_private.h" -#include "src/smpi/smpi_process.hpp" +#include "smpi_process.hpp" namespace simgrid{ namespace smpi{ @@ -213,6 +213,8 @@ int Coll_reduce_default::reduce(void *sendbuf, void *recvbuf, int count, MPI_Dat int rank = comm->rank(); int size = comm->size(); + if(size==0) + return MPI_ERR_COMM; //non commutative case, use a working algo from openmpi if (op != MPI_OP_NULL && not op->is_commutative()) { return Coll_reduce_ompi_basic_linear::reduce(sendtmpbuf, recvbuf, count, datatype, op, root, comm);