X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d0ffc37686edcc803601f76ab51fdfed5fc2f241..90f50bba185f1c86225aa498dcc3a01c9080b52b:/teshsuite/smpi/mpich3-test/coll/iallred.c diff --git a/teshsuite/smpi/mpich3-test/coll/iallred.c b/teshsuite/smpi/mpich3-test/coll/iallred.c index 564a47f5af..455c22dbc9 100644 --- a/teshsuite/smpi/mpich3-test/coll/iallred.c +++ b/teshsuite/smpi/mpich3-test/coll/iallred.c @@ -1,40 +1,34 @@ +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ +/* + * + * (C) 2012 by Argonne National Laboratory. + * See COPYRIGHT in top-level directory. + */ + #include #include #include "mpi.h" #include "mpitest.h" -/* Since MPICH is currently the only NBC implementation in existence, just use - * this quick-and-dirty #ifdef to decide whether to test the nonblocking - * collectives. Eventually we can add a configure option or configure test, or - * the MPI-3 standard will be released and these can be gated on a MPI_VERSION - * check */ -#if !defined(USE_STRICT_MPI) && defined(MPICH) -#define TEST_NBC_ROUTINES 1 -#endif - int main(int argc, char *argv[]) { - int size, rank; -#if defined(TEST_NBC_ROUTINES) MPI_Request request; + int size, rank; int one = 1, two = 2, isum, sum; -#endif - MPI_Init(&argc,&argv); + + MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Comm_rank(MPI_COMM_WORLD, &rank); assert(size == 2); -#if defined(TEST_NBC_ROUTINES) - MPI_Iallreduce(&one,&isum,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD,&request); - MPI_Allreduce(&two,&sum,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD); - MPI_Wait(&request,MPI_STATUS_IGNORE); + MPI_Iallreduce(&one, &isum, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD, &request); + MPI_Allreduce(&two, &sum, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD); + MPI_Wait(&request, MPI_STATUS_IGNORE); assert(isum == 2); assert(sum == 4); if (rank == 0) printf(" No errors\n"); -#endif MPI_Finalize(); return 0; } -