1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
3 * (C) 2015 by Argonne National Laboratory.
4 * See COPYRIGHT in top-level directory.
7 /* This test triggers a limitation in the Portals4 netmod where
8 * too many large messages can overflow the available ME entries
9 * (PTL_NO_SPACE). Our approach is to queue the entire send message
10 * in the Rportals layer until we know there is ME space available.
17 #define BUFSIZE (32*1024)
19 int main(int argc, char *argv[])
25 MPI_Init(&argc, &argv);
27 buf = malloc(BUFSIZE);
28 MTEST_VG_MEM_INIT(buf, BUFSIZE);
30 MPI_Comm_rank(MPI_COMM_WORLD, &rank);
31 MPI_Comm_size(MPI_COMM_WORLD, &size);
34 printf("test must be run with 2 processes!\n");
35 MPI_Abort(MPI_COMM_WORLD, 1);
39 MPI_Win_create(buf, BUFSIZE, sizeof(int), MPI_INFO_NULL, MPI_COMM_WORLD, &win);
41 MPI_Win_create(MPI_BOTTOM, 0, 1, MPI_INFO_NULL, MPI_COMM_WORLD, &win);
43 MPI_Win_fence(0, win);
46 for (i = 0; i < 1000; i++)
47 MPI_Get(buf, BUFSIZE / sizeof(int), MPI_INT, 0, 0, BUFSIZE / sizeof(int), MPI_INT, win);
50 MPI_Win_fence(0, win);
54 printf(" No Errors\n");