X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/826897d361add5db3272a9810e70371a40ba1660..5ca17dc381bb7fba4f2689143e2080f7549ee0ab:/teshsuite/smpi/mpich3-test/rma/transpose2.c diff --git a/teshsuite/smpi/mpich3-test/rma/transpose2.c b/teshsuite/smpi/mpich3-test/rma/transpose2.c index bfb30c4f80..101e1ead5f 100644 --- a/teshsuite/smpi/mpich3-test/rma/transpose2.c +++ b/teshsuite/smpi/mpich3-test/rma/transpose2.c @@ -3,30 +3,30 @@ * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ -#include "mpi.h" +#include "mpi.h" #include "stdio.h" #include "mpitest.h" /* transposes a matrix using put, fence, and derived datatypes. Uses vector and struct (Example 3.33 from MPI 1.1 Standard). We could use vector and type_create_resized instead. Run - on 2 processes */ + on 2 processes */ #define NROWS 100 #define NCOLS 100 -int main(int argc, char *argv[]) -{ +int main(int argc, char *argv[]) +{ int rank, nprocs, A[NROWS][NCOLS], i, j, blocklen[2]; MPI_Comm CommDeuce; MPI_Aint disp[2]; MPI_Win win; MPI_Datatype column, column1, type[2]; - int errs=0; + int errs = 0; - MTest_Init(&argc,&argv); - MPI_Comm_size(MPI_COMM_WORLD,&nprocs); - MPI_Comm_rank(MPI_COMM_WORLD,&rank); + MTest_Init(&argc, &argv); + MPI_Comm_size(MPI_COMM_WORLD, &nprocs); + MPI_Comm_rank(MPI_COMM_WORLD, &rank); if (nprocs < 2) { printf("Run this program with 2 or more processes\n"); @@ -36,23 +36,22 @@ int main(int argc, char *argv[]) MPI_Comm_split(MPI_COMM_WORLD, (rank < 2), rank, &CommDeuce); if (rank < 2) { - if (rank == 0) - { - for (i=0; i= 50) - { + if (errs >= 50) { printf("Total number of errors: %d\n", errs); } } @@ -102,6 +96,6 @@ int main(int argc, char *argv[]) MPI_Comm_free(&CommDeuce); MTest_Finalize(errs); - MPI_Finalize(); - return 0; -} + MPI_Finalize(); + return 0; +}