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 d674e4a..f218a4e 100644 (file)
@@ -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);