X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9b73466ada27682d1729f394549479da83ef4a99..acddff27a10d42041457b22aa4c59342695b9d4c:/teshsuite/smpi/mpich3-test/coll/nonblocking3.c?ds=sidebyside diff --git a/teshsuite/smpi/mpich3-test/coll/nonblocking3.c b/teshsuite/smpi/mpich3-test/coll/nonblocking3.c index 2c0ab32ba6..f160c5d38c 100644 --- a/teshsuite/smpi/mpich3-test/coll/nonblocking3.c +++ b/teshsuite/smpi/mpich3-test/coll/nonblocking3.c @@ -18,8 +18,6 @@ #include #include #include -/* USE_STRICT_MPI may be defined in mpitestconf.h */ -#include "mpitestconf.h" #ifdef HAVE_UNISTD_H #include @@ -56,16 +54,6 @@ static int errs = 0; } \ } 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 - -#if defined(TEST_NBC_ROUTINES) /* Intended to act like "rand_r", but we can be sure that it will exist and be * consistent across all of comm world. Returns a number in the range * [0,GEN_PRN_MAX] */ @@ -141,7 +129,7 @@ static void start_random_nonblocking(MPI_Comm comm, unsigned int rndnum, MPI_Req int *rdispls = NULL; int *sendtypes = NULL; int *recvtypes = NULL; - char *buf_alias = NULL; + signed char *buf_alias = NULL; MPI_Comm_rank(comm, &rank); MPI_Comm_size(comm, &size); @@ -177,7 +165,7 @@ static void start_random_nonblocking(MPI_Comm comm, unsigned int rndnum, MPI_Req case 1: /* MPI_Ibcast (again, but designed to stress scatter/allgather impls) */ /* FIXME fiddle with PRIME and buffer allocation s.t. PRIME is much larger (1021?) */ - 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) @@ -188,7 +176,7 @@ static void start_random_nonblocking(MPI_Comm comm, unsigned int rndnum, MPI_Req for (i = PRIME; i < COUNT * size * sizeof(int); ++i) { buf_alias[i] = 0xbf; } - MPI_Ibcast(buf, PRIME, MPI_SIGNED_CHAR, 0, comm, req); + MPI_Ibcast(buf_alias, PRIME, MPI_SIGNED_CHAR, 0, comm, req); break; case 2: /* MPI_Ibarrier */ @@ -405,6 +393,7 @@ static void start_random_nonblocking(MPI_Comm comm, unsigned int rndnum, MPI_Req default: fprintf(stderr, "unexpected value for l->case_num=%d)\n", (l->case_num)); MPI_Abort(comm, 1); + exit(1); break; } } @@ -745,13 +734,11 @@ static void complete_something_somehow(unsigned int rndnum, int numreqs, MPI_Req } #undef COMPLETION_CASES } -#endif /* defined(TEST_NBC_ROUTINES) */ int main(int argc, char **argv) { - int wrank, wsize; -#if defined(TEST_NBC_ROUTINES) int i, num_posted, num_completed; + int wrank, wsize; unsigned int seed = 0x10bc; unsigned int post_seq, complete_seq; struct laundry larr[WINDOW]; @@ -760,14 +747,11 @@ int main(int argc, char **argv) int indices[WINDOW]; MPI_Comm comms[NUM_COMMS]; MPI_Comm comm; -#endif MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD, &wrank); MPI_Comm_size(MPI_COMM_WORLD, &wsize); -#if defined(TEST_NBC_ROUTINES) - /* it is critical that all processes in the communicator start with a * consistent value for "post_seq" */ post_seq = complete_seq = gen_prn(seed); @@ -826,8 +810,6 @@ int main(int argc, char **argv) MPI_Comm_free(&comms[i]); } -#endif /* defined(TEST_NBC_ROUTINES) */ - if (wrank == 0) { if (errs) printf("found %d errors\n", errs);