X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f186fd6470cd6853b97c53782c710745c628e810..28335d43a1e64d3a412e8d6b86e59a389852b0d1:/teshsuite/smpi/isp/umpire/lost-request.c diff --git a/teshsuite/smpi/isp/umpire/lost-request.c b/teshsuite/smpi/isp/umpire/lost-request.c deleted file mode 100644 index 840c5db6a5..0000000000 --- a/teshsuite/smpi/isp/umpire/lost-request.c +++ /dev/null @@ -1,87 +0,0 @@ -/* -*- Mode: C; -*- */ -/* Creator: Jeffrey Vetter (j-vetter@llnl.gov) Mon Nov 1 1999 */ -/* lost-request.c -- overwrite a request and essentially lose a synch point */ - -#ifndef lint -static char *rcsid = - "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/lost-request.c,v 1.3 2003/01/13 18:31:48 bronis Exp $"; -#endif - -#include -#include -#include -#include "mpi.h" - -#define buf_size 128 - -mydelay () /* about 6 seconds */ -{ - int i; - int val; - for (i = 0; i < 3000000; i++) - { - val = getpid (); /* about 2.06 usecs on snow */ - } - return val; -} - -int -main (int argc, char **argv) -{ - int nprocs = -1; - int rank = -1; - int tag1 = 31; - int tag2 = 32; - char processor_name[128]; - int namelen = 128; - int buf0[buf_size]; - int buf1[buf_size]; - MPI_Request req, req0, req1; - MPI_Status status, status0, status1; - - /* init */ - MPI_Init (&argc, &argv); - MPI_Comm_size (MPI_COMM_WORLD, &nprocs); - MPI_Comm_rank (MPI_COMM_WORLD, &rank); - MPI_Get_processor_name (processor_name, &namelen); - printf ("(%d) is alive on %s\n", rank, processor_name); - fflush (stdout); - - memset (buf0, 1, buf_size*sizeof(int)); - memset (buf1, 2, buf_size*sizeof(int)); - - MPI_Barrier(MPI_COMM_WORLD); - - /* 0 sends 1 two messages, but the request gets overwritten */ - switch (rank) - { - case 0: - MPI_Isend (buf0, buf_size, MPI_INT, 1, tag1, MPI_COMM_WORLD, &req0); - MPI_Isend (buf1, buf_size, MPI_INT, 1, tag2, MPI_COMM_WORLD, &req1); - - /* do some work here */ - - mydelay (); - MPI_Wait (&req0, &status0); - MPI_Wait (&req1, &status1); - break; - - case 1: - MPI_Irecv (buf0, buf_size, MPI_INT, 0, tag1, MPI_COMM_WORLD, &req); - MPI_Irecv (buf1, buf_size, MPI_INT, 0, tag2, MPI_COMM_WORLD, &req); /* overwrite req */ - - /* do some work here and get confused */ - - MPI_Wait (&req, &status); - break; - - default: - /* do nothing */ - break; - } - - MPI_Finalize (); - printf ("(%d) Finished normally\n", rank); -} - -/* EOF */