X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c57842fe897f53b46f0be3da87f7c996674be7d6..09601ee5e16b23f0b9e8f65c2c00b0cf2dd5d901:/teshsuite/smpi/mpich3-test/rma/lockcontention3.c diff --git a/teshsuite/smpi/mpich3-test/rma/lockcontention3.c b/teshsuite/smpi/mpich3-test/rma/lockcontention3.c index d70e26c2a0..d1ae7f68b5 100644 --- a/teshsuite/smpi/mpich3-test/rma/lockcontention3.c +++ b/teshsuite/smpi/mpich3-test/rma/lockcontention3.c @@ -3,7 +3,7 @@ * (C) 2012 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ -#include "mpi.h" +#include "mpi.h" #include "stdio.h" #include "stdlib.h" #include "mpitest.h" @@ -19,7 +19,7 @@ #define PUT_VAL 0xdcba97 #define ACC_VAL 10771134 -/* +/* * Additional tests for lock contention. These are designed to exercise * some of the optimizations within MPICH, but all are valid MPI programs. * Tests structure includes @@ -36,9 +36,9 @@ * lock // Note: this may block * rma operations (see below) * unlock - * + * * unlock send back to partner - * receive from partner + * receive from partner * check for correct data * * The delay may be implemented as a ring of message communication; this @@ -46,442 +46,425 @@ */ /* Define a datatype to be used with */ -int stride = 11; -int veccount = 7; -MPI_Datatype vectype; +int stride = 11; +int veccount = 7; +MPI_Datatype vectype; /* Define long RMA ops size */ int longcount = 512; -int medcount = 127; -int mednum = 4; +int medcount = 127; +int mednum = 4; -void RMATest( int i, MPI_Win win, int master, int *srcbuf, int srcbufsize, int *getbuf, int getbufsize ); -int RMACheck( int i, int *buf, MPI_Aint bufsize ); -int RMACheckGet( int i, MPI_Win win, int *getbuf, MPI_Aint getsize); -void RMATestInit( int i, int *buf, MPI_Aint bufsize ); +void RMATest(int i, MPI_Win win, int master, int *srcbuf, int srcbufsize, int *getbuf, + int getbufsize); +int RMACheck(int i, int *buf, MPI_Aint bufsize); +int RMACheckGet(int i, MPI_Win win, int *getbuf, MPI_Aint getsize); +void RMATestInit(int i, int *buf, MPI_Aint bufsize); -int main( int argc, char *argv[] ) +int main(int argc, char *argv[]) { - int errs = 0; - MPI_Win win; - int *rmabuffer=0, *getbuf=0; - MPI_Aint bufsize=0, getbufsize=0; - int master, partner, next, wrank, wsize, i; - int ntest = LAST_TEST; + int errs = 0; + MPI_Win win; + int *rmabuffer = 0, *getbuf = 0; + MPI_Aint bufsize = 0, getbufsize = 0; + int master, partner, next, wrank, wsize, i; + int ntest = LAST_TEST; int *srcbuf; - MTest_Init( &argc, &argv ); + MTest_Init(&argc, &argv); /* Determine who is responsible for each part of the test */ - MPI_Comm_rank( MPI_COMM_WORLD, &wrank ); - MPI_Comm_size( MPI_COMM_WORLD, &wsize ); + MPI_Comm_rank(MPI_COMM_WORLD, &wrank); + MPI_Comm_size(MPI_COMM_WORLD, &wsize); if (wsize < 3) { - fprintf( stderr, "This test requires at least 3 processes\n" ); - MPI_Abort( MPI_COMM_WORLD, 1 ); + fprintf(stderr, "This test requires at least 3 processes\n"); + MPI_Abort(MPI_COMM_WORLD, 1); } - master = 0; + master = 0; partner = 1; next = wrank + 1; - if (next == partner) next++; + if (next == partner) + next++; if (next >= wsize) { - next = 0; - if (next == partner) next++; + next = 0; + if (next == partner) + next++; } /* Determine the last test to run (by default, run them all) */ - for (i=1; i