[Numpy-discussion] MPI: Sendrecv blocks
Florian Lindner
mailinglists at xgm.de
Wed May 27 10:15:55 EDT 2015
Hello,
I have this piece of code:
comm = MPI.COMM_WORLD
temp = np.zeros(blockSize*blockSize)
PrintNB("Communicate A to", get_left_rank())
comm.Sendrecv(sendbuf=np.ascontiguousarray(lA), dest=get_left_rank(),
recvbuf=temp)
lA = np.reshape(temp, (blockSize, blockSize))
PrintNB("Finished sending")
lA being a numpy array. Output is:
[0] Communicate A to 1
[2] Communicate A to 3
[3] Communicate A to 2
[1] Communicate A to 0
[1] Finished sending
# here it blocks
[n] is the rank. I have a circular send. 0>1, 1>0 and 2>3, 3>2. I understood
Sendrec so that it is made specifically for these cases, but still it
blocks.
What is the problem here?
Thanks!
Florian
More information about the NumPy-Discussion
mailing list