Changes to use collective operation MPI_REDUCE to collect results