Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'mc-perf' into mc
[simgrid.git] / teshsuite / smpi / mpich3-test / coll / red_scat_block.c
index 3092c8d..71886e4 100644 (file)
 int main(int argc, char **argv)
 {
     int err = 0;
-    int toterr, size, rank, i, sumval;
+    int toterr, size, rank;
+#if MTEST_HAVE_MIN_MPI_VERSION(2,2)
+    int i, sumval;
     int *sendbuf;
     int *recvbuf;
+#endif
     MPI_Comm comm;
 
     MPI_Init(&argc, &argv);
@@ -39,6 +42,7 @@ int main(int argc, char **argv)
         err++;
         fprintf(stderr, "unable to allocate send/recv buffers, aborting");
         MPI_Abort(MPI_COMM_WORLD, 1);
+        exit(1);
     }
     for (i=0; i<size; i++)
         sendbuf[i] = rank + i;