boost mpi等效于status.mpi\u源
是否存在与以下C MPI代码等价的boost mpi等效于status.mpi\u源,mpi,boost-mpi,Mpi,Boost Mpi,是否存在与以下C MPI代码等价的boost::MPI?我正在尝试移植以下标准MPI代码,这是一个基本的主从模板。根据boost mpi文档,对于mpi_发送或mpi_recv秩、标记和缓冲区,只有3个参数 while (work != NULL) { /* Receive results from a slave */ MPI_Recv(&result, /* message buffer */ 1,
boost::MPI
?我正在尝试移植以下标准MPI代码,这是一个基本的主从模板。根据boost mpi文档,对于mpi_发送或mpi_recv秩、标记和缓冲区,只有3个参数
while (work != NULL) {
/* Receive results from a slave */
MPI_Recv(&result, /* message buffer */
1, /* one data item */
MPI_INT, /* of type double 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 */
/* Send the slave a new work unit */
MPI_Send(&work, /* message buffer */
1, /* one data item */
MPI_INT, /* data item is an integer */
status.MPI_SOURCE, /* to who we just received from */
WORKTAG, /* user chosen message tag */
MPI_COMM_WORLD); /* default communicator */
/* Get the next unit of work to be done */
work = get_next_work_item();
}
从:
变为MPI\u任意源
ANY\u源
变为MPI\u任意标签
ANY\u标签
communicator::recv()
方法返回类的实例,该类提供您所需的所有信息:
由status.MPI\u SOURCE
status::SOURCE()返回
由status.MPI\u标记
status::TAG()返回
MPI\u状态
结构