gpt4 book ai didi

c - 从 MPI_Recv 接收到的标签存储在 MPI 中的哪里?

转载 作者:行者123 更新时间:2023-12-02 13:56:11 25 4
gpt4 key购买 nike

在MPI_Recv中,如果我们使用MPI_ANY_TAG接收数据,那么MPI_ANY_TAG中的标签的实际值存储在哪里?是刚刚丢失还是可以使用?

最佳答案

标记的实际值存储在MPI_Recv()status 参数中。摘要来自MPI standard , 3.2.5 返回状态,第 60 页:

In C, status is a structure that contains three fields named MPI_SOURCE, MPI_TAG, and MPI_ERROR ; the structure may contain additional fields. Thus, status.MPI_SOURCE, status.MPI_TAG and status.MPI_ERROR contain the source, tag, and error code, respectively, of the received message.

Here是如何使用 status 参数的示例。

因此,它没有丢失,您可以使用它!

关于c - 从 MPI_Recv 接收到的标签存储在 MPI 中的哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26943522/

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