Mpi4py allreduce example. ones(1, dtype=bool) if rank % 2 == 0 else numpy.