hpcflow.sdk.submission.schedulers.Scheduler#
- class hpcflow.sdk.submission.schedulers.Scheduler(shebang_executable=None, options=None)#
Bases:
ABC,Generic[JSRefType],AppAwareAbstract base class for schedulers.
Note
Do not make immediate subclasses of this class other than
DirectSchedulerandQueuedScheduler; subclass those two instead. Code (e.g., inJobscript) assumes that this model is followed and does not check it.- Parameters:
shebang_executable (list[str]) – If specified, this will be used in the jobscript’s shebang line instead of the shell’s executable and executable_args attributes.
Methods
Cancel one or more jobscripts.
Get the state of one or more jobscripts.
File name of combined standard output and error streams.
File name of the standard error stream file.
File name of the standard output stream file.
Get a command for submitting a jobscript.
Get the version of the scheduler.
Test whether particular number of cores is supported in given range of cores.
Parse the output from a submission to determine the submission ID.
Perform scheduler-specific processing to the element resources.
Wait for one or more jobscripts to complete.
Attributes
Unique properties, for hashing.
- abstractmethod cancel_jobs(js_refs, jobscripts=None, quiet=False)#
Cancel one or more jobscripts.
- abstractmethod get_job_state_info(*, js_refs=None)#
Get the state of one or more jobscripts.
- Parameters:
js_refs (Sequence[JSRefType] | None)
- Return type:
Mapping[str, JobscriptElementState | Mapping[int, JobscriptElementState]]
- abstractmethod get_std_out_err_filename(js_idx, *args, **kwargs)#
File name of combined standard output and error streams.
- abstractmethod get_stderr_filename(js_idx, *args, **kwargs)#
File name of the standard error stream file.
- abstractmethod get_stdout_filename(js_idx, *args, **kwargs)#
File name of the standard output stream file.
- abstractmethod get_submit_command(shell, js_path, deps)#
Get a command for submitting a jobscript.
- get_version_info()#
Get the version of the scheduler.
- Return type:
VersionInfo
- static is_num_cores_supported(num_cores, core_range)#
Test whether particular number of cores is supported in given range of cores.
- parse_submission_output(stdout)#
Parse the output from a submission to determine the submission ID.
- abstractmethod process_resources(resources, scheduler_config)#
Perform scheduler-specific processing to the element resources.
Note
This mutates resources.
- Parameters:
resources (ElementResources)
scheduler_config (SchedulerConfigDescriptor)
- Return type:
None