我正在尝试使用MPI发送和接收字符串,但结果是无跳的.
发送功能:
MPI_Send(&result, result.size(), MPI_CHAR, 0, 0, MPI_COMM_WORLD);
Run Code Online (Sandbox Code Playgroud)
和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 */
Run Code Online (Sandbox Code Playgroud)
结果是字符串.
我没有得到任何错误,但程序不想完成.