madmpi: fix MPI_Reduce_scatter
Hi,
MPI_Reduce_scatter
has a bug, discovered while executing this example (line 42 of the example is wrong, but that's another story...).
Compare the result with MadMPI:
[MPI process 0] The sum I received is 12.
[MPI process 1] The sum I received are 18 and 21.
[MPI process 2] The sum I received is 18.
and with OpenMPI:
[MPI process 0] The sum I received is 12.
[MPI process 1] The sum I received are 15 and 18.
[MPI process 2] The sum I received is 21.
With MadMPI, process 1 receives 18 and 21 while it should receive 15 and 21.
This MR fixes this bug.