X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/aac4ba41ea27fe8168bebed009abebd7e5c3f006..4cdc0f888550cbaefe6094ae801230336d005337:/teshsuite/smpi/mpich3-test/rma/test3.c diff --git a/teshsuite/smpi/mpich3-test/rma/test3.c b/teshsuite/smpi/mpich3-test/rma/test3.c index 06dd53b8a9..fcff72b640 100644 --- a/teshsuite/smpi/mpich3-test/rma/test3.c +++ b/teshsuite/smpi/mpich3-test/rma/test3.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 "stdlib.h" #include "mpitest.h" @@ -18,17 +18,17 @@ #define SIZE 1048576 -int main(int argc, char *argv[]) -{ +int main(int argc, char *argv[]) +{ int rank, destrank, nprocs, *A, *B, i; MPI_Comm CommDeuce; MPI_Group comm_group, group; MPI_Win win; 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"); @@ -37,64 +37,88 @@ int main(int argc, char *argv[]) MPI_Comm_split(MPI_COMM_WORLD, (rank < 2), rank, &CommDeuce); - if (rank < 2) - { + if (rank < 2) { A = (int *) malloc(SIZE * sizeof(int)); if (!A) { printf("Can't allocate memory in test program\n"); MPI_Abort(MPI_COMM_WORLD, 1); } - B = (int *) malloc(SIZE * sizeof(int)); - if (!B) { - printf("Can't allocate memory in test program\n"); - MPI_Abort(MPI_COMM_WORLD, 1); - } MPI_Comm_group(CommDeuce, &comm_group); if (rank == 0) { - for (i=0; i