<filename>docker/base/installation/source/mpi4py/sendrecv3.py
#!/usr/bin/env python
# sendrecv3.py
from mpi4py import MPI
comm = MPI.COMM_WORLD
rank = comm.Get_rank()
if rank == 0:
    data = [1,2,3,4]
    comm.send(data, dest=1, tag=11)
elif rank == 1:
    data = comm.recv(source=0, tag=11)
    print(data)
<filename>docker/base/installation/source/mpi4py/sendrecv3.py
#!/usr/bin/env python
# sendrecv3.py
from mpi4py import MPI
comm = MPI.COMM_WORLD
rank = comm.Get_rank()
if rank == 0:
    data = [1,2,3,4]
    comm.send(data, dest=1, tag=11)
elif rank == 1:
    data = comm.recv(source=0, tag=11)
    print(data)
#!/usr/bin/env python # sendrecv3.py