Add MPI code to perform reduction.
Merge branch 'master', remote-tracking branch 'origin/master'