hpcflow.sdk.submission.schedulers.Scheduler#

class hpcflow.sdk.submission.schedulers.Scheduler(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: NullScheduler

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 (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

format_switch

Format a particular switch to use the JS command.

get_version_info

Get the version of the scheduler.

is_jobscript_active

Query if a jobscript is running/pending.

is_num_cores_supported

Test whether particular number of cores is supported in given range of cores.

parse_submission_output

Parse the output from a submission to determine the submission ID.

wait_for_jobscripts

Wait for jobscripts to update their state.

Attributes

DEFAULT_LOGIN_NODES_CMD

Default command for logging into nodes.

DEFAULT_LOGIN_NODE_MATCH

Default pattern for matching the names of login nodes.

DEFAULT_SHEBANG_ARGS

Default value for arguments on the shebang line.

DEFAULT_SHELL_ARGS

Default value for arguments to the shell.

unique_properties

Unique properties, for hashing.

DEFAULT_LOGIN_NODES_CMD = None#

Default command for logging into nodes.

DEFAULT_LOGIN_NODE_MATCH = '*login*'#

Default pattern for matching the names of login nodes.

DEFAULT_SHEBANG_ARGS = ''#

Default value for arguments on the shebang line.

DEFAULT_SHELL_ARGS = ''#

Default value for arguments to the shell.

format_switch(switch)#

Format a particular switch to use the JS command.

get_version_info()#

Get the version of the scheduler.

is_jobscript_active(job_ID)#

Query if a jobscript is running/pending.

Parameters:

job_ID (str) –

static is_num_cores_supported(num_cores, core_range)#

Test whether particular number of cores is supported in given range of cores.

Parameters:

core_range (List[int]) –

parse_submission_output(stdout)#

Parse the output from a submission to determine the submission ID.

Parameters:

stdout (str) –

Return type:

None

property unique_properties#

Unique properties, for hashing.

wait_for_jobscripts(js_refs)#

Wait for jobscripts to update their state.

Parameters:

js_refs (List[Any]) –

Return type:

None