开发者

Receiving data from any host in MPI

开发者 https://www.devze.com 2023-04-04 02:59 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号