#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,
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);
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);
MPI_Win_free(&win);
+#ifndef USE_WIN_ALLOCATE
+ free(arraybuffer);
+#endif
+
MPI_Group_free(&accessGroup);
MPI_Group_free(&exposureGroup);