from mpi4py import MPI
import numpy as np

comm = MPI.COMM_WORLD
rank = comm.Get_rank()
if rank is 0:
    data = np.array([2,2,3,4], dtype='int')
else:
    data = np.zeros(4, dtype='int')

comm.Bcast([data,MPI.INT], root=0)
print("bcast", rank, data)


