X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/aac4ba41ea27fe8168bebed009abebd7e5c3f006..4cdc0f888550cbaefe6094ae801230336d005337:/teshsuite/smpi/mpich3-test/rma/manyrma2.c diff --git a/teshsuite/smpi/mpich3-test/rma/manyrma2.c b/teshsuite/smpi/mpich3-test/rma/manyrma2.c index 571d29e950..67739199a0 100644 --- a/teshsuite/smpi/mpich3-test/rma/manyrma2.c +++ b/teshsuite/smpi/mpich3-test/rma/manyrma2.c @@ -17,7 +17,7 @@ #define MAX_COUNT 65536*4/16 #define MAX_RMA_SIZE 2 /* 16 in manyrma performance test */ -#define MAX_RUNS 10 +#define MAX_RUNS 8 #define MAX_ITER_TIME 5.0 /* seconds */ typedef enum { SYNC_NONE = 0, @@ -112,6 +112,14 @@ int main(int argc, char *argv[]) MPI_Group_free(&wgroup); arraysize = maxSz * MAX_COUNT; +#ifdef USE_WIN_ALLOCATE + MPI_Win_allocate(arraysize * sizeof(int), (int) sizeof(int), MPI_INFO_NULL, + MPI_COMM_WORLD, &arraybuffer, &win); + if (!arraybuffer) { + fprintf(stderr, "Unable to allocate %d words\n", arraysize); + MPI_Abort(MPI_COMM_WORLD, 1); + } +#else arraybuffer = (int *) malloc(arraysize * sizeof(int)); if (!arraybuffer) { fprintf(stderr, "Unable to allocate %d words\n", arraysize); @@ -120,6 +128,7 @@ int main(int argc, char *argv[]) MPI_Win_create(arraybuffer, arraysize * sizeof(int), (int) sizeof(int), MPI_INFO_NULL, MPI_COMM_WORLD, &win); +#endif if (maxCount > MAX_COUNT) { fprintf(stderr, "MaxCount must not exceed %d\n", MAX_COUNT); @@ -212,6 +221,10 @@ int main(int argc, char *argv[]) MPI_Win_free(&win); +#ifndef USE_WIN_ALLOCATE + free(arraybuffer); +#endif + MPI_Group_free(&accessGroup); MPI_Group_free(&exposureGroup);