Receive multiple send commands using mpi4py
问题 How can I modify the following code (adapted from http://materials.jeremybejarano.com/MPIwithPython/pointToPoint.html) so that every comm.Send instance is received by root = 0 and the output printed. At the moment, only the first send command is received. #passRandomDraw.py import numpy from mpi4py import MPI from mpi4py.MPI import ANY_SOURCE import numpy as np comm = MPI.COMM_WORLD rank = comm.Get_rank() if rank == 0: randNum = numpy.zeros(1) print "Process before receiving random numbers"