Skip to content

Commit

Permalink
libsubprocess: bulk-exec: fix bulk_exec_active_ranks()
Browse files Browse the repository at this point in the history
Problem: bulk_exec_active_ranks() doesn't include subprocesses
that have exited, but are still waiting for output. This can cause
confusion since those ranks are still holding up completeion of the
bulk-exec operation.

Use flux_subprocess_active() instead of checking for the running
state to properly report active ranks and not just running ranks.
  • Loading branch information
grondo committed Sep 29, 2024
1 parent 78f169a commit e854da5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/libsubprocess/bulk-exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ struct idset *bulk_exec_active_ranks (struct bulk_exec *exec)

p = zlist_first (exec->processes);
while (p) {
if (flux_subprocess_state (p) == FLUX_SUBPROCESS_RUNNING) {
if (flux_subprocess_active (p)) {
int rank = flux_subprocess_rank (p);
if (rank >= 0 && idset_set (ranks, rank) < 0) {
goto error;
Expand Down

0 comments on commit e854da5

Please sign in to comment.