matflow.SGEPosix#

class matflow.SGEPosix(cwd_switch=None, *args, **kwargs)#

Bases: SGEPosix

Notes

  • runs in serial by default

References

[1] https://gridscheduler.sourceforge.net/htmlman/htmlman1/qsub.html [2] https://softpanorama.org/HPC/Grid_engine/Queues/queue_states.shtml

Methods

cancel_jobs

format_array_request

format_core_request_lines

format_options

format_std_stream_file_option_lines

format_switch

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_job_statuses

Get information about all of this user's jobscripts that currently listed by the scheduler.

get_login_nodes

Return a list of hostnames of login/administrative nodes as reported by the scheduler.

get_submit_command

get_version_info

is_jobscript_active

Query if a jobscript is running/pending.

is_num_cores_supported

parse_submission_output

Extract scheduler reference for a newly submitted jobscript

process_resources

Perform scheduler-specific processing to the element resources.

wait_for_jobscripts

Attributes

DEFAULT_ARRAY_ITEM_VAR

DEFAULT_ARRAY_SWITCH

DEFAULT_CWD_SWITCH

DEFAULT_DEL_CMD

DEFAULT_JS_CMD

DEFAULT_LOGIN_NODES_CMD

DEFAULT_LOGIN_NODE_MATCH

DEFAULT_SHEBANG_ARGS

DEFAULT_SHELL_ARGS

DEFAULT_SHOW_CMD

DEFAULT_SUBMIT_CMD

app

state_lookup

unique_properties

DEFAULT_ARRAY_ITEM_VAR = 'SGE_TASK_ID'#
DEFAULT_ARRAY_SWITCH = '-t'#
DEFAULT_CWD_SWITCH = '-cwd'#
DEFAULT_DEL_CMD = 'qdel'#
DEFAULT_JS_CMD = '#$'#
DEFAULT_LOGIN_NODES_CMD = ['qconf', '-sh']#
DEFAULT_LOGIN_NODE_MATCH = '*login*'#
DEFAULT_SHEBANG_ARGS = ''#
DEFAULT_SHELL_ARGS = ''#
DEFAULT_SHOW_CMD = ['qstat']#
DEFAULT_SUBMIT_CMD = 'qsub'#
app = App(name='MatFlow', version='0.3.0a129')#
cancel_jobs(js_refs, jobscripts=None)#
Parameters:
format_array_request(num_elements)#
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.

Parameters:

js_refs (List[str]) –

Return type:

Dict[str, Dict[int, JobscriptElementState]]

get_job_statuses()#

Get information about all of this user’s jobscripts that currently listed by the scheduler.

get_login_nodes()#

Return a list of hostnames of login/administrative nodes as reported by the scheduler.

get_submit_command(shell, js_path, deps)#
Parameters:
Return type:

List[str]

get_version_info()#
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)#
Parameters:

core_range (List[int]) –

parse_submission_output(stdout)#

Extract scheduler reference for a newly submitted jobscript

Parameters:

stdout (str) –

Return type:

str

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 = {'Eh': JobscriptElementState.errored, 'Eq': JobscriptElementState.errored, 'RS': JobscriptElementState.errored, 'RT': JobscriptElementState.errored, 'Rr': JobscriptElementState.running, 'Rs': JobscriptElementState.errored, 'Rt': JobscriptElementState.errored, 'S': JobscriptElementState.errored, 'T': JobscriptElementState.errored, 'dR': JobscriptElementState.cancelled, 'dS': JobscriptElementState.cancelled, 'dT': JobscriptElementState.cancelled, 'dr': JobscriptElementState.cancelled, 'ds': JobscriptElementState.cancelled, 'dt': JobscriptElementState.cancelled, 'hR': JobscriptElementState.waiting, 'hq': JobscriptElementState.waiting, 'qw': JobscriptElementState.pending, 'r': JobscriptElementState.running, 's': JobscriptElementState.errored, 't': JobscriptElementState.running, 'tS': JobscriptElementState.errored, 'tT': JobscriptElementState.errored, 'ts': JobscriptElementState.errored}#
property unique_properties#
wait_for_jobscripts(js_refs)#
Parameters:

js_refs (List[Any]) –

Return type:

None