X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fc0a76c21f0bceb0314aee5d62f785ea8009495e..5ca17dc381bb7fba4f2689143e2080f7549ee0ab:/teshsuite/smpi/mpich3-test/rma/transpose3.c diff --git a/teshsuite/smpi/mpich3-test/rma/transpose3.c b/teshsuite/smpi/mpich3-test/rma/transpose3.c index 86ef3d5ff2..50a5c4a600 100644 --- a/teshsuite/smpi/mpich3-test/rma/transpose3.c +++ b/teshsuite/smpi/mpich3-test/rma/transpose3.c @@ -3,7 +3,7 @@ * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ -#include "mpi.h" +#include "mpi.h" #include "stdio.h" #include "mpitest.h" #include "squelch.h" @@ -15,18 +15,18 @@ #define NROWS 100 #define NCOLS 100 -int main(int argc, char *argv[]) -{ - int rank, nprocs, A[NROWS][NCOLS], i, j, destrank; +int main(int argc, char *argv[]) +{ + int rank, nprocs, i, j, destrank; MPI_Comm CommDeuce; MPI_Win win; MPI_Datatype column, xpose; MPI_Group comm_group, group; - 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"); @@ -35,15 +35,15 @@ int main(int argc, char *argv[]) MPI_Comm_split(MPI_COMM_WORLD, (rank < 2), rank, &CommDeuce); - if (rank < 2) - { + if (rank < 2) { MPI_Comm_group(CommDeuce, &comm_group); - if (rank == 0) - { - for (i=0; i= 50) - { + if (errs >= 50) { printf("Total number of errors: %d\n", errs); } +#ifndef USE_WIN_ALLOCATE + MPI_Free_mem(A); +#endif } MPI_Group_free(&group); @@ -102,6 +115,6 @@ int main(int argc, char *argv[]) } MPI_Comm_free(&CommDeuce); MTest_Finalize(errs); - MPI_Finalize(); - return 0; -} + MPI_Finalize(); + return 0; +}