[MPI] MPI_Sendrecv 函数

函数

函数说明: http://www.ualberta.ca/AICT/RESEARCH/LinuxClusters/doc/mpich2/www3/MPI_Sendrecv.html

Sends and receives a message
Synopsis

int MPI_Sendrecv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
                int dest, int sendtag,
                void *recvbuf, int recvcount, MPI_Datatype recvtype,
                int source, int recvtag,
                MPI_Comm comm, MPI_Status *status)

Input Parameters

sendbuf

      initial address of send buffer (choice)

sendcount

      number of elements in send buffer (integer)

sendtype

      type of elements in send buffer (handle)

dest

     rank of destination (integer)

sendtag

      send tag (integer)

recvcount

      number of elements in receive buffer (integer)

recvtype
type of elements in receive buffer (handle)
source
rank of source (integer)
recvtag
receive tag (integer)
comm
communicator (handle)


Output Parameters

recvbuf
initial address of receive buffer (choice)
status
status object (Status). This refers to the receive operation.

 

程序例子

http://applesun0757.blog.163.com/blog/static/1873741922012919103647254/

posted on 2012-11-10 22:08  applesun0757  阅读(484)  评论(0)    收藏  举报