消息发送函数:
原型为 int MPI_Send(void *buf, int count, MPI_Datatype datatype, int goal, int tag, MPI_Comm comm)
参数意义:buf为消息的地址,count是内容的数量,datatype为消息内容的数据类型,goal为目标进程编号,tag为消息的标志,comm为通信域。
此函数将buf里的count个类型为datatype的数据发送到进程编号为goal的接收函数里,标志为goal,通信域通常为MPI_COMM_WORLD
消息接收函数:
原型为int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm,MP