MPI_Ssend/MPI_Issend 是否使用系统缓冲区?

Does MPI_Ssend/MPI_Issend use a system buffer?

根据文档,MPI_SsendMPI_Issend 是阻塞和非阻塞发送操作,两者都是同步的。 MPI 规范说,当接收方开始接收消息时,同步 发送完成,之后可以安全地更新发送缓冲区:

The functions MPI_WAIT and MPI_TEST are used to complete a nonblocking communication. The completion of a send operation indicates that the sender is now free to update the locations in the send buffer (the send operation itself leaves the content of the send buffer unchanged). It does not indicate that the message has been received, rather, it may have been buffered by the communication subsystem. However, if a synchronous mode send was used, the completion of the send operation indicates that a matching receive was initiated, and that the message will eventually be received by this matching receive.

请记住,同步发送在刚开始接收时被认为已完成,我不确定以下内容:

MPI_Ssend()(或与 MPI_Issend() 相关的 MPI_Wait())returns 当 :

  1. 接收方已开始接收消息
  2. 发送缓冲区可以重复使用

如果消息被完全接收,或者 MPI 库在本地缓冲数据,则满足第二个条件。

我没有读到 MPI 标准禁止数据缓冲。

来自标准,MPI 3.1 chpt 3.4 第 37 页

A send that uses the synchronous mode can be started whether or not a matching receive was posted. However, the send will complete successfully only if a matching receive is posted, and the receive operation has started to receive the message sent by the synchronous send. Thus, the completion of a synchronous send not only indicates that the send buffer can be reused, but it also indicates that the receiver has reached a certain point in its execution, namely that it has started executing the matching receive. If both sends and receives are blocking operations then the use of the synchronous mode provides synchronous communication semantics: a communication does not complete at either end before both processes rendezvous at the communication. A send executed in this mode is non-local.