Send-Receive
[Point-to-Point Communication]

Collaboration diagram for Send-Receive:

Detailed Description

The send-receive operations combine in one call the sending of a message to one destination and the receiving of another message, from another process.

A message sent by a send-receive operation can be received by a regular receive operation or probed by a probe operation; a send-receive operation can receive a message sent by a regular send operation.


Functions

int MOC_Sendrecv (void *sendbuf, int sendcount, MOC_Datatype sendtype, int dest, int sendtag, void *recvbuf, int recvcount, MOC_Datatype recvtype, int source, int recvtag, MOC_Comm comm, MOC_Status *status)
 Execute a blocking send and receive operation.
int MOC_Sendrecv_replace (void *buf, int count, MOC_Datatype datatype, int dest, int sendtag, int source, int recvtag, MOC_Comm comm, MOC_Status *status)
 Execute a blocking send and receive.


Function Documentation

int MOC_Sendrecv ( void *  sendbuf,
int  sendcount,
MOC_Datatype  sendtype,
int  dest,
int  sendtag,
void *  recvbuf,
int  recvcount,
MOC_Datatype  recvtype,
int  source,
int  recvtag,
MOC_Comm  comm,
MOC_Status *  status 
)

Execute a blocking send and receive operation.

Both send and receive use the same communicator, but possibly different tags. The send buffer and receive buffers may be disjoint, and may have different lengths and datatypes.

Parameters:
sendbuf in Pointer to buffer where data is stored
sendcount in Number of elements to be send (not equal to actual byte-value)
sendtype in Type of elements to be send
dest in Rank of receiving process
sendtag in Tag of message to be send
recvbuf inout Buffer into which data should be stored
recvcount in Number of elements in receive buffer (not equal to actual byte-value)
recvtype in Datatype of each receive buffer element
source in Rank of source
recvtag in Tag of message to be received
comm in Communicator of message
status inout Object holding status-information (has to be allocated by user)
Return values:
MOC_SUCCESS No error; MPI routine completed successfully.
... error-code

Definition at line 3 of file moc_send_recv.c.

References MOC_Recv(), and MOC_Send().

Here is the call graph for this function:

int MOC_Sendrecv_replace ( void *  buf,
int  count,
MOC_Datatype  datatype,
int  dest,
int  sendtag,
int  source,
int  recvtag,
MOC_Comm  comm,
MOC_Status *  status 
)

Execute a blocking send and receive.

The same buffer is used both for the send and for the receive, so that the message sent is replaced by the message received.

Parameters:
buf inout Pointer to buffer
count in Number of elements (not equal to actual byte-value)
datatype in Type of elements
dest in Rank of receiving process
sendtag in Tag of message to be send
source in Rank of source
recvtag in Tag of message to be received
comm in Communicator of message
status inout Object holding status-information (has to be allocated by user)
Return values:
MOC_SUCCESS No error; MPI routine completed successfully.
... error-code

Definition at line 3 of file moc_send_recv_replace.c.

References MOC_Recv(), and MOC_Send().

Here is the call graph for this function:


Generated on Thu Feb 12 13:50:53 2009 for MPI On Cell (Documentation) by  doxygen 1.5.6