Fix MPI Error

Send and receive buffers of MPI_Allreduce may not overlap.