Skip to content

Commit 09ec041

Browse files
devrealawlauria
authored andcommitted
MPI_Test: only recheck if opal_progress signaled events
Signed-off-by: Joseph Schuchart <schuchart@icl.utk.edu> (cherry picked from commit 1deace1)
1 parent 3829cac commit 09ec041

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

ompi/request/req_test.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ int ompi_request_default_test(ompi_request_t ** rptr,
3535
#if OPAL_ENABLE_PROGRESS_THREADS == 0
3636
int do_it_once = 0;
3737

38-
recheck_request_status:
38+
recheck_request_status:
3939
#endif
4040
opal_atomic_mb();
4141
if( request->req_state == OMPI_REQUEST_INACTIVE ) {
@@ -86,9 +86,10 @@ int ompi_request_default_test(ompi_request_t ** rptr,
8686
* If we run the opal_progress then check the status of the request before
8787
* leaving. We will call the opal_progress only once per call.
8888
*/
89-
opal_progress();
90-
do_it_once++;
91-
goto recheck_request_status;
89+
++do_it_once;
90+
if (0 != opal_progress()) {
91+
goto recheck_request_status;
92+
}
9293
}
9394
#endif
9495
*completed = false;

0 commit comments

Comments
 (0)