Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Leak-- (seen in maestro-set).
[simgrid.git] / src / smpi / colls / smpi_default_selector.cpp
index d3736cc..f218a4e 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);