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);