hpcflow.app.Jobscript#
- class hpcflow.app.Jobscript(task_insert_IDs, task_actions, task_elements, EARs, EAR_idx, resources, task_loop_idx, dependencies, submit_time=None, scheduler_job_ID=None, version_info=None)#
Bases:
Jobscript
Methods
Prepare the jobscript file string.
Write a text file with num_elements lines and num_actions delimited tokens per line, representing the working directory for each EAR.
Write a text file with num_elements lines and num_actions delimited tokens per line, representing whether a given EAR must be executed.
Attributes
- Parameters:
task_insert_IDs (List[int]) –
task_actions (List[Tuple]) –
EAR_idx (NDArray) –
resources (app.ElementResources) –
task_loop_idx (List[Dict]) –
dependencies (Dict[int:Dict]) –
submit_time (Optional[datetime]) –
scheduler_job_ID (Optional[str]) –
version_info (Optional[Tuple[str]]) –
- property EAR_idx#
- property EARs#
- app = BaseApp(name='hpcFlow', version='0.2.0a48')#
- property dependencies#
- property element_run_dir_file_name#
- property element_run_dir_file_path#
- classmethod from_json_like(json_like, shared_data=None)#
- get_EAR_ID_array()#
- get_EAR_run_idx_array()#
- get_commands_file_name(js_action_idx)#
- get_task_element_idx_array()#
- get_task_insert_IDs_array()#
- get_task_loop_idx_array()#
- property index#
- property is_array#
- property jobscript_name#
- property jobscript_path#
- make_artifact_dirs(task_artifacts_path)#
- property need_EAR_file_name#
- property need_EAR_file_path#
- property num_actions#
- property num_elements#
- property os_name#
- property resources#
- property scheduler#
- property scheduler_job_ID#
- property scheduler_version_info#
- property shell#
- property submission#
- submit(task_artifacts_path, scheduler_refs, print_stdout=False)#
- 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 workflow#
- property workflow_app_alias#
- 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()#
- write_need_EARs_file()#
Write a text file with num_elements lines and num_actions delimited tokens per line, representing whether a given EAR must be executed.