X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fc0a76c21f0bceb0314aee5d62f785ea8009495e..09601ee5e16b23f0b9e8f65c2c00b0cf2dd5d901:/teshsuite/smpi/mpich3-test/rma/get_acc_local.c diff --git a/teshsuite/smpi/mpich3-test/rma/get_acc_local.c b/teshsuite/smpi/mpich3-test/rma/get_acc_local.c index ecf3258407..2b29c692c4 100644 --- a/teshsuite/smpi/mpich3-test/rma/get_acc_local.c +++ b/teshsuite/smpi/mpich3-test/rma/get_acc_local.c @@ -10,33 +10,32 @@ #include "mpitest.h" -int errors = 0; -const int NITER = 1000; -const int acc_val = 3; +int errors = 0; +const int NITER = 1000; + int main(int argc, char **argv) { - int rank, nproc; - int out_val, i, counter = 0; - MPI_Win win; - + int rank, nproc; + int out_val, i, counter = 0; + MPI_Win win; + int acc_val = 3; MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &nproc); - MPI_Win_create(&counter, sizeof(int), sizeof(int), MPI_INFO_NULL, - MPI_COMM_WORLD, &win); + MPI_Win_create(&counter, sizeof(int), sizeof(int), MPI_INFO_NULL, MPI_COMM_WORLD, &win); for (i = 0; i < NITER; i++) { MPI_Win_lock(MPI_LOCK_SHARED, rank, 0, win); MPI_Get_accumulate(&acc_val, 1, MPI_INT, &out_val, 1, MPI_INT, - rank, 0, 1, MPI_INT, MPI_SUM, win); + rank, 0, 1, MPI_INT, MPI_SUM, win); MPI_Win_unlock(rank, win); - if (out_val != acc_val*i) { + if (out_val != acc_val * i) { errors++; - printf("Error: got %d, expected %d at iter %d\n", out_val, acc_val*i, i); + printf("Error: got %d, expected %d at iter %d\n", out_val, acc_val * i, i); break; } }