Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
we don't support MPI_Cancel, deactivate this test as it fails sometimes
[simgrid.git] / teshsuite / smpi / mpich3-test / coll / alltoall1.c
index cd6d3d8..6974627 100644 (file)
@@ -53,6 +53,7 @@ int main( int argc, char *argv[] )
                errs++;
                fprintf( stderr, "Failed to allocate sendbuf and/or recvbuf\n" );
                MPI_Abort( MPI_COMM_WORLD, 1 );
+                exit(1);
            }
            for (i=0; i<count*size; i++) 
                recvbuf[i] = -1;
@@ -115,6 +116,14 @@ int main( int argc, char *argv[] )
        MTestFreeComm( &comm );
     }
 
+#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 (MPI_SUCCESS == MPI_Alltoall(&rank, 1, MPI_INT, &rank, 1, MPI_INT, MPI_COMM_WORLD))
+        errs++;
+#endif
+
     MTest_Finalize( errs );
     MPI_Finalize();
     return 0;