X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7d18220729378bc55a4b8ccc298d80e03263f3f0..550e68e2d3bb08b56b4c900ba701e07f38882b19:/teshsuite/smpi/mpich3-test/coll/nonblocking2.c diff --git a/teshsuite/smpi/mpich3-test/coll/nonblocking2.c b/teshsuite/smpi/mpich3-test/coll/nonblocking2.c index bc8a2c270a..6dac34b16c 100644 --- a/teshsuite/smpi/mpich3-test/coll/nonblocking2.c +++ b/teshsuite/smpi/mpich3-test/coll/nonblocking2.c @@ -5,7 +5,7 @@ */ /* A basic test of all 17 nonblocking collective operations specified by the - * draft MPI-3 standard. It only exercises the intracommunicator functionality, + * MPI-3 standard. It only exercises the intracommunicator functionality, * does not use MPI_IN_PLACE, and only transmits/receives simple integer types * with relatively small counts. It does check a few fancier issues, such as * ensuring that "premature user releases" of MPI_Op and MPI_Datatype objects @@ -14,8 +14,6 @@ #include "mpi.h" #include #include -/* USE_STRICT_MPI may be defined in mpitestconf.h */ -#include "mpitestconf.h" #define COUNT (10) #define PRIME (17) @@ -25,18 +23,10 @@ if (!(cond_)) { \ fprintf(stderr, "assertion (%s) failed, aborting\n", #cond_); \ MPI_Abort(MPI_COMM_WORLD, 1); \ + exit(1); \ } \ } while (0) -/* 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 - static void sum_fn(void *invec, void *inoutvec, int *len, MPI_Datatype *datatype) { int i; @@ -50,6 +40,7 @@ static void sum_fn(void *invec, void *inoutvec, int *len, MPI_Datatype *datatype int main(int argc, char **argv) { + int i, j; int rank, size; int *buf = NULL; int *recvbuf = NULL; @@ -59,16 +50,12 @@ int main(int argc, char **argv) int *rdispls = NULL; int *sendtypes = NULL; int *recvtypes = NULL; -#if defined(TEST_NBC_ROUTINES) - int i, j; - char *buf_alias = NULL; + signed char *buf_alias = NULL; MPI_Request req; -#endif MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &size); -#if defined(TEST_NBC_ROUTINES) buf = malloc(COUNT*size*sizeof(int)); recvbuf = malloc(COUNT*size*sizeof(int)); @@ -98,7 +85,7 @@ int main(int argc, char **argv) } /* MPI_Ibcast (again, but designed to stress scatter/allgather impls) */ - buf_alias = (char *)buf; + buf_alias = (signed char *)buf; my_assert(COUNT*size*sizeof(int) > PRIME); /* sanity */ for (i = 0; i < PRIME; ++i) { if (rank == 0) @@ -109,7 +96,7 @@ int main(int argc, char **argv) for (i = PRIME; i < COUNT * size * sizeof(int); ++i) { buf_alias[i] = 0xbf; } - MPI_Ibcast(buf, PRIME, MPI_SIGNED_CHAR, 0, MPI_COMM_WORLD, &req); + MPI_Ibcast(buf_alias, PRIME, MPI_SIGNED_CHAR, 0, MPI_COMM_WORLD, &req); MPI_Wait(&req, MPI_STATUS_IGNORE); for (i = 0; i < PRIME; ++i) { if (buf_alias[i] != i) @@ -450,8 +437,6 @@ int main(int argc, char **argv) } } -#endif /* defined(TEST_NBC_ROUTINES) */ - if (rank == 0) printf(" No Errors\n");