Skip to content

Commit 1deace1

Browse files
committed
MPI_Test: only recheck if opal_progress signaled events
Signed-off-by: Joseph Schuchart <schuchart@icl.utk.edu>
1 parent 8961692 commit 1deace1

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 ) {
@@ -94,9 +94,10 @@ int ompi_request_default_test(ompi_request_t ** rptr,
9494
* If we run the opal_progress then check the status of the request before
9595
* leaving. We will call the opal_progress only once per call.
9696
*/
97-
opal_progress();
98-
do_it_once++;
99-
goto recheck_request_status;
97+
++do_it_once;
98+
if (0 != opal_progress()) {
99+
goto recheck_request_status;
100+
}
100101
}
101102
#endif
102103
*completed = false;

0 commit comments

Comments
 (0)