From f0b00a0ac203edfd4e120a233402094a01faf3e1 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Wed, 13 May 2026 00:02:41 +0200 Subject: [PATCH] Fix `squeue` backend crash after optimizing pending job polling Signed-off-by: Vasileios Karakasis --- reframe/core/schedulers/slurm.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/reframe/core/schedulers/slurm.py b/reframe/core/schedulers/slurm.py index 706b5f1ff..29b72a6b2 100644 --- a/reframe/core/schedulers/slurm.py +++ b/reframe/core/schedulers/slurm.py @@ -717,9 +717,11 @@ def poll(self, *jobs): # Use ',' to join nodes to be consistent with Slurm syntax job._nodespec = ','.join(m.group('nodespec') for m in job_match) - self._cancel_if_blocked( - jobs, {jobid: s.group('reason') for jobid, s in jobinfo.items()} - ) + pending_reasons = {} + for jobid, states in jobinfo.items(): + pending_reasons[jobid] = [s.group('reason') for s in states] + + self._cancel_if_blocked(jobs, pending_reasons) self._cancel_if_pending_too_long(jobs)