hpcflow.app.Jobscript#

class hpcflow.app.Jobscript(task_insert_IDs, task_actions, task_elements, EAR_ID, resources, task_loop_idx, dependencies, submit_time=None, scheduler_job_ID=None, version_info=None)#

Bases: Jobscript

Methods

compose_jobscript

Prepare the jobscript file string.

from_json_like

get_EAR_ID_array

get_commands_file_name

get_task_loop_idx_array

make_artifact_dirs

submit

to_dict

to_json_like

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

Write a text file with num_elements lines and num_actions delimited tokens per line, representing the working directory for each EAR.

write_jobscript

Attributes

EAR_ID

EAR_ID_file_name

EAR_ID_file_path

app

dependencies

element_run_dir_file_name

element_run_dir_file_path

index

is_array

jobscript_name

jobscript_path

num_actions

num_elements

os_name

resources

scheduler

scheduler_job_ID

scheduler_name

shell

shell_name

submission

submit_time

task_actions

task_elements

task_insert_IDs

task_loop_idx

version_info

workflow

workflow_app_alias

Parameters:
  • task_insert_IDs (List[int]) –

  • task_actions (List[Tuple]) –

  • task_elements (Dict[int, List[int]]) –

  • EAR_ID (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_ID#
property EAR_ID_file_name#
property EAR_ID_file_path#
app = BaseApp(name='hpcFlow', version='0.2.0a52')#
compose_jobscript()#

Prepare the jobscript file string.

Return type:

str

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_commands_file_name(js_action_idx)#
get_task_loop_idx_array()#
property index#
property is_array#
property jobscript_name#
property jobscript_path#
make_artifact_dirs()#
property num_actions#
property num_elements#
property os_name#
property resources#
property scheduler#
property scheduler_job_ID#
property scheduler_name: str | None#
property shell#
property shell_name: str#
property submission#
submit(scheduler_refs, print_stdout=False)#
Parameters:
Return type:

str

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.

Parameters:

run_dirs (List[List[Path]]) –

write_jobscript()#