Skip to content

Commit aa0a59d

Browse files
committed
Don't enqueue continuations twice for execution if everything is complete at registration
Signed-off-by: Joseph Schuchart <[email protected]>
1 parent d0308ee commit aa0a59d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ompi/mpiext/continue/c/continuation.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,10 +556,11 @@ int ompi_continue_attach(
556556
}
557557
}
558558

559+
assert(count >= num_registered);
559560
int num_complete = count - num_registered;
560561
int32_t last_num_active = OPAL_THREAD_ADD_FETCH32(&cont->num_active,
561562
-num_complete);
562-
if (0 == last_num_active && 0 < num_complete) {
563+
if (0 == last_num_active && 0 == num_registered) {
563564
if (cont_req->cont_enqueue_complete) {
564565
/* enqueue for later processing */
565566
ompi_continue_enqueue_runnable(cont);

0 commit comments

Comments
 (0)