X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d0ffc37686edcc803601f76ab51fdfed5fc2f241..4b50558aabf14cf248cc681c265b43bb1ab9cf3d:/teshsuite/smpi/mpich3-test/coll/redscat.c diff --git a/teshsuite/smpi/mpich3-test/coll/redscat.c b/teshsuite/smpi/mpich3-test/coll/redscat.c index 9214c5df5f..bfa2987b6e 100644 --- a/teshsuite/smpi/mpich3-test/coll/redscat.c +++ b/teshsuite/smpi/mpich3-test/coll/redscat.c @@ -3,10 +3,10 @@ * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ -/* +/* * Test of reduce scatter. * - * Each processor contributes its rank + the index to the reduction, + * Each processor contributes its rank + the index to the reduction, * then receives the ith sum * * Can be called with any number of processors. @@ -15,42 +15,46 @@ #include "mpi.h" #include #include +#include "mpicolltest.h" -int main( int argc, char **argv ) +int main(int argc, char **argv) { - int err = 0, toterr; - int *sendbuf, recvbuf, *recvcounts; - int size, rank, i, sumval; + int err = 0, toterr; + int *sendbuf, recvbuf, *recvcounts; + int size, rank, i, sumval; MPI_Comm comm; - MPI_Init( &argc, &argv ); + MPI_Init(&argc, &argv); comm = MPI_COMM_WORLD; - MPI_Comm_size( comm, &size ); - MPI_Comm_rank( comm, &rank ); - sendbuf = (int *) malloc( size * sizeof(int) ); - for (i=0; i