matflow.SlurmPosix#
- class matflow.SlurmPosix(*args, **kwargs)#
Bases:
SlurmPosix
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
Query the scheduler to get the states of all of this user's jobs, optionally filtering by specified job IDs.
Query if a jobscript is running/pending.
Extract scheduler reference for a newly submitted jobscript
Perform scheduler-specific processing to the element resources.
Attributes
- DEFAULT_ARRAY_ITEM_VAR = 'SLURM_ARRAY_TASK_ID'#
- DEFAULT_ARRAY_SWITCH = '--array'#
- DEFAULT_DEL_CMD = 'scancel'#
- DEFAULT_JS_CMD = '#SBATCH'#
- DEFAULT_LOGIN_NODES_CMD = None#
- DEFAULT_LOGIN_NODE_MATCH = '*login*'#
- DEFAULT_SHEBANG_ARGS = ''#
- DEFAULT_SHELL_ARGS = ''#
- DEFAULT_SHELL_EXECUTABLE = '/bin/bash'#
- DEFAULT_SHOW_CMD = ['squeue', '--me']#
- DEFAULT_SUBMIT_CMD = 'sbatch'#
- app = App(name='MatFlow', version='0.3.0a129')#
- format_array_request(num_elements, resources)#
- format_core_request_lines(resources)#
- format_options(resources, num_elements, is_array, sub_idx)#
- format_std_stream_file_option_lines(is_array, sub_idx)#
- format_switch(switch)#
- get_job_state_info(js_refs=None)#
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.
- get_submit_command(shell, js_path, deps)#
- get_version_info()#
- parse_submission_output(stdout)#
Extract scheduler reference for a newly submitted jobscript
- classmethod process_resources(resources, scheduler_config)#
Perform scheduler-specific processing to the element resources.
Note: this mutates resources.
- Parameters:
scheduler_config (Dict) –
- Return type:
None
- state_lookup = {'CANCELLED': JobscriptElementState.cancelled, 'COMPLETED': JobscriptElementState.finished, 'COMPLETING': JobscriptElementState.running, 'FAILED': JobscriptElementState.errored, 'OUT_OF_MEMORY': JobscriptElementState.errored, 'PENDING': JobscriptElementState.pending, 'RUNNING': JobscriptElementState.running, 'TIMEOUT': JobscriptElementState.errored}#
- property unique_properties#