hpcflow.sdk.submission.schedulers.Scheduler#
- class hpcflow.sdk.submission.schedulers.Scheduler(shell_args=None, shebang_args=None, options=None)#
Bases:
ABC
,Generic
[JSRefType
],AppAware
Abstract base class for schedulers.
Note
Do not make immediate subclasses of this class other than
DirectScheduler
andQueuedScheduler
; subclass those two instead. Code (e.g., inJobscript
) assumes that this model is followed and does not check it.- Parameters:
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
Default value for arguments on the shebang line.
Default value for arguments to the shell.
Unique properties, for hashing.
- abstract cancel_jobs(js_refs, jobscripts=None)#
Cancel one or more jobscripts.
- abstract 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]]
- abstract get_std_out_err_filename(js_idx, *args, **kwargs)#
File name of combined standard output and error streams.
- abstract get_stderr_filename(js_idx, *args, **kwargs)#
File name of the standard error stream file.
- abstract get_stdout_filename(js_idx, *args, **kwargs)#
File name of the standard output stream file.
- abstract 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.
- abstract 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