[mpich2-commits] r9470 - mpich2/trunk/test/mpi/comm

goodell at mcs.anl.gov goodell at mcs.anl.gov
Tue Feb 7 11:12:46 CST 2012


Author: goodell
Date: 2012-02-07 11:12:45 -0600 (Tue, 07 Feb 2012)
New Revision: 9470

Modified:
   mpich2/trunk/test/mpi/comm/ic2.c
Log:
fixup for r9469: forgot " No errors" in the ic2 test

Modified: mpich2/trunk/test/mpi/comm/ic2.c
===================================================================
--- mpich2/trunk/test/mpi/comm/ic2.c	2012-02-01 23:51:32 UTC (rev 9469)
+++ mpich2/trunk/test/mpi/comm/ic2.c	2012-02-07 17:12:45 UTC (rev 9470)
@@ -20,6 +20,7 @@
     int a, b, c, d;
     int rank, size, remote_leader, tag;
     int ranks[2];
+    int errs = 0;
 
     tag = 5;
     c0 = c1 = ic = MPI_COMM_NULL;
@@ -77,6 +78,17 @@
     if (ic != MPI_COMM_NULL)
         MPI_Comm_free(&ic);
 
+
+    MPI_Reduce((rank == 0 ? MPI_IN_PLACE : &errs), &errs,
+               1, MPI_INT, MPI_SUM, 0, MPI_COMM_WORLD);
+    if (rank == 0) {
+        if (errs) {
+            printf("found %d errors\n");
+        }
+        else {
+            printf(" No errors");
+        }
+    }
     MPI_Finalize();
 
     return 0;



More information about the mpich2-commits mailing list