mpi integration with MPI_Reduce