After #1 is done, combine patterns to implement MPI_Allreduce simulation. Both tree-up-and-down and recursive doubling patterns.