Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
update collectives teshsuite from mpich git (only minor changes)
[simgrid.git] / teshsuite / smpi / mpich3-test / coll / gather.c
index 7433caa..e14503f 100644 (file)
@@ -66,6 +66,16 @@ int main( int argc, char **argv )
     /* do a zero length gather */
     MPI_Gather( NULL, 0, MPI_BYTE, NULL, 0, MPI_BYTE, 0, MPI_COMM_WORLD );
 
+#if MTEST_HAVE_MIN_MPI_VERSION(2,2)
+    /* Check to make sure that aliasing is disallowed correctly */
+    MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
+    MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+    if (0 == rank)
+        if (MPI_SUCCESS == MPI_Gather(&rank, 1, MPI_INT,
+                                      &rank, 1, MPI_INT, 0, MPI_COMM_WORLD))
+            errs++;
+#endif
+
     MTest_Finalize( errs );
     MPI_Finalize();
     return 0;