From 4c96d3eadaf5c03fae80c4f0b0a12907609aee11 Mon Sep 17 00:00:00 2001 From: Augustin Degomme Date: Sat, 2 Sep 2017 23:51:53 +0200 Subject: [PATCH] check we don't allow 0 here --- teshsuite/smpi/coll-alltoallv/coll-alltoallv.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/teshsuite/smpi/coll-alltoallv/coll-alltoallv.c b/teshsuite/smpi/coll-alltoallv/coll-alltoallv.c index fced26e395..107179fe01 100644 --- a/teshsuite/smpi/coll-alltoallv/coll-alltoallv.c +++ b/teshsuite/smpi/coll-alltoallv/coll-alltoallv.c @@ -68,6 +68,10 @@ int main(int argc, char **argv) /* Create the buffer */ MPI_Comm_size(comm, &size); + if(size<=0){ + printf("error : comm size <= 0, run with mpirun\n"); + return -1; + } MPI_Comm_rank(comm, &rank); int* sbuf = (int *) xbt_malloc(size * size * sizeof(int)); int* rbuf = (int *) xbt_malloc(size * size * sizeof(int)); -- 2.20.1