X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0e9c0448c6566825b170b98ecff716b098bda10e..b9625f82f86db0674e911887addce45dca31b57f:/teshsuite/smpi/mpich3-test/pt2pt/sendrecv3.c diff --git a/teshsuite/smpi/mpich3-test/pt2pt/sendrecv3.c b/teshsuite/smpi/mpich3-test/pt2pt/sendrecv3.c index e0c21a7ad9..28deb55ab1 100644 --- a/teshsuite/smpi/mpich3-test/pt2pt/sendrecv3.c +++ b/teshsuite/smpi/mpich3-test/pt2pt/sendrecv3.c @@ -14,92 +14,87 @@ static char MTEST_Descrip[] = "Head to head send-recv to test backoff in device */ #define MAX_NMSGS 100 -int main( int argc, char *argv[] ) +int main(int argc, char *argv[]) { int errs = 0; int rank, size, source, dest, partner; - int i, testnum; + int i, testnum; double tsend; static int msgsizes[] = { 100, 1000, 10000, 100000, -1 }; - static int nmsgs[] = { 100, 10, 10, 4 }; - MPI_Comm comm; + static int nmsgs[] = { 100, 10, 10, 4 }; + MPI_Comm comm; - MTest_Init( &argc, &argv ); + MTest_Init(&argc, &argv); comm = MPI_COMM_WORLD; - MPI_Comm_rank( comm, &rank ); - MPI_Comm_size( comm, &size ); + MPI_Comm_rank(comm, &rank); + MPI_Comm_size(comm, &size); source = 0; - dest = 1; + dest = 1; if (size < 2) { - printf( "This test requires at least 2 processes\n" ); - MPI_Abort( MPI_COMM_WORLD, 1 ); + printf("This test requires at least 2 processes\n"); + MPI_Abort(MPI_COMM_WORLD, 1); } - for (testnum=0; msgsizes[testnum] > 0; testnum++) { - if (rank == source || rank == dest) { - int nmsg = nmsgs[testnum]; - int msgSize = msgsizes[testnum]; - MPI_Request r[MAX_NMSGS]; - int *buf[MAX_NMSGS]; + for (testnum = 0; msgsizes[testnum] > 0; testnum++) { + if (rank == source || rank == dest) { + int nmsg = nmsgs[testnum]; + int msgSize = msgsizes[testnum]; + MPI_Request r[MAX_NMSGS]; + int *buf[MAX_NMSGS]; - for (i=0; i 0.5) { - printf( "Isends for %d messages of size %d took too long (%f seconds)\n", nmsg, msgSize, tsend ); - errs++; - } - MTestPrintfMsg( 1, "%d Isends for size = %d took %f seconds\n", - nmsg, msgSize, tsend ); + if (tsend > 0.5) { + printf("Isends for %d messages of size %d took too long (%f seconds)\n", nmsg, + msgSize, tsend); + errs++; + } + MTestPrintfMsg(1, "%d Isends for size = %d took %f seconds\n", nmsg, msgSize, tsend); - for (i=0; i