MPI Asynchronous send/receive
Non-blocking send and receive calls are available:
mpi_isend(buf,count,datatype,dest,tag,comm,req,ierr)
mpi_irecv(buf,count,datatype,dest,tag,comm,req,ierr)
buf,count,datatype message content
dest,tag,comm message envelope
req integer holding the request id
the asynchronous call returns the request-id after registering the buffer . The request id can be used in the probe and wait calls:
mpi_wait(req,stat,ierr)
- blocks until the MPI send or receive with req request-id completes
mpi_waitall(count,array-of-req,array-of-stat,ierr)
- waits for all given communications to complete (a blocking call)
- the (array-of-)stat can be probed for items received. The data can be retrieved with the recv call (or irecv call, or any other variety receive)
-
NOTE: although this interface announces asynchronous communication, the actual copy of buffers happens only at the time of the receive and wait calls