【发布时间】:2014-01-04 09:42:35
【问题描述】:
我正在尝试使用 MPI 发送和接收字符串,但结果毫无希望。
发送功能:
MPI_Send(&result, result.size(), MPI_CHAR, 0, 0, MPI_COMM_WORLD);
还有recv函数:
MPI_Recv(&result, /* message buffer */
128, /* one data item */
MPI_CHAR, /* of type char real */
MPI_ANY_SOURCE, /* receive from any sender */
MPI_ANY_TAG, /* any type of message */
MPI_COMM_WORLD, /* default communicator */
&status); /* info about the received message */
其中 result 是一个字符串。
我没有收到任何错误,但程序不想完成。
【问题讨论】: