Skip to content

Commit

Permalink
rank debug
Browse files Browse the repository at this point in the history
  • Loading branch information
chu11 committed Jan 8, 2025
1 parent 02ad07c commit 7e0350c
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/cmd/flux-exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,10 @@ static void stdin_cb (flux_reactor_t *r,
while (p) {
if (flux_subprocess_state (p) == FLUX_SUBPROCESS_INIT
|| flux_subprocess_state (p) == FLUX_SUBPROCESS_RUNNING) {
if ((len = flux_subprocess_write (p, "stdin", ptr, lenp)) < 0)
log_err_exit ("flux_subprocess_write");
if ((len = flux_subprocess_write (p, "stdin", ptr, lenp)) < 0) {
char *rankstr = flux_subprocess_aux_get (p, "rank");
log_err_exit ("flux_subprocess_write rank=%s", rankstr);

Check warning on line 315 in src/cmd/flux-exec.c

View check run for this annotation

Codecov / codecov/patch

src/cmd/flux-exec.c#L314-L315

Added lines #L314 - L315 were not covered by tests
}
if (stdin_enable_flow_control) {
/* N.B. since we are subtracting the same number
* of credits from all subprocesses, the sorted
Expand Down Expand Up @@ -814,6 +816,16 @@ int main (int argc, char *argv[])
spcred,
(flux_free_f) free) < 0)
log_err_exit ("flux_subprocess_aux_set");
{
char *rankstr;
if (asprintf (&rankstr, "%d", rank) < 0)
log_err_exit ("asprintf");

Check warning on line 822 in src/cmd/flux-exec.c

View check run for this annotation

Codecov / codecov/patch

src/cmd/flux-exec.c#L822

Added line #L822 was not covered by tests
if (flux_subprocess_aux_set (p,
"rank",
rankstr,
(flux_free_f) free) < 0)
log_err_exit ("flux_subprocess_aux_set");

Check warning on line 827 in src/cmd/flux-exec.c

View check run for this annotation

Codecov / codecov/patch

src/cmd/flux-exec.c#L827

Added line #L827 was not covered by tests
}
rank = idset_next (targets, rank);
}

Expand Down

0 comments on commit 7e0350c

Please sign in to comment.