hpcflow.sdk.submission.schedulers.slurm.SlurmPosix#

class hpcflow.sdk.submission.schedulers.slurm.SlurmPosix(*args, **kwargs)#

Bases: Scheduler

Notes

  • runs in current working directory by default [2]

# TODO: consider getting memory usage like: https://stackoverflow.com/a/44143229/5042280

References

[1] https://manpages.org/sbatch [2] https://ri.itservices.manchester.ac.uk/csf4/batch/sge-to-slurm/

Methods

format_array_request

format_core_request_lines

format_options

format_std_stream_file_option_lines

format_switch

get_submit_command

get_version_info

parse_submission_output

Extract scheduler reference for a newly submitted jobscript

Attributes

DEFAULT_ARRAY_ITEM_VAR

DEFAULT_ARRAY_SWITCH

DEFAULT_DEL_CMD

DEFAULT_JS_CMD

DEFAULT_SHEBANG_ARGS

DEFAULT_SHELL_ARGS

DEFAULT_SHELL_EXECUTABLE

DEFAULT_SHOW_CMD

DEFAULT_SUBMIT_CMD

DEFAULT_ARRAY_ITEM_VAR = 'SLURM_ARRAY_TASK_ID'#
DEFAULT_ARRAY_SWITCH = '--array'#
DEFAULT_DEL_CMD = 'scancel'#
DEFAULT_JS_CMD = '#SBATCH'#
DEFAULT_SHEBANG_ARGS = ''#
DEFAULT_SHELL_ARGS = ''#
DEFAULT_SHELL_EXECUTABLE = '/bin/bash'#
DEFAULT_SHOW_CMD = 'squeue --me'#
DEFAULT_SUBMIT_CMD = 'sbatch'#
format_array_request(num_elements)#
format_core_request_lines(num_cores, num_nodes)#
format_options(resources, num_elements, is_array, sub_idx)#
format_std_stream_file_option_lines(is_array, sub_idx)#
format_switch(switch)#
get_submit_command(shell, js_path, deps)#
Parameters:
Return type:

List[str]

get_version_info()#
parse_submission_output(stdout)#

Extract scheduler reference for a newly submitted jobscript

Parameters:

stdout (str) –

Return type:

str