![]() |
Belle II Software
release-06-00-14
|
Public Member Functions | |
def | __init__ (self, *backend_args=None) |
def | submit (self, job) |
def | get_submit_script_path (self, job) |
Public Attributes | |
backend_args | |
The backend args that will be applied to jobs unless the job specifies them itself. | |
Static Public Attributes | |
string | submit_script = "submit.sh" |
Default submission script name. | |
string | exit_code_file = "__BACKEND_CMD_EXIT_STATUS__" |
Default exit code file name. | |
dictionary | default_backend_args = {} |
Default backend_args. | |
Private Member Functions | |
def | _add_wrapper_script_setup (self, job, batch_file) |
def | _add_wrapper_script_teardown (self, job, batch_file) |
def | _create_parent_job_result (cls, parent) |
Static Private Member Functions | |
def | _add_setup (job, batch_file) |
Abstract base class for a valid backend. Classes derived from this will implement their own submission of basf2 jobs to whatever backend they describe. Some common methods/attributes go into this base class. For backend_args the priority from lowest to highest is: backend.default_backend_args -> backend.backend_args -> job.backend_args
Definition at line 743 of file backends.py.
def __init__ | ( | self, | |
* | backend_args = None |
||
) |
Reimplemented in LSF, PBS, and Batch.
Definition at line 761 of file backends.py.
|
staticprivate |
Adds setup lines to the shell script file.
Definition at line 777 of file backends.py.
|
private |
Adds lines to the submitted script that help with job monitoring/setup. Mostly here so that we can insert `trap` statements for Ctrl-C situations.
Definition at line 784 of file backends.py.
|
private |
Adds lines to the submitted script that help with job monitoring/teardown. Mostly here so that we can insert an exit code of the job cmd being written out to a file. Which means that we can know if the command was successful or not even if the backend server/monitoring database purges the data about our job i.e. If PBS removes job information too quickly we may never know if a job succeeded or failed without some kind of exit file.
Definition at line 809 of file backends.py.
|
private |
We want to be able to call `ready()` on the top level `Job.result`. So this method needs to exist so that a Job.result object actually exists. It will be mostly empty and simply updates subjob statuses and allows the use of ready().
Reimplemented in HTCondor, LSF, PBS, and Local.
Definition at line 822 of file backends.py.
def get_submit_script_path | ( | self, | |
job | |||
) |
Construct the Path object of the bash script file that we will submit. It will contain the actual job command, wrapper commands, setup commands, and any batch directives
Definition at line 830 of file backends.py.
def submit | ( | self, | |
job | |||
) |
Base method for submitting collection jobs to the backend type. This MUST be implemented for a correctly written backend class deriving from Backend().
Reimplemented in Local.
Definition at line 770 of file backends.py.