X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/281f8c29e177852dcb1591fc31e363e1176857c8..e1bd9c56e6a6bc5f0bf6902209e1e668ac274644:/teshsuite/smpi/mpich3-test/comm/comm_idup.c diff --git a/teshsuite/smpi/mpich3-test/comm/comm_idup.c b/teshsuite/smpi/mpich3-test/comm/comm_idup.c index 1a56bd6108..7958012b78 100644 --- a/teshsuite/smpi/mpich3-test/comm/comm_idup.c +++ b/teshsuite/smpi/mpich3-test/comm/comm_idup.c @@ -10,13 +10,6 @@ #include "mpi.h" #include "mpitest.h" -/* This is a temporary #ifdef to control whether we test this functionality. A - * configure-test or similar would be better. Eventually the MPI-3 standard - * will be released and this can be gated on a MPI_VERSION check */ -#if !defined(USE_STRICT_MPI) && defined(MPICH) -#define TEST_IDUP 1 -#endif - /* assert-like macro that bumps the err count and emits a message */ #define check(x_) \ do { \ @@ -45,11 +38,8 @@ int main(int argc, char **argv) if (size < 2) { printf("this test requires at least 2 processes\n"); MPI_Abort(MPI_COMM_WORLD, 1); - exit(1); } -#ifdef TEST_IDUP - /* test plan: make rank 0 wait in a blocking recv until all other processes * have posted their MPI_Comm_idup ops, then post last. Should ensure that * idup doesn't block on the non-zero ranks, otherwise we'll get a deadlock. @@ -76,7 +66,7 @@ int main(int argc, char **argv) buf[0] = rank; buf[1] = 0xfeedface; MPI_Allreduce(&buf[0], &buf[1], 1, MPI_INT, MPI_SUM, newcomm); - check(buf[1] == (size * (size-1) / 2)); + check(buf[1] == (size * (size - 1) / 2)); MPI_Comm_free(&newcomm); @@ -119,7 +109,7 @@ int main(int argc, char **argv) buf[0] = lrank; buf[1] = 0xfeedface; MPI_Allreduce(&buf[0], &buf[1], 1, MPI_INT, MPI_SUM, newcomm); - check(buf[1] == (rsize * (rsize-1) / 2)); + check(buf[1] == (rsize * (rsize - 1) / 2)); /* free this down here, not before idup, otherwise it will undo our * stagger_comm work */ @@ -131,8 +121,6 @@ int main(int argc, char **argv) MPI_Comm_free(&newcomm); MPI_Comm_free(&ic); -#endif /* TEST_IDUP */ - MPI_Reduce((rank == 0 ? MPI_IN_PLACE : &errs), &errs, 1, MPI_INT, MPI_SUM, 0, MPI_COMM_WORLD); if (rank == 0) { if (errs) { @@ -147,4 +135,3 @@ int main(int argc, char **argv) return 0; } -