From 965fc6f8ca37b426278b7595b9e18656e4847bfb Mon Sep 17 00:00:00 2001 From: Eirini Koutsaniti Date: Fri, 18 Nov 2022 08:16:25 +0100 Subject: [PATCH 1/2] Expand nodelist with the scontrol utility --- reframe/core/schedulers/slurm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/reframe/core/schedulers/slurm.py b/reframe/core/schedulers/slurm.py index ac051bce2d..fb1428ad73 100644 --- a/reframe/core/schedulers/slurm.py +++ b/reframe/core/schedulers/slurm.py @@ -81,7 +81,10 @@ def __init__(self, *args, **kwargs): def nodelist(self): # Redefine nodelist so as to generate it from the nodespec if self._nodelist is None and self._nodespec is not None: - self._nodelist = nodelist_expand(self._nodespec) + completed = osext.run_command( + f'scontrol show hostname {self._nodespec}', log=False + ) + self._nodelist = completed.stdout.splitlines() return self._nodelist From fe05d8324fc5159716640b258922b942a96f8261 Mon Sep 17 00:00:00 2001 From: Eirini Koutsaniti Date: Fri, 18 Nov 2022 16:52:25 +0100 Subject: [PATCH 2/2] Remove unused import --- reframe/core/schedulers/slurm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reframe/core/schedulers/slurm.py b/reframe/core/schedulers/slurm.py index fb1428ad73..4ecf2299b2 100644 --- a/reframe/core/schedulers/slurm.py +++ b/reframe/core/schedulers/slurm.py @@ -20,7 +20,7 @@ JobBlockedError, JobError, JobSchedulerError) -from reframe.utility import nodelist_abbrev, nodelist_expand, seconds_to_hms +from reframe.utility import nodelist_abbrev, seconds_to_hms def slurm_state_completed(state):