X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d65d1121602ae06e7c9854a07099aaaa60f40bbd..1c6dad0f88954f0497ed2ae336790f663b2fa35e:/examples/smpi/reduce.c diff --git a/examples/smpi/reduce.c b/examples/smpi/reduce.c index 85bfa1ee4b..2946edc930 100644 --- a/examples/smpi/reduce.c +++ b/examples/smpi/reduce.c @@ -43,8 +43,8 @@ static int ibm_test(int rank, int size) if (rank == root) { for (k = 0; k < j; k++) { if (in[k] != k * size) { - printf("bad answer (%d) at index %d of %d (should be %d)", in[k], k, - j, k * size); + printf("bad answer (%d) at index %d of %d (should be %d)", in[k], + k, j, k * size); success = 0; break; } @@ -79,9 +79,10 @@ int main(int argc, char **argv) value = rank + 1; /* easy to verify that sum= (size*(size+1))/2; */ - printf("[%d] has value %d\n", rank, value); + //printf("[%d] has value %d\n", rank, value); MPI_Reduce(&value, &sum, 1, MPI_INT, MPI_SUM, root, MPI_COMM_WORLD); - MPI_Reduce(&value, &sum_mirror, 1, MPI_INT, MPI_SUM, root, MPI_COMM_WORLD); + MPI_Reduce(&value, &sum_mirror, 1, MPI_INT, MPI_SUM, root, + MPI_COMM_WORLD); MPI_Reduce(&value, &min, 1, MPI_INT, MPI_MIN, root, MPI_COMM_WORLD); MPI_Reduce(&value, &max, 1, MPI_INT, MPI_MAX, root, MPI_COMM_WORLD);