X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c57842fe897f53b46f0be3da87f7c996674be7d6..90f50bba185f1c86225aa498dcc3a01c9080b52b:/teshsuite/smpi/mpich3-test/coll/redscat3.c diff --git a/teshsuite/smpi/mpich3-test/coll/redscat3.c b/teshsuite/smpi/mpich3-test/coll/redscat3.c index 3ebf0bed36..42474d3618 100644 --- a/teshsuite/smpi/mpich3-test/coll/redscat3.c +++ b/teshsuite/smpi/mpich3-test/coll/redscat3.c @@ -3,11 +3,11 @@ * (C) 2010 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ -/* +/* * Test of reduce scatter with large data (needed in MPICH to trigger the * long-data algorithm) * - * 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. @@ -17,101 +17,90 @@ #include #include #include "mpitest.h" +#include "mpicolltest.h" /* Limit the number of error reports */ #define MAX_ERRORS 10 -int main( int argc, char **argv ) +int main(int argc, char **argv) { - int err = 0; - int *sendbuf, *recvbuf, *recvcounts; - int size, rank, i, j, idx, mycount, sumval; + int err = 0; + int *sendbuf, *recvbuf, *recvcounts; + int size, rank, i, j, idx, mycount, sumval; MPI_Comm comm; - MTest_Init( &argc, &argv ); + MTest_Init(&argc, &argv); comm = MPI_COMM_WORLD; - MPI_Comm_size( comm, &size ); - MPI_Comm_rank( comm, &rank ); - recvcounts = (int *)malloc( size * sizeof(int) ); + MPI_Comm_size(comm, &size); + MPI_Comm_rank(comm, &rank); + recvcounts = (int *) malloc(size * sizeof(int)); if (!recvcounts) { - fprintf( stderr, "Could not allocate %d ints for recvcounts\n", - size ); - MPI_Abort( MPI_COMM_WORLD, 1 ); - exit(1); + fprintf(stderr, "Could not allocate %d ints for recvcounts\n", size); + MPI_Abort(MPI_COMM_WORLD, 1); } mycount = (1024 * 1024) / size; - for (i=0; i