gpt4 book ai didi

c - 非阻塞点对点通信中发送模式对 MPI 开销的影响

转载 作者:行者123 更新时间:2023-11-30 16:45:27 26 4
gpt4 key购买 nike

我想确定 MPI 中非阻塞点对点通信的开销。有一些可用的基准(如 Sandia MPI Micro-Benchmark SuiteOSU micro-benchmarks ),但由于某种原因,它们不区分 MPI 提供的发送模式(标准、就绪、缓冲、同步),并且仅使用标准模式。 MPI 报告指出

In this mode, it is up to MPI to decide whether outgoing messages will be buffered. MPI may buffer outgoing messages. In such a case, the send call may complete before a matching receive is invoked. On the other hand, buffer space may be unavailable, or MPI may choose not to buffer outgoing messages, for performance reasons. In this case, the send call will not complete until a matching receive has been posted, and the data has been moved to the receiver.

我假设将消息写入缓冲区可能与直接将消息发送到接收器(接收器可能在物理上很远,通过低带宽连接等连接)具有不同的性能。所以我的问题是,我的假设是否错误,缓冲发送和就绪发送之间从来没有任何显着的性能差异(如果是,为什么) - 或者这些基准是否只是忽略这些可能的差异(如果是,为什么) .

最佳答案

您的理解是正确的,缓冲和无缓冲发送的性能可能不同。如果您调用MPI_Send,MPI 实现可以根据消息大小、系统架构、网络速度和许多其他变量来选择使用哪种机制。一般来说,小消息使用缓冲发送,大消息使用同步发送。

recommended MPI 应用程序开发人员坚持使用 MPI_Send 并依靠 MPI 实现来提供最佳性能。因此,大多数 MPI 基准测试还报告 MPI_Send 的性能,而不是其他不常用的模式。

关于c - 非阻塞点对点通信中发送模式对 MPI 开销的影响,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44098567/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com