I used MPI_Irecv
to recieve data from a certain host in MPI. By using "rank of source" in the input parameters of the function, I have to define 开发者_JAVA百科which host I want to receive data from. But it is not important which host sent data to me, I just want to take data. How can I take data without defining the rank of sender?
I guess that I can make a loop which scan all "ranks" but is there any much simpler method that can take data whichever its sender is?
Thanks!
You can use the MPI_ANY_SOURCE rank which, in the various recv/probe functions, makes them accept a message from anyone.
精彩评论