Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion reframe/core/schedulers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import reframe.utility.typecheck as typ
from reframe.core.exceptions import JobError, JobNotStartedError
from reframe.core.launchers import JobLauncher
from reframe.core.logging import (getlogger, DEBUG2)
from reframe.core.logging import getlogger, DEBUG2


class JobScheduler(abc.ABC):
Expand Down
6 changes: 3 additions & 3 deletions reframe/core/schedulers/pbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
import reframe.core.schedulers as sched
import reframe.utility.osext as osext
from reframe.core.backends import register_scheduler
from reframe.core.config import settings
from reframe.core.exceptions import (JobError, JobSchedulerError)
from reframe.core.exceptions import JobError, JobSchedulerError
from reframe.utility import seconds_to_hms


Expand Down Expand Up @@ -263,7 +262,8 @@ def poll(self, *jobs):
job.max_pending_time):
if (time.time() - job.submit_time >= job.max_pending_time):
self.cancel(job)
job._exception = JobError('maximum pending time exceeded')
job._exception = JobError('maximum pending time exceeded',
job.jobid)


@register_scheduler('torque')
Expand Down
6 changes: 3 additions & 3 deletions reframe/core/schedulers/slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from argparse import ArgumentParser
from contextlib import suppress

import reframe.core.environments as env
import reframe.core.runtime as rt
import reframe.core.schedulers as sched
import reframe.utility.osext as osext
Expand Down Expand Up @@ -432,7 +431,8 @@ def _cancel_if_pending_too_long(self, job):
if t_pending >= job.max_pending_time:
self.log(f'maximum pending time for job exceeded; cancelling it')
self.cancel(job)
job._exception = JobError('maximum pending time exceeded')
job._exception = JobError('maximum pending time exceeded',
job.jobid)

def _cancel_if_blocked(self, job, reasons=None):
if (job.is_cancelling or not slurm_state_pending(job.state)):
Expand Down Expand Up @@ -490,7 +490,7 @@ def _do_cancel_if_blocked(self, job, reason_descr):
if reason_details is not None:
reason_msg += ', ' + reason_details

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

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