hpcflow.sdk.submission.schedulers.direct.DirectWindows#

class hpcflow.sdk.submission.schedulers.direct.DirectWindows(shell_args=None, shebang_args=None, options=None)#

Bases: DirectScheduler

A direct scheduler for Windows.

Keyword Arguments:
  • shell_args (str) – Arguments to pass to the shell. Pre-quoted.

  • options (dict) – Options to the jobscript command.

Parameters:
  • shell_args (str | None) –

  • shebang_args (str | None) –

  • options (dict | None) –

Methods

cancel_jobs

Cancel some jobs.

get_job_state_info

Query the scheduler to get the states of all of this user's jobs, optionally filtering by specified job IDs.

get_submit_command

Get the concrete submission command.

get_version_info

Get the version of the scheduler.

is_jobscript_active

Query if a jobscript is running.

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.

process_resources

Perform scheduler-specific processing to the element resources.

wait_for_jobscripts

Wait until the specified jobscripts have completed.

Attributes

DEFAULT_SHEBANG_ARGS

Default value for arguments on the shebang line.

DEFAULT_SHELL_ARGS

Default value for arguments to the shell.

DEFAULT_SHELL_EXECUTABLE

Default shell.

unique_properties

Unique properties, for hashing.

DEFAULT_SHEBANG_ARGS: ClassVar[str] = ''#

Default value for arguments on the shebang line.

DEFAULT_SHELL_ARGS: ClassVar[str] = ''#

Default value for arguments to the shell.

DEFAULT_SHELL_EXECUTABLE: ClassVar[str] = 'powershell.exe'#

Default shell.

cancel_jobs(js_refs, jobscripts=None, num_js_elements=0)#

Cancel some jobs.

Parameters:
get_job_state_info(*, js_refs=None, num_js_elements=0)#

Query the scheduler to get the states of all of this user’s jobs, optionally filtering by specified job IDs.

Jobs that are not in the scheduler’s status output will not appear in the output of this method.

Parameters:
  • js_refs (Sequence[DirectRef] | None) –

  • num_js_elements (int) –

Return type:

Mapping[str, Mapping[int | None, JobscriptElementState]]

get_submit_command(shell, js_path, deps)#

Get the concrete submission command.

Parameters:
Return type:

list[str]

get_version_info()#

Get the version of the scheduler.

Return type:

VersionInfo

is_jobscript_active(process_ID, process_cmdline)#

Query if a jobscript is running.

Note that a “running” jobscript might be waiting on upstream jobscripts to complete.

Parameters:
  • process_ID (int) –

  • process_cmdline (list[str]) –

static is_num_cores_supported(num_cores, core_range)#

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

Parameters:
  • num_cores (int | None) –

  • core_range (Sequence[int]) –

Return type:

bool

parse_submission_output(stdout)#

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

Parameters:

stdout (str) –

Return type:

str | None

classmethod process_resources(resources, scheduler_config)#

Perform scheduler-specific processing to the element resources.

Note

This mutates resources.

Parameters:

scheduler_config (SchedulerConfigDescriptor) –

Return type:

None

property unique_properties: tuple[str, ...]#

Unique properties, for hashing.

classmethod wait_for_jobscripts(js_refs, *, callback=None)#

Wait until the specified jobscripts have completed.

Parameters:
  • js_refs (list[DirectRef]) –

  • callback (Callable[[psutil.Process], None] | None) –

Return type:

list[psutil.Process] | None