Skip to content

Commit c4ba35c

Browse files
authored
Merge pull request #3663 from vkarak/bugfix/squeue-crash
Fix `squeue` backend crash after optimizing pending job polling
2 parents 246c714 + f0b00a0 commit c4ba35c

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

reframe/core/schedulers/slurm.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -717,9 +717,11 @@ def poll(self, *jobs):
717717
# Use ',' to join nodes to be consistent with Slurm syntax
718718
job._nodespec = ','.join(m.group('nodespec') for m in job_match)
719719

720-
self._cancel_if_blocked(
721-
jobs, {jobid: s.group('reason') for jobid, s in jobinfo.items()}
722-
)
720+
pending_reasons = {}
721+
for jobid, states in jobinfo.items():
722+
pending_reasons[jobid] = [s.group('reason') for s in states]
723+
724+
self._cancel_if_blocked(jobs, pending_reasons)
723725
self._cancel_if_pending_too_long(jobs)
724726

725727

0 commit comments

Comments
 (0)