c - MPI_Isend request parameter -
when using mpi_isend, can mpi_request parameter null pointer (when sender doesn't care message after sent)?
short answer no - request handle parameter cannot null.
mpi_isend() initiates asynchronous send operation. asynchronous operations given request handle has acted on later in 1 of following ways:
- block , wait operation finish
mpi_wait(), friends - test operation completion
mpi_test(), friends until test turns out positive - free handle
mpi_request_free()
both waiting , testing functions free request once has completed. can free after returned mpi_isend(). not cancel operation rather mark request deletion finished. won't able status of send operation though.
if don't care outcome of asynchronous operation (e.g. completion status, message receive status, error code, etc.), right thing follows:
mpi_request req; ... mpi_isend(..., &req); mpi_request_free(&req); ... caveat: works asynchronous sends since 1 can devise method verify send operation has completed, e.g. destination process might respond after receiving message. 1 should never free asynchronous receive request , should wait or test completion instead there no way know when operation has been completed.
Comments
Post a Comment