An MPI_Request associated with MPI communication functions, such as your MPI_ISend , will be allocated memory and should be cleared to MPI (as opposed to delete ).
The memory will not be returned until one of three things happens:
- A wait such as
MPI_Wait completes on request, freeing it. - The
MPI_Test function returns success, also freeing it. - The request is freed using
MPI_Request_free .
You can release the active request (i.e. MPI_Request for a message that is not finished) that will continue to send, but MPI_Request will no longer be valid for any applications, such as testing, waiting, etc.
source share