Skip to content

Commit 24cc079

Browse files
committed
grequest: Fix MPI_Request_get_status() to propagate errors form query_fn
Signed-off-by: Lisandro Dalcin <[email protected]>
1 parent ee63882 commit 24cc079

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ompi/mpi/c/request_get_status.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,18 @@ int MPI_Request_get_status(MPI_Request request, int *flag,
7575
return MPI_SUCCESS;
7676
}
7777
if( request->req_complete ) {
78+
int rc = MPI_SUCCESS;
7879
*flag = true;
7980
/* If this is a generalized request, we *always* have to call
8081
the query function to get the status (MPI-2:8.2), even if
8182
the user passed STATUS_IGNORE. */
8283
if (OMPI_REQUEST_GEN == request->req_type) {
83-
ompi_grequest_invoke_query(request, &request->req_status);
84+
rc = ompi_grequest_invoke_query(request, &request->req_status);
8485
}
8586
if (MPI_STATUS_IGNORE != status) {
8687
OMPI_COPY_STATUS(status, request->req_status, false);
8788
}
88-
return MPI_SUCCESS;
89+
return rc;
8990
}
9091
#if OPAL_ENABLE_PROGRESS_THREADS == 0
9192
if( 0 == do_it_once ) {

0 commit comments

Comments
 (0)