| MPI Point to Point Communication Calls: C and Fortran Syntax |
buf: starting address of message buffer (IN)
count: number of elements in message (IN)
datatype: type of elements in message (IN)
dest: rank of destination task in communicator comm (IN)
tag: message tag (IN)
comm: communicator (IN)
ierror: error code (OUT)
C
int MPI_Ssend (void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm)
Fortran
MPI_Ssend (buf, count, datatype, dest, tag, comm, ierror)
<type> buf(*)
integer count, datatype, dest, tag, comm, ierror
C
int MPI_Rsend (void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm)
Fortran
MPI_Rsend (buf, count, datatype, dest, tag, comm, ierror)
<type> buf(*)
integer count, datatype, dest, tag, comm, ierror
C
int MPI_Bsend (void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm)
Fortran
MPI_Bsend (buf, count, datatype, dest, tag, comm, ierror)
<type> buf(*)
integer count, datatype, dest, tag, comm, ierror
C
int MPI_Send (void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm)
Fortran
MPI_Send (buf, count, datatype, dest, tag, comm, ierror)
<type> buf(*)
integer count, datatype, dest, tag, comm, ierror
buf: starting address of message buffer (OUT-buffer contents written)
count: number of elements in message (IN)
datatype: type of elements in message (IN)
source: rank of source task in communicator comm (IN)
tag: message tag (IN)
comm: communicator (IN)
status: status of communication event (OUT)
ierror: error code (OUT)
int MPI_Recv (void* buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status status)
MPI_Recv (buf, count, datatype, source, tag, comm, status, ierror)
<type> buf(*)
integer count, datatype, source, tag, comm, status(MPI_STATUS_SIZE), ierror
buf: starting address of message buffer (IN)
count: number of elements in message (IN)
datatype: type of elements in message (IN)
dest: rank of destination task in communicator comm (IN)
tag: message tag (IN)
comm: communicator (IN)
request: identifies a communication event (OUT)
ierror: error code (OUT)
C
int MPI_Issend (void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request)
Fortran
MPI_Issend (buf, count, datatype, dest, tag, comm, request, ierror)
<type> buf(*)
integer count, datatype, dest, tag, comm, request, ierror
C
int MPI_Irsend (void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request)
Fortran
MPI_Irsend (buf, count, datatype, dest, tag, comm, request, ierror)
<type> buf(*)
integer count, datatype, dest, tag, comm, request, ierror
C
int MPI_Ibsend (void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request)
Fortran
MPI_Ibsend (buf, count, datatype, dest, tag, comm, request, ierror)
<type> buf(*)
integer count, datatype, dest, tag, comm, request, ierror
C
int MPI_Isend (void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request)
Fortran
MPI_Isend (buf, count, datatype, dest, tag, comm, request, ierror)
<type> buf(*)
integer count, datatype, dest, tag, comm, request, ierror
buf: starting address of message buffer (OUT-buffer contents written)
count: number of elements in message (IN)
datatype: type of elements in message (IN)
source: rank of source task in communicator comm (IN)
tag: message tag (IN)
comm: communicator (IN)
request: identifies a communication event (OUT)
ierror: error code (OUT)
int MPI_Irecv (void* buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request)
MPI_Irecv (buf, count, datatype, source, tag, comm, request, ierror)
<type> buf(*)
integer count, datatype, source, tag, comm, request, ierror
Argument Definitions
buf: starting address of user-supplied buffer (IN)
size: number of bytes in user supplied buffer (IN)
ierror: error code (OUT)
C
int MPI_Buffer_attach (void* buf, int size)
Fortran
MPI_Buffer_attach (buf, size, ierror)
<type> buf(*)
integer size, ierror
Argument Definitions
buf: starting address of user-supplied buffer (OUT)
size: number of bytes in user supplied buffer (OUT)
ierror: error code (OUT)
C
int MPI_Buffer_detach (void** buf, int* size)
Fortran
MPI_Buffer_detach (buf, size, ierror)
<type> buf(*)
integer size, ierror
request: identifies a communication event (INOUT)
status: status of communication event (OUT)
count: number of communication events (IN)
index: index in array of requests of completed event (OUT)
incount: number of communication events (IN)
outcount: number of completed events (OUT)
ierror: error code (OUT)
int MPI_Wait (MPI_Request *request, MPI_Status *status)
int MPI_Waitall (int count, MPI_Request *array_of_requests, MPI_Status *array_of_statuses)
int MPI_Waitany (int count, MPI_Request *array_of_requests, int *index, MPI_Status *status)
int MPI_Waitsome (int incount, MPI_Request *array_of_requests, int *outcount, int* array_of_indices, MPI_Status *array_of_statuses)
MPI_Wait (request, status, ierror)
integer request, status(MPI_STATUS_SIZE), ierror
MPI_Waitall (count, array_of_requests, array_of_statuses, ierror)
integer count, array_of_requests(*), array_of_statuses(MPI_STATUS_SIZE,*), ierror
MPI_Waitany (count, array_of_requests, index, status, ierror)
integer count, array_of_requests(*), index, status(MPI_STATUS_SIZE), ierror
MPI_Waitsome (incount, array_of_requests, outcount, array_of_indices, array_of_statuses, ierror)
integer incount, array_of_requests(*), outcount, array_of_indices(*), array_of_statuses(MPI_STATUS_SIZE,*), ierror
request: identifies a communication event (INOUT)
flag: TRUE if communication event has completed (OUT)
status: status of communication event (OUT)
count: number of communication events (IN)
index: index in array of requests of completed event (OUT)
incount: number of communication events (IN)
outcount: number of completed events (OUT)
ierror: error code (OUT)
int MPI_Test (MPI_Request *request, int *flag, MPI_Status *status)
int MPI_Testall (int count, MPI_Request *array_of_requests, int *flag, MPI_Status *array_of_statuses)
int MPI_Testany (int count, MPI_Request *array_of_requests, int *index, int *flag, MPI_Status *status)
int MPI_Testsome (int incount, MPI_Request *array_of_requests, int *outcount, int* array_of_indices, MPI_Status *array_of_statuses)
MPI_Test (request, flag, status, ierror)
integer request, status(MPI_STATUS_SIZE), ierror
logical flag
MPI_Testall (count, array_of_requests, flag, array_of_statuses, ierror)
integer count, array_of_requests(*), array_of_statuses(MPI_STATUS_SIZE,*), ierror
logical flag
MPI_Testany (count, array_of_requests, index, flag, status, ierror)
integer count, array_of_requests(*), index, status(MPI_STATUS_SIZE), ierror
logical flag
MPI_Testsome (incount, array_of_requests, outcount, array_of_indices, array_of_statuses, ierror)
integer incount, array_of_requests(*), outcount, array_of_indices(*), array_of_statuses(MPI_STATUS_SIZE,*), ierror
Argument Definitions
sendbuf: starting address of send buffer (IN)
sendcount: number of elements in outgoing message (IN)
sendtype: type of elements in outgoing message (IN)
dest: rank in communicator of destination task (IN)
sendtag: message tag for outgoing communication (IN)
recvbuf: starting address of receive buffer (OUT-buffer contents written)
recvcount: number of elements in incoming message (IN)
recvtype: type of elements in incoming message (IN)
source: rank in communicator of source task (IN)
recvtag: message tag for incoming communication (IN)
comm: communicator (IN)
status: status of communication event (OUT)
buf: starting address of send and receive buffers (INOUT)
ierror: error code (OUT)
C
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)
int MPI_Sendrecv_replace (void *buf, int count, MPI_Datatype datatype, int dest, int sendtag, int source, int recvtag, MPI_Comm comm, MPI_Status *status)
Fortran
MPI_Sendrecv (sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, status, ierror)
<type> sendbuf(*), recvbuf(*)
integer sendcount, sendtype, dest, sendtag, recvcount, recvtype, source, recvtag, comm, status(MPI_STATUS_SIZE), ierror
MPI_Sendrecv_replace (buf, count, datatype, dest, sendtag, source, recvtag, comm, status, ierror)
<type> buf(*)
integer count, datatype, dest, sendtag, source, recvtag, comm, status(MPI_STATUS_SIZE), ierror
Probe
Argument Definitions
source: rank of source task in communicator comm (IN)
tag: message tag (IN)
comm: communicator (IN)
status: status of communication event (OUT)
flag: TRUE if message is available (OUT)
ierror: error code (OUT)
C
int MPI_Probe (int source, int tag, MPI_Comm comm, MPI_Status *status)
int MPI_Iprobe (int source, int tag, MPI_Comm comm, int *flag, MPI_Status *status)
Fortran
MPI_Probe (source, tag, comm, status, ierror)
integer source, tag, comm, status(MPI_STATUS_SIZE), ierror
MPI_Iprobe (source, tag, comm, flag, status, ierror)
integer source, tag, comm, status(MPI_STATUS_SIZE), ierror
logical flag
Status parameters
FORTRAN C
------- -
source: status(MPI_SOURCE) status.MPI_SOURCE
tag: status(MPI_TAG) status.MPI_TAG
error: status(MPI_ERROR) status.MPI_ERROR
Argument Definitions
status: status of communication event (IN)
count: number of elements in message (OUT)
datatype: type of elements in message (IN)
C
int MPI_Get_count (MPI_Status *status, MPI_Datatype datatype, int *count)
Fortran
MPI_Get_count (status, datatype, count, ierror)
integer status(MPI_STATUS_SIZE), datatype, count, ierror
William Gropp, Ewing Lusk and Anthony Skjellum (1999). Using MPI: Portable Parallel Programming with the Message-Passing Interface, Second Edition. The MIT Press, Cambridge, Massachusetts.
Message Passing Interface Forum (1995). MPI: A Message Passing Interface Standard. June 12, 1995. This is the MPI version 1.1 standard. It (and more recent documents) is available from http://www.mpi-forum.org/docs/docs.html.
Marc Snir, Steve Otto, Steven Huss-Lederman, David Walker, and Jack Dongarra (1996). MPI: The Complete Reference. The MIT Press, Cambridge, Massachusetts. This book is basically an elaboration of the standard document. The complete book is available online at http://www.netlib.org/utk/papers/mpi-book/mpi-book.html.
An overall good reference site is http://www-unix.mcs.anl.gov/mpi/index.html.
![]() |
||