Belle II Software development
|
Public Member Functions | |
def | __init__ (self) |
The default constructor. | |
def | adjust_path (self, path) |
This method can be used if path names are different on submission and execution hosts. | |
def | available (self) |
The cluster should always be available to accept new jobs. | |
def | execute (self, Script job, options="", dry=False, tag="current") |
Takes a Script object and a string with options and runs it on the cluster, either with ROOT or with basf2, depending on the file type. | |
Tuple[bool, int] | is_job_finished (self, Script job) |
Checks whether the '.done'-file has been created for a job. | |
def | terminate (self, Script job) |
Terminate a running job. | |
Static Public Member Functions | |
def | is_supported () |
def | name () |
def | description () |
Public Attributes | |
path | |
The path, where the help files are being created Maybe there should be a special subfolder for them? | |
logger | |
Contains a reference to the logger-object from validate_basf2 Set up the logging functionality for the 'cluster execution'-Class, so we can log to validate_basf2.py's log what is going on in .execute and .is_finished. | |
tools | |
Path to the basf2 tools and central/local release. | |
b2setup | |
The command for b2setup (and b2code-option) | |
Protected Member Functions | |
None | _cleanup (self, Script job) |
str | _get_tmp_name (self, Script job) |
A class that provides the controls for running jobs on a (remote) cluster. It provides two methods: - is_job_finished(job): Returns True or False, depending on whether the job has finished execution - execute(job): Takes a job and executes it by sending it to the cluster
Definition at line 25 of file clustercontrol.py.
def __init__ | ( | self | ) |
The default constructor.
Definition at line 55 of file clustercontrol.py.
|
protected |
Clean up after job has finished.
Definition at line 237 of file clustercontrol.py.
|
protected |
Name of temporary file used for job submission.
Definition at line 242 of file clustercontrol.py.
def adjust_path | ( | self, | |
path | |||
) |
This method can be used if path names are different on submission and execution hosts.
path | The past that needs to be adjusted |
Definition at line 107 of file clustercontrol.py.
def available | ( | self | ) |
The cluster should always be available to accept new jobs.
Definition at line 118 of file clustercontrol.py.
|
static |
Returns description of this job control
Definition at line 49 of file clustercontrol.py.
def execute | ( | self, | |
Script | job, | ||
options = "" , |
|||
dry = False , |
|||
tag = "current" |
|||
) |
Takes a Script object and a string with options and runs it on the cluster, either with ROOT or with basf2, depending on the file type.
job | The steering file object that should be executed |
options | Options that will be given to the basf2 command |
dry | Whether to perform a dry run or not |
tag | The folder within the results directory |
Definition at line 126 of file clustercontrol.py.
Tuple[bool, int] is_job_finished | ( | self, | |
Script | job | ||
) |
Checks whether the '.done'-file has been created for a job.
If so, it returns True, else it returns False. Also deletes the .done-File once it has returned True.
job | The job of which we want to know if it finished |
Definition at line 246 of file clustercontrol.py.
|
static |
Check if the bsub command is available
Definition at line 35 of file clustercontrol.py.
|
static |
Returns name of this job control
Definition at line 42 of file clustercontrol.py.
def terminate | ( | self, | |
Script | job | ||
) |
Terminate a running job.
Definition at line 277 of file clustercontrol.py.
b2setup |
The command for b2setup (and b2code-option)
Definition at line 84 of file clustercontrol.py.
logger |
Contains a reference to the logger-object from validate_basf2 Set up the logging functionality for the 'cluster execution'-Class, so we can log to validate_basf2.py's log what is going on in .execute and .is_finished.
Definition at line 72 of file clustercontrol.py.
path |
The path, where the help files are being created Maybe there should be a special subfolder for them?
Definition at line 66 of file clustercontrol.py.
tools |
Path to the basf2 tools and central/local release.
Definition at line 79 of file clustercontrol.py.