Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MPI_Abort can theorically fail. Add a call to exit() to ensure that the program...
[simgrid.git] / teshsuite / smpi / mpich3-test / coll / nonblocking2.c
index a323596..e607fad 100644 (file)
@@ -25,6 +25,7 @@
         if (!(cond_)) {                                                   \
             fprintf(stderr, "assertion (%s) failed, aborting\n", #cond_); \
             MPI_Abort(MPI_COMM_WORLD, 1);                                 \
+            exit(1);                                                      \
         }                                                                 \
     } while (0)
 
@@ -50,7 +51,6 @@ static void sum_fn(void *invec, void *inoutvec, int *len, MPI_Datatype *datatype
 
 int main(int argc, char **argv)
 {
-    int i, j;
     int rank, size;
     int *buf = NULL;
     int *recvbuf = NULL;
@@ -60,8 +60,11 @@ int main(int argc, char **argv)
     int *rdispls = NULL;
     int *sendtypes = NULL;
     int *recvtypes = NULL;
+#if defined(TEST_NBC_ROUTINES)
+    int i, j;
     char *buf_alias = NULL;
     MPI_Request req;
+#endif
 
     MPI_Init(&argc, &argv);
     MPI_Comm_rank(MPI_COMM_WORLD, &rank);