X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e7c0c67af63b3979a597a66e5e1c8b0435fc6e19..e1e50fa3f7c4b7b6bcb94dba4d4032f4d69260b9:/src/smpi/colls/allreduce-lr.c diff --git a/src/smpi/colls/allreduce-lr.c b/src/smpi/colls/allreduce-lr.c index a7f733690c..81cb39210c 100644 --- a/src/smpi/colls/allreduce-lr.c +++ b/src/smpi/colls/allreduce-lr.c @@ -39,12 +39,12 @@ smpi_coll_tuned_allreduce_lr(void *sbuf, void *rbuf, int rcount, /* when communication size is not divisible by number of process: call the native implementation for the remain chunk at the end of the operation */ - else if (rcount % size != 0) { + if (rcount % size != 0) { remainder = rcount % size; remainder_flag = 1; remainder_offset = (rcount / size) * size * extent; } else { - remainder_flag = remainder_offset = 0; + remainder = remainder_flag = remainder_offset = 0; } /* size of each point-to-point communication is equal to the size of the whole message @@ -75,7 +75,7 @@ smpi_coll_tuned_allreduce_lr(void *sbuf, void *rbuf, int rcount, ((rank + size - 1) % size), tag + i, comm, &status); // compute result to rbuf+recv_offset - star_reduction(op, (char *) sbuf + recv_offset, (char *) rbuf + recv_offset, + smpi_op_apply(op, (char *) sbuf + recv_offset, (char *) rbuf + recv_offset, &count, &dtype); }