diff --git a/src/common/slurm_protocol_defs.h b/src/common/slurm_protocol_defs.h index cde980b856642af662436a6187768caaf309b918..aaee35df169e4bd6a40cb31628bb6cbadbc7eefb 100644 --- a/src/common/slurm_protocol_defs.h +++ b/src/common/slurm_protocol_defs.h @@ -588,8 +588,8 @@ typedef struct complete_prolog { typedef struct step_complete_msg { uint32_t job_id; uint32_t job_step_id; - uint32_t range_first; - uint32_t range_last; + uint32_t range_first; /* First node rank within job step's alloc */ + uint32_t range_last; /* Last node rank within job step's alloc */ uint32_t step_rc; /* largest task return code */ jobacctinfo_t *jobacct; } step_complete_msg_t; diff --git a/src/slurmd/slurmstepd/mgr.c b/src/slurmd/slurmstepd/mgr.c index 95c9a967981e885c1e1c6bbc6b04bbaa99437a18..87b657d49a8dfe19ea8ffc06c9b5167d71d281e9 100644 --- a/src/slurmd/slurmstepd/mgr.c +++ b/src/slurmd/slurmstepd/mgr.c @@ -777,6 +777,12 @@ _one_step_complete_msg(stepd_step_rec_t *job, int first, int last) memset(&msg, 0, sizeof(step_complete_msg_t)); msg.job_id = job->jobid; msg.job_step_id = job->stepid; + if (job->batch) { /* Nested batch step anomalies */ + if (first == -1) + first = 0; + if (last == -1) + last = 0; + } msg.range_first = first; msg.range_last = last; msg.step_rc = step_complete.step_rc;