了解mpi_irsend()的功能
根据此文档页面: https://www.rookiehpc.com/mpi/docs/mpi_irsend.php#:~: text = definition,bovirst =
“实际上,MPI_IRSEND要求首先发出相应的接收(MPI_RECV或MPI_IRECV)。”
这是否意味着MPI_IRSEND的工作非常类似于阻止例程?谢谢。
according to this documentation page: https://www.rookiehpc.com/mpi/docs/mpi_irsend.php#:~:text=Definition,to%20have%20been%20issued%20first.
"Indeed, MPI_Irsend requires the corresponding receive (MPI_Recv or MPI_Irecv) to have been issued first."
Does this mean that MPI_Irsend works pretty much like a blocking routine? Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
例程名称中的
i
表明它是非阻滞。您将获得一个请求对象,如果转移已完成,则可以从请求对象中查询。“准备就绪”部分意味着当您致电时,您保证已发布发送的部分,因此MPI可以跳过一些握手。
我了解你的困惑。通常,您会使用非障碍接收,以便如果发送过程滞后,则没有空闲时间。为什么不知道发送过程已经准备就绪,为什么要进行非阻滞的准备发送?好吧,也许您想发布多个,并且您知道所有发送已发布,但是您想独立于数据到达的顺序。也许传输数据很慢,您想与通信重叠。
也就是说,我一直认为这种例程的存在更多是因为设计的正交性提出了这一点,而不是有令人信服的用例。
The
I
in the routine name indicates that it is non-blocking. You get a request object, and from the request object you can query if the transfer has been completed.The "ready" part means that when you call this, you guarantee that the send has been posted, so MPI can skip some of the handshake overhead.
I understand your confusion. Normally you would use a non-blocking receive so that you don't have idle time if the sending process is lagging. Why then a non-blocking ready send, where you know that the sending process is ready? Well, maybe you want to post more than one, and you know that all the sends have been posted, but you want to be independent of the order in which data arrives. Maybe transferring the data is slow and you want to overlap with communication.
That said, I always figured that this routine exists more because orthogonality of design suggests it, rather than that there are compelling use cases for it.