integer message !第一个参量是我们想要发送的数据 integercount!第二个参量是我们想要发送数据的数量 MPI_Datatype datatype !The MPI-specific data type being passed through the array. integer dest !第四个参数用来说明我们要向哪一个线程发送数据 integer tag !这是一个消息标签 MPI_Comm comm !The MPI Communicator handle. integer ierror !An error handling variable.
MPI_RECV
1 2 3 4 5 6 7 8
integer message: !第一个是我们要接受的数据 integercount: !第二个参量是要接受数据的个数 MPI_Datatype datatype: !The MP-specific data type being passed through the array. integer from: !第四个参数用来明确接受的数据是从哪一个线程发送过来的 integer tag: !这是一个消息标签 MPI_Comm comm: !The MPI Communicator handle. MPI_Status* status: !Status object. integer ierror !An error handling variable.
integer send_Var !要分发的数据 integer send_Count !分发数据的数量 MPI_Datatype send_Type !MPI Datatype of the data that is scattered. integer recv_Var !Variable that will store the scattered data. integer recv_Count !每个线程要结束的数据的个数 MPI_Datatype recv_Type !MPI Datatype of the data that will be received. integer root_Process !执行数据分发的线程号 MPI_Comm comm !The MPI_Communicator. integer ierror !An error handling variable.
MPI_Gather
1 2 3 4 5 6 7 8 9
integer send_Var !Variable storing the value that will be sent. integer send_Count !接受数据的数量 MPI_Datatype send_Type !MPI Datatype of the data that is sent. integer recv_Var !Variable that will store the gathered data. integer recv_Count !从每个线程中接受数据的数量 MPI_Datatype recv_Type !MPI Datatype of the data that will be received. integer root_Process !收集数据所对应的线程号,也就是让那个线程来收集数据 MPI_Comm comm !The MPI_Communicator. integer ierror !An error handling variable.