X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/19b3962253112b19308537bc2400de141c119d99..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 6299336122..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,43 +16,66 @@ int main( int argc, char **argv ) { - int err = 0; - int toterr; - int size; - int rank; - int i; - MPI_Comm comm; - - MPI_Init( &argc, &argv ); - comm = MPI_COMM_WORLD; - - MPI_Comm_size( comm, &size ); - MPI_Comm_rank( comm, &rank ); - int* sendbuf = (int *) malloc( size * sizeof(int) ); - for (i=0; i