X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c81c99a491282f76757c2673961e3cdee6853539..b7dc075d2c3bdf2b384cb8897d16a4c0aa8ab0f7:/teshsuite/smpi/mpich-test/pt2pt/sendorder.c diff --git a/teshsuite/smpi/mpich-test/pt2pt/sendorder.c b/teshsuite/smpi/mpich-test/pt2pt/sendorder.c deleted file mode 100644 index e6e3f08ec5..0000000000 --- a/teshsuite/smpi/mpich-test/pt2pt/sendorder.c +++ /dev/null @@ -1,173 +0,0 @@ -/* - Test ordering of messages that differ only in data - - sendorder [ -n number-of-sends ] [ -m length-of-long-sends ] - */ - -#include -#include -#include -#include "mpi.h" - -/* Prototypes */ -void delay( int ); -void CheckStatus( MPI_Status *, int, int, int, int * ); - -/* - This is a delay to make sure that several messages are in the queue when - the MPI_Recv is called - - 10ms delay for now. -*/ -void delay( int ms ) -{ - double deltat = ms * 0.001; - MPI_Wtime(); - //while (MPI_Wtime() - t < deltat) ; - sleep(deltat); -} - -void CheckStatus( MPI_Status *status, int tag, int src, int cnt, int *err ) -{ - int n; - - if (status->MPI_TAG != tag && status->MPI_SOURCE != src) { - if (*err < 10) { - fprintf( stdout, - "Error in message status! tag = %d and source = %d\n", status->MPI_TAG, - status->MPI_SOURCE ); - } - (void)*err++; - } - MPI_Get_count( status, MPI_INT, &n ); - if (n != cnt) { - if (*err < 10) { - fprintf( stdout, - "Error in message status! length is %d and should be %d\n", n, cnt ); - } - (void)*err++; - } -} - -int main( int argc, char *argv[] ) -{ - int i, n, m, val, *buf; - MPI_Status status; - int src, dest, tag, err = 0, toterr; - int rank, size; - MPI_Comm comm; - - MPI_Init( &argc, &argv ); - - n = 1000; /* Number of tests */ - comm = MPI_COMM_WORLD; - tag = 3; - m = 1000; /* Size in ints of longer buffer */ - - /* Check for options - */ - argc--; argv++; - while (argc > 0) { - if (argv[0] && strcmp( argv[0], "-n" ) == 0) { - argc++; - n = atoi( argv[0] ); - } - else if (argv[0] && strcmp( argv[0], "-m" ) == 0) { - argc++; - m = atoi( argv[0] ); - } - argc--; argv++; - } - /* Ensure that everyone has the values */ - MPI_Bcast( &n, 1, MPI_INT, 0, MPI_COMM_WORLD ); - MPI_Bcast( &m, 1, MPI_INT, 0, MPI_COMM_WORLD ); - - MPI_Comm_rank( comm, &rank ); - MPI_Comm_size( comm, &size ); - if (size < 2) { - fprintf( stderr, "This program requires at least 2 processes\n" ); - MPI_Abort( MPI_COMM_WORLD, 1 ); - } - src = 0; - dest = size - 1; - - /* Single Int */ - MPI_Barrier( comm ); - if (rank == src) { - for (i=0; i