]> AND Public Git Repository - simgrid.git/blobdiff - src/smpi/colls/smpi_default_selector.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' into async-wait
[simgrid.git] / src / smpi / colls / smpi_default_selector.cpp
index d3736cc81b38ea27e88c883948c7555596d269b0..f218a4efcb279ab95ef84702fd67c4c1253fd24f 100644 (file)
@@ -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);