Skip to content

Commit 70d3dff

Browse files
authored
Merge pull request #713 from kraushm/bugfix/improper-scontrol-output-handling
[bugfix] Fix Slurm backend failures when trying node lists with inexistent nodes
2 parents 3868fd6 + 8e7fb55 commit 70d3dff

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

reframe/core/schedulers/slurm.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -240,14 +240,17 @@ def _get_reservation_nodes(self, reservation):
240240
return {SlurmNode(descr) for descr in node_descriptions}
241241

242242
def _get_nodes_by_name(self, nodespec):
243-
try:
244-
completed = _run_strict('scontrol -a show -o node %s' % nodespec)
245-
except SpawnedProcessError as e:
246-
raise JobError('could not retrieve the node description '
247-
'of nodes: %s' % nodespec) from e
248-
243+
completed = os_ext.run_command('scontrol -a show -o node %s' %
244+
nodespec)
249245
node_descriptions = completed.stdout.splitlines()
250-
return {SlurmNode(descr) for descr in node_descriptions}
246+
nodes_avail = set()
247+
for descr in node_descriptions:
248+
try:
249+
nodes_avail.add(SlurmNode(descr))
250+
except JobError:
251+
pass
252+
253+
return nodes_avail
251254

252255
def _set_nodelist(self, nodespec):
253256
if self._nodelist is not None:

0 commit comments

Comments
 (0)