Skip to content

Commit 15a2d84

Browse files
committed
Make sure the progress callback is always registered
Signed-off-by: Joseph Schuchart <schuchart@icl.utk.edu>
1 parent 28f908e commit 15a2d84

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

ompi/mpiext/continue/c/continuation.c

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -553,12 +553,17 @@ ompi_continue_enqueue_runnable(ompi_continuation_t *cont)
553553
}
554554
if (using_threads) { opal_mutex_atomic_lock(&request_cont_lock); }
555555
opal_list_append(&continuation_list, &cont->super.super);
556-
if (OPAL_UNLIKELY(!progress_callback_registered)) {
557-
/* TODO: Ideally, we want to ensure that the callback is called *after*
558-
* all the other progress callbacks are done so that any
559-
* completions have happened before we attempt to execute
560-
* callbacks. There doesn't seem to exist the infrastructure though.
561-
*/
556+
if (using_threads) { opal_mutex_atomic_unlock(&request_cont_lock); }
557+
}
558+
559+
if (OPAL_UNLIKELY(!progress_callback_registered)) {
560+
/* TODO: Ideally, we want to ensure that the callback is called *after*
561+
* all the other progress callbacks are done so that any
562+
* completions have happened before we attempt to execute
563+
* callbacks. There doesn't seem to exist the infrastructure though.
564+
*/
565+
if (using_threads) { opal_mutex_atomic_lock(&request_cont_lock); }
566+
if (!progress_callback_registered) {
562567
opal_progress_register(&ompi_continue_progress_callback);
563568
progress_callback_registered = true;
564569
}

0 commit comments

Comments
 (0)