X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c57842fe897f53b46f0be3da87f7c996674be7d6..5ca17dc381bb7fba4f2689143e2080f7549ee0ab:/teshsuite/smpi/mpich3-test/rma/mixedsync.c diff --git a/teshsuite/smpi/mpich3-test/rma/mixedsync.c b/teshsuite/smpi/mpich3-test/rma/mixedsync.c index c558516c9d..0bf63c3c5b 100644 --- a/teshsuite/smpi/mpich3-test/rma/mixedsync.c +++ b/teshsuite/smpi/mpich3-test/rma/mixedsync.c @@ -14,24 +14,24 @@ static char MTEST_Descrip[] = "Mix synchronization types"; */ -void delay( double time ); -void delay( double time ) +void delay(double time); +void delay(double time) { double t1; t1 = MPI_Wtime(); - while (MPI_Wtime() - t1 < time) ; + while (MPI_Wtime() - t1 < time); } -int main( int argc, char *argv[] ) +int main(int argc, char *argv[]) { - int errs = 0; - int crank, csize, source, dest, loop; - int *buf0, *buf1, *buf2, *inbuf2, count0, count1, count2, count, i; + int errs = 0; + int crank, csize, source, dest, loop; + int *buf0, *buf1, *buf2, *inbuf2, count0, count1, count2, count, i; MPI_Comm comm; - MPI_Win win; - int *winbuf; + MPI_Win win; + int *winbuf; - MTest_Init( &argc, &argv ); + MTest_Init(&argc, &argv); comm = MPI_COMM_WORLD; @@ -40,205 +40,189 @@ int main( int argc, char *argv[] ) count2 = 100; count = count0 + count1 + count2 + 2; - + /* Allocate and initialize the local buffers */ - buf0 = (int *)malloc( count0 * sizeof(int) ); - buf1 = (int *)malloc( count1 * sizeof(int) ); - buf2 = (int *)malloc( count2 * sizeof(int) ); - inbuf2 = (int *)malloc( count2 * sizeof(int) ); + buf0 = (int *) malloc(count0 * sizeof(int)); + buf1 = (int *) malloc(count1 * sizeof(int)); + buf2 = (int *) malloc(count2 * sizeof(int)); + inbuf2 = (int *) malloc(count2 * sizeof(int)); if (!buf0 || !buf1 || !buf2 || !inbuf2) { - fprintf( stderr, "Unable to allocated buf0-2\n" ); - MPI_Abort( MPI_COMM_WORLD, 1 ); + fprintf(stderr, "Unable to allocated buf0-2\n"); + MPI_Abort(MPI_COMM_WORLD, 1); } - for (i=0; i