hpcflow.app.QueuedScheduler#
- class hpcflow.app.QueuedScheduler(submit_cmd=None, show_cmd=None, del_cmd=None, js_cmd=None, login_nodes_cmd=None, array_switch=None, array_item_var=None, *args, **kwargs)#
Bases:
QueuedScheduler
Base class for schedulers that use a job submission system.
- Parameters:
submit_cmd (str) – The submission command, if overridden from default.
show_cmd (str) – The show command, if overridden from default.
del_cmd (str) – The delete command, if overridden from default.
js_cmd (str) – The job script command, if overridden from default.
login_nodes_cmd (list[str]) – The login nodes command, if overridden from default.
array_switch (str) – The switch to enable array jobs, if overridden from default.
array_item_var (str) – The variable for array items, if overridden from default.
Methods
Cancel one or more jobscripts.
Render options in a way that the scheduler can handle.
Format a particular switch to use the JS command.
Get the state of one or more jobscripts.
Get a command for submitting a jobscript.
Get the version of the scheduler.
Query if a jobscript is running/pending.
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 jobscripts to update their state.
Attributes
Default command for logging into nodes.
Default pattern for matching the names of login nodes.
Default value for arguments on the shebang line.
Default value for arguments to the shell.
Unique properties, for hashing.
Default command for submitting a job.
Default command for listing current submitted jobs.
Default command for deleting a job.
Default marker for job control metadata in a job script.
Default switch for enabling array mode.
Default shell variable containin the current array index.
- DEFAULT_LOGIN_NODES_CMD: ClassVar[Sequence[str] | None] = None#
Default command for logging into nodes.
- DEFAULT_LOGIN_NODE_MATCH: ClassVar[str] = '*login*'#
Default pattern for matching the names of login nodes.
- abstract cancel_jobs(js_refs, jobscripts=None, num_js_elements=0)#
Cancel one or more jobscripts.
- abstract format_options(resources, num_elements, is_array, sub_idx)#
Render options in a way that the scheduler can handle.
- Parameters:
resources (ElementResources) –
num_elements (int) –
is_array (bool) –
sub_idx (int) –
- Return type:
- format_switch(switch)#
Format a particular switch to use the JS command.
- abstract get_job_state_info(*, js_refs=None, num_js_elements=0)#
Get the state of one or more jobscripts.
- Parameters:
js_refs (Sequence[JSRefType] | None) –
num_js_elements (int) –
- Return type:
Mapping[str, Mapping[int | None, JobscriptElementState]]
- 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
- is_jobscript_active(job_ID)#
Query if a jobscript is running/pending.
- 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