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
24 changes: 12 additions & 12 deletions reframe/core/schedulers/slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,25 +502,25 @@ def _do_cancel_if_blocked(self, job, reason_descr):
if node_match:
node_names = node_match['node_names']
if node_names:
# Retrieve the info of the unavailable nodes
# and check if they are indeed down
# Retrieve the info of the unavailable nodes and check
# if they are indeed down. According to Slurm's docs
# this should not be necessary, but we check anyways
# to be on the safe side.
self.log(f'Checking if nodes {node_names!r} '
f'are indeed unavailable')
nodes = self._get_nodes_by_name(node_names)
if not any(n.is_down() for n in nodes):
return
else:
# List of unavailable nodes is empty; assume job
# is pending
return

self.cancel(job)
reason_msg = ('job cancelled because it was blocked due to '
'a perhaps non-recoverable reason: ' + reason)
if reason_details is not None:
reason_msg += ', ' + reason_details
self.cancel(job)
reason_msg = (
'job cancelled because it was blocked due to '
'a perhaps non-recoverable reason: ' + reason
)
if reason_details is not None:
reason_msg += ', ' + reason_details

job._exception = JobBlockedError(reason_msg, job.jobid)
job._exception = JobBlockedError(reason_msg, job.jobid)

def wait(self, job):
# Quickly return in case we have finished already
Expand Down