change MPI_Allreduce -> MPI_Reduce