matflow.Jobscript#
- class matflow.Jobscript(task_insert_IDs, task_actions, task_elements, EAR_ID, resources, task_loop_idx, dependencies, submit_time=None, submit_hostname=None, submit_machine=None, submit_cmdline=None, scheduler_job_ID=None, process_ID=None, version_info=None, os_name=None, shell_name=None, scheduler_name=None, running=None)#
Bases:
Jobscript
Methods
Prepare the jobscript file string.
If this jobscript is active on this machine, return the state information from the scheduler.
Write a text file with num_elements lines and num_actions delimited tokens per line, representing whether a given EAR must be executed.
Write a text file with num_elements lines and num_actions delimited tokens per line, representing the working directory for each EAR.
Attributes
For direct execution stderr.
For direct execution stdout.
Get the last end time from all EARs.
Return True if this jobscript has been submitted.
Retrieve the scheduler object for submission.
Retrieve the shell object for submission.
Get the first start time from all EARs.
- Parameters:
task_insert_IDs (List[int]) –
task_actions (List[Tuple]) –
EAR_ID (NDArray) –
resources (app.ElementResources) –
task_loop_idx (List[Dict]) –
dependencies (Dict[int:Dict]) –
submit_time (Optional[datetime]) –
submit_hostname (Optional[str]) –
submit_machine (Optional[str]) –
submit_cmdline (Optional[str]) –
scheduler_job_ID (Optional[str]) –
process_ID (Optional[int]) –
version_info (Optional[Tuple[str]]) –
os_name (Optional[str]) –
shell_name (Optional[str]) –
scheduler_name (Optional[str]) –
running (Optional[bool]) –
- property EAR_ID#
- property EAR_ID_file_name#
- property EAR_ID_file_path#
- app = App(name='MatFlow', version='0.3.0a129')#
- cancel()#
- compose_jobscript(deps=None, os_name=None, shell_name=None, os_args=None, shell_args=None, scheduler_name=None, scheduler_args=None)#
Prepare the jobscript file string.
- property dependencies#
- property direct_stderr_file_name#
For direct execution stderr.
- property direct_stderr_path#
- property direct_stdout_file_name#
For direct execution stdout.
- property direct_stdout_path#
- property direct_win_pid_file_name#
- property direct_win_pid_file_path#
- property element_run_dir_file_name#
- property element_run_dir_file_path#
- property end_time#
Get the last end time from all EARs.
- classmethod from_json_like(json_like, shared_data=None)#
- get_active_states(as_json=False)#
If this jobscript is active on this machine, return the state information from the scheduler.
- Parameters:
as_json (bool) –
- Return type:
- get_commands_file_name(js_action_idx, shell=None)#
- get_task_loop_idx_array()#
- property index#
- property is_array#
- property is_submitted#
Return True if this jobscript has been submitted.
- property jobscript_name#
- property jobscript_path#
- make_artifact_dirs()#
- property num_actions#
- property num_elements#
- property process_ID#
- property resources#
- property scheduler#
Retrieve the scheduler object for submission.
- property scheduler_job_ID#
- property scheduler_js_ref#
- property scheduler_ref#
- property shell#
Retrieve the shell object for submission.
- property start_time#
Get the first start time from all EARs.
- property submission#
- submit(scheduler_refs, print_stdout=False)#
- property submit_cmdline#
- property submit_hostname#
- property submit_machine#
- property submit_time#
- property task_actions#
- property task_elements#
- property task_insert_IDs#
- property task_loop_idx#
- to_dict()#
- to_json_like(dct=None, shared_data=None, exclude=None, path=None)#
- property version_info#
- property workflow#
- property workflow_app_alias#
- write_EAR_ID_file()#
Write a text file with num_elements lines and num_actions delimited tokens per line, representing whether a given EAR must be executed.
- write_element_run_dir_file(run_dirs)#
Write a text file with num_elements lines and num_actions delimited tokens per line, representing the working directory for each EAR.
We assume a given task element’s actions all run in the same directory, but in general a jobscript “element” may cross task boundaries, so we need to provide the directory for each jobscript-element/jobscript-action combination.
- write_jobscript(os_name=None, shell_name=None, deps=None, os_args=None, shell_args=None, scheduler_name=None, scheduler_args=None)#