Skip to content

Commit a99747f

Browse files
authored
Merge pull request #9291 from awlauria/waitall_master
Improve MPI_Waitall performance for MPI_THREAD_MULTIPLE
2 parents 729468a + 3cf5004 commit a99747f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ompi/request/req_wait.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ int ompi_request_default_wait_all( size_t count,
243243
continue;
244244
}
245245

246-
if (!OPAL_ATOMIC_COMPARE_EXCHANGE_STRONG_PTR(&request->req_complete, &_tmp_ptr, &sync)) {
246+
if (REQUEST_COMPLETE(request) || !OPAL_ATOMIC_COMPARE_EXCHANGE_STRONG_PTR(&request->req_complete, &_tmp_ptr, &sync)) {
247247
if( OPAL_LIKELY( REQUEST_COMPLETE(request) ) ) {
248248
if( OPAL_UNLIKELY( MPI_SUCCESS != request->req_status.MPI_ERROR ) ) {
249249
failed++;

0 commit comments

Comments
 (0)