Skip to content

Commit 93de6f4

Browse files
authored
Merge pull request #2678 from ekouts/bugfix_expand_nodelist
[bugfix] Expand the Slurm nodelist using `scontrol` and not the builtin `nodelist_expand()` function
2 parents 53aad83 + 6af68b2 commit 93de6f4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

reframe/core/schedulers/slurm.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
JobBlockedError,
2121
JobError,
2222
JobSchedulerError)
23-
from reframe.utility import nodelist_abbrev, nodelist_expand, seconds_to_hms
23+
from reframe.utility import nodelist_abbrev, seconds_to_hms
2424

2525

2626
def slurm_state_completed(state):
@@ -81,7 +81,10 @@ def __init__(self, *args, **kwargs):
8181
def nodelist(self):
8282
# Redefine nodelist so as to generate it from the nodespec
8383
if self._nodelist is None and self._nodespec is not None:
84-
self._nodelist = nodelist_expand(self._nodespec)
84+
completed = osext.run_command(
85+
f'scontrol show hostname {self._nodespec}', log=False
86+
)
87+
self._nodelist = completed.stdout.splitlines()
8588

8689
return self._nodelist
8790

0 commit comments

Comments
 (0)