Skip to content

Commit

Permalink
request: Improve MPI_Request_free() error handling
Browse files Browse the repository at this point in the history
If ompi_request_free() fails, use the ompi_errhandler_request_invoke()
machinery used in the wait/test routines. This will have the side-effect
of attempting to free the request a second time.

Signed-off-by: Lisandro Dalcin <dalcinl@gmail.com>
  • Loading branch information
dalcinl committed Mar 18, 2024
1 parent 7f74978 commit 3b47c16
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ompi/mpi/c/request_free.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ int MPI_Request_free(MPI_Request *request)
}

rc = ompi_request_free(request);
if (OPAL_UNLIKELY(OMPI_SUCCESS != rc && MPI_REQUEST_NULL != *request)) {
(*request)->req_status.MPI_ERROR = rc;
return ompi_errhandler_request_invoke(1, request, FUNC_NAME);
}
OMPI_ERRHANDLER_NOHANDLE_RETURN(rc, rc, FUNC_NAME);
}

0 comments on commit 3b47c16

Please sign in to comment.