2 /* Creator: Bronis R. de Supinski (bronis@llnl.gov) Wed Nov 29 2000 */
3 /* dropped-req.c -- create a request that's never matched */
4 /* NOTE: THIS TEST ASSUMES THAT MPI LIBRARY USES EAGER SENDS IF */
5 /* BUFFER IS ZERO BYTES; WILL DEADLOCK IN WHILE LOOP IF FALSE */
8 /* NOTE: Some value of ITERATIONS will imply resource exhaustion */
9 /* either in Umpire or MPI no matter how things are implemented */
10 /* the best we can hope for is to fail gracefully... */
11 /* 10000 breaks umpire due to running out of memory as of 12/20/02... */
12 /* FAILURE IS NOT GRACEFUL AS OF THIS TIME... */
22 main (int argc, char **argv)
28 MPI_Comm comm = MPI_COMM_WORLD;
29 char processor_name[128];
35 MPI_Init (&argc, &argv);
36 MPI_Comm_size (comm, &nprocs);
37 MPI_Comm_rank (comm, &rank);
38 MPI_Get_processor_name (processor_name, &namelen);
39 printf ("(%d) is alive on %s\n", rank, processor_name);
44 /* 0 sends task nprocs-1 a message that is never received */
46 for (i = 0; i < ITERATIONS; i++) {
48 MPI_Isend (&tag, 0, MPI_BYTE, nprocs - 1, tag, comm, &req);
51 MPI_Test (&req, &flag, &status);
56 printf ("(%d) Finished normally\n", rank);