X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c57842fe897f53b46f0be3da87f7c996674be7d6..5ca17dc381bb7fba4f2689143e2080f7549ee0ab:/teshsuite/smpi/mpich3-test/rma/lockopts.c diff --git a/teshsuite/smpi/mpich3-test/rma/lockopts.c b/teshsuite/smpi/mpich3-test/rma/lockopts.c index 6f962e3eab..2259505583 100644 --- a/teshsuite/smpi/mpich3-test/rma/lockopts.c +++ b/teshsuite/smpi/mpich3-test/rma/lockopts.c @@ -3,28 +3,28 @@ * (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" -/* tests passive target RMA on 2 processes. tests the lock-single_op-unlock +/* tests passive target RMA on 2 processes. tests the lock-single_op-unlock optimization for less common cases: origin datatype derived, target datatype predefined */ -int main(int argc, char *argv[]) -{ - int wrank, nprocs, *srcbuf, *rmabuf, i; - int memsize; +int main(int argc, char *argv[]) +{ + int wrank, nprocs, *srcbuf, *rmabuf, i; + int memsize; MPI_Datatype vectype; - MPI_Win win; - int errs = 0; + MPI_Win win; + int errs = 0; - MTest_Init(&argc,&argv); - MPI_Comm_size(MPI_COMM_WORLD,&nprocs); - MPI_Comm_rank(MPI_COMM_WORLD,&wrank); + MTest_Init(&argc, &argv); + MPI_Comm_size(MPI_COMM_WORLD, &nprocs); + MPI_Comm_rank(MPI_COMM_WORLD, &wrank); if (nprocs < 2) { printf("Run this program with 2 or more processes\n"); @@ -33,179 +33,169 @@ int main(int argc, char *argv[]) memsize = 10 * 4 * nprocs; /* Create and initialize data areas */ - srcbuf = (int *)malloc( sizeof(int) * memsize ); - MPI_Alloc_mem( sizeof(int) * memsize, MPI_INFO_NULL, &rmabuf ); + srcbuf = (int *) malloc(sizeof(int) * memsize); + MPI_Alloc_mem(sizeof(int) * memsize, MPI_INFO_NULL, &rmabuf); if (!srcbuf || !rmabuf) { - printf( "Unable to allocate srcbuf and rmabuf of size %d\n", memsize ); - MPI_Abort( MPI_COMM_WORLD, 1 ); + printf("Unable to allocate srcbuf and rmabuf of size %d\n", memsize); + MPI_Abort(MPI_COMM_WORLD, 1); } - for (i=0; i