X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/877c773a694a049fc8b926ac126ad776ab257f3d..84402e8e2ee2a2d0bef25fdceb0a263ed8b471f6:/teshsuite/smpi/coll-reduce-scatter/coll-reduce-scatter.c diff --git a/teshsuite/smpi/coll-reduce-scatter/coll-reduce-scatter.c b/teshsuite/smpi/coll-reduce-scatter/coll-reduce-scatter.c index 3bf3d91930..2789562836 100644 --- a/teshsuite/smpi/coll-reduce-scatter/coll-reduce-scatter.c +++ b/teshsuite/smpi/coll-reduce-scatter/coll-reduce-scatter.c @@ -1,10 +1,10 @@ -/* Copyright (c) 2013-2014. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2013-2020. The SimGrid Team. + * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -/* +/* * Test of reduce scatter. * Each processor contributes its rank + the index to the reduction, then receives the ith sum * Can be called with any number of processors. @@ -16,41 +16,66 @@ int main( int argc, char **argv ) { - int err = 0, toterr; - int *sendbuf, *recvbuf, *recvcounts; - int size, rank, i, sumval; - MPI_Comm comm; - - 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