Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions reframe/core/schedulers/slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,14 +240,17 @@ def _get_reservation_nodes(self, reservation):
return {SlurmNode(descr) for descr in node_descriptions}

def _get_nodes_by_name(self, nodespec):
try:
completed = _run_strict('scontrol -a show -o node %s' % nodespec)
except SpawnedProcessError as e:
raise JobError('could not retrieve the node description '
'of nodes: %s' % nodespec) from e

completed = os_ext.run_command('scontrol -a show -o node %s' %
nodespec)
node_descriptions = completed.stdout.splitlines()
return {SlurmNode(descr) for descr in node_descriptions}
nodes_avail = set()
for descr in node_descriptions:
try:
nodes_avail.add(SlurmNode(descr))
except JobError:
pass

return nodes_avail

def _set_nodelist(self, nodespec):
if self._nodelist is not None:
Expand Down