Blocking Send and Receive Syntax
There is one blocking SEND routine for each of the four communication modes.
Communication Mode | Blocking Send Routines |
---|---|
Synchronous | MPI_Ssend |
Buffered | MPI_Bsend |
Ready | MPI_Rsend |
Standard | MPI_Send |
Regardless of communication mode, the send commands share the same syntax. In this section we'll take a quick look at the signature for these commands and review what the parameters mean. For a more in depth look, please refer to the MPI messages topic.
C:
Fortran:
Functional description of MPI_Send and Recv parameters.
- buf
- The beginning of the buffer containing the data to be sent. For Fortran, this is often the name of an array in your program. For C, it is an address.
- count
- The number of elements to be sent (not bytes).
- datatype
- The type of data, either a predefined MPI_Datatype or user-defined derivative type.
- dest or source
- The beginning of the buffer containing the data to be sent. For Fortran, this is often the name of an array in your program. For C, it is an address.
- tag
- The beginning of the buffer containing the data to be sent. For Fortran, this is often the name of an array in your program. For C, it is an address.
- comm
- The communicator id
- ierror
- The returned error code (Fortran only—in C, check the function's return value)
- status
- The array or structure of information that is returned. For example, if you specify a wildcard for source or tag, the status will tell you the actual rank or tag for the message received.