我对MPI很陌生,对不同节点的CPU之间的数据通信有些困惑。当cpus位于不同的节点时,它们之间如何进行数据通信?
例如,我希望将数据从一次发送和重新记录到其他:
MPI_Send(
void* data, // This is a pointer that cpu-1 in Node-1 want to sent to cpu-2 in node-2,
int count,
MPI_Datatype datatype,
int destination,
int tag,
MPI_Comm communicator)
MPI_Recv(
void* data, // I receive the pointer from Node-1, but this pointer corresponds to different memory in Node-2. How does this work?
int count,
MPI_Datatype datatype,
int source,
int tag,
MPI_Comm communicator,
MPI_Status* status)发布于 2022-09-13 11:20:32
MPI是在20世纪90年代早期编写的,当时核心概念并不存在。因此,进程总是位于不同的节点上。MPI例程上的第一个实现可能使用Unix套接字通过以太网电缆发送数据。当前的实现使用系统提供的任何网络库,这些库可以通过Infiniband或以太网或其他任何东西。
https://stackoverflow.com/questions/73695768
复制相似问题