Generic condor job class.
Provides methods to set the options in the condor submit file for a particular executable
Definition at line 76 of file pipeline.py.
Inherits object.
Inherited by lal.pipeline.CondorDAGJob.
Public Member Functions | |
def | __init__ (self, universe, executable, queue) |
def | get_executable (self) |
Return the name of the executable for this job. More... | |
def | set_executable (self, executable) |
Set the name of the executable for this job. More... | |
def | get_universe (self) |
Return the condor universe that the job will run in. More... | |
def | set_universe (self, universe) |
Set the condor universe for the job to run in. More... | |
def | get_grid_type (self) |
Return the grid type of the job. More... | |
def | set_grid_type (self, grid_type) |
Set the type of grid resource for the job. More... | |
def | get_grid_server (self) |
Return the grid server on which the job will run. More... | |
def | set_grid_server (self, grid_server) |
Set the grid server on which to run the job. More... | |
def | get_grid_scheduler (self) |
Return the grid scheduler. More... | |
def | set_grid_scheduler (self, grid_scheduler) |
Set the grid scheduler. More... | |
def | set_executable_installed (self, installed) |
If executable installed is true, then no copying of the executable is done. More... | |
def | get_executable_installed (self) |
return whether or not the executable is installed More... | |
def | add_condor_cmd (self, cmd, value) |
Add a Condor command to the submit file (e.g. More... | |
def | get_condor_cmds (self) |
Return the dictionary of condor keywords to add to the job. More... | |
def | add_input_file (self, filename) |
Add filename as a necessary input file for this DAG node. More... | |
def | add_output_file (self, filename) |
Add filename as a output file for this DAG node. More... | |
def | add_checkpoint_file (self, filename) |
Add filename as a checkpoint file for this DAG job. More... | |
def | get_input_files (self) |
Return list of input files for this DAG node. More... | |
def | get_output_files (self) |
Return list of output files for this DAG node. More... | |
def | get_checkpoint_files (self) |
Return a list of checkpoint files for this DAG node. More... | |
def | add_arg (self, arg) |
Add an argument to the executable. More... | |
def | add_file_arg (self, filename) |
Add a file argument to the executable. More... | |
def | get_args (self) |
Return the list of arguments that are to be passed to the executable. More... | |
def | add_opt (self, opt, value) |
Add a command line option to the executable. More... | |
def | get_opt (self, opt) |
Returns the value associated with the given command line option. More... | |
def | add_file_opt (self, opt, filename) |
Add a command line option to the executable. More... | |
def | get_opts (self) |
Return the dictionary of opts for the job. More... | |
def | add_short_opt (self, opt, value) |
Add a command line option to the executable. More... | |
def | get_short_opts (self) |
Return the dictionary of short options for the job. More... | |
def | add_ini_opts (self, cp, section) |
Parse command line options from a given section in an ini file and pass to the executable. More... | |
def | set_notification (self, value) |
Set the email address to send notification to. More... | |
def | set_log_file (self, path) |
Set the Condor log file. More... | |
def | set_stdin_file (self, path) |
Set the file from which Condor directs the stdin of the job. More... | |
def | get_stdin_file (self) |
Get the file from which Condor directs the stdin of the job. More... | |
def | set_stderr_file (self, path) |
Set the file to which Condor directs the stderr of the job. More... | |
def | get_stderr_file (self) |
Get the file to which Condor directs the stderr of the job. More... | |
def | set_stdout_file (self, path) |
Set the file to which Condor directs the stdout of the job. More... | |
def | get_stdout_file (self) |
Get the file to which Condor directs the stdout of the job. More... | |
def | set_sub_file (self, path) |
Set the name of the file to write the Condor submit file to when write_sub_file() is called. More... | |
def | get_sub_file (self) |
Get the name of the file which the Condor submit file will be written to when write_sub_file() is called. More... | |
def | write_sub_file (self) |
Write a submit file for this Condor job. More... | |
def lal.pipeline.CondorJob.__init__ | ( | self, | |
universe, | |||
executable, | |||
queue | |||
) |
universe | the condor universe to run the job in. |
executable | the executable to run. |
queue | number of jobs to queue. |
Reimplemented in lal.pipeline.LSCDataFindJob, lal.pipeline.LigolwSqliteJob, lal.pipeline.SqliteJob, lal.pipeline.LigolwAddJob, lal.pipeline.LigolwCutJob, lal.pipeline.NoopJob, and lal.pipeline.CondorDAGJob.
Definition at line 82 of file pipeline.py.
def lal.pipeline.CondorJob.get_executable | ( | self | ) |
Return the name of the executable for this job.
Definition at line 109 of file pipeline.py.
def lal.pipeline.CondorJob.set_executable | ( | self, | |
executable | |||
) |
Set the name of the executable for this job.
Definition at line 115 of file pipeline.py.
def lal.pipeline.CondorJob.get_universe | ( | self | ) |
Return the condor universe that the job will run in.
Definition at line 121 of file pipeline.py.
def lal.pipeline.CondorJob.set_universe | ( | self, | |
universe | |||
) |
Set the condor universe for the job to run in.
universe | the condor universe to run the job in. |
Definition at line 128 of file pipeline.py.
def lal.pipeline.CondorJob.get_grid_type | ( | self | ) |
Return the grid type of the job.
Definition at line 134 of file pipeline.py.
def lal.pipeline.CondorJob.set_grid_type | ( | self, | |
grid_type | |||
) |
Set the type of grid resource for the job.
grid_type | type of grid resource. |
Definition at line 141 of file pipeline.py.
def lal.pipeline.CondorJob.get_grid_server | ( | self | ) |
Return the grid server on which the job will run.
Definition at line 147 of file pipeline.py.
def lal.pipeline.CondorJob.set_grid_server | ( | self, | |
grid_server | |||
) |
Set the grid server on which to run the job.
grid_server | grid server on which to run. |
Definition at line 154 of file pipeline.py.
def lal.pipeline.CondorJob.get_grid_scheduler | ( | self | ) |
Return the grid scheduler.
Definition at line 160 of file pipeline.py.
def lal.pipeline.CondorJob.set_grid_scheduler | ( | self, | |
grid_scheduler | |||
) |
Set the grid scheduler.
grid_scheduler | grid scheduler on which to run. |
Definition at line 167 of file pipeline.py.
def lal.pipeline.CondorJob.set_executable_installed | ( | self, | |
installed | |||
) |
If executable installed is true, then no copying of the executable is done.
If it is false, pegasus stages the executable to the remote site. Default is executable is installed (i.e. True).
installed | true or fale |
Definition at line 176 of file pipeline.py.
def lal.pipeline.CondorJob.get_executable_installed | ( | self | ) |
return whether or not the executable is installed
Definition at line 182 of file pipeline.py.
def lal.pipeline.CondorJob.add_condor_cmd | ( | self, | |
cmd, | |||
value | |||
) |
Add a Condor command to the submit file (e.g.
a class add or evironment).
cmd | Condor command directive. |
value | value for command. |
Definition at line 190 of file pipeline.py.
def lal.pipeline.CondorJob.get_condor_cmds | ( | self | ) |
Return the dictionary of condor keywords to add to the job.
Definition at line 196 of file pipeline.py.
def lal.pipeline.CondorJob.add_input_file | ( | self, | |
filename | |||
) |
Add filename as a necessary input file for this DAG node.
filename | input filename to add |
Definition at line 204 of file pipeline.py.
def lal.pipeline.CondorJob.add_output_file | ( | self, | |
filename | |||
) |
Add filename as a output file for this DAG node.
filename | output filename to add |
Definition at line 213 of file pipeline.py.
def lal.pipeline.CondorJob.add_checkpoint_file | ( | self, | |
filename | |||
) |
Add filename as a checkpoint file for this DAG job.
Definition at line 220 of file pipeline.py.
def lal.pipeline.CondorJob.get_input_files | ( | self | ) |
Return list of input files for this DAG node.
Definition at line 227 of file pipeline.py.
def lal.pipeline.CondorJob.get_output_files | ( | self | ) |
Return list of output files for this DAG node.
Definition at line 233 of file pipeline.py.
def lal.pipeline.CondorJob.get_checkpoint_files | ( | self | ) |
Return a list of checkpoint files for this DAG node.
Definition at line 239 of file pipeline.py.
def lal.pipeline.CondorJob.add_arg | ( | self, | |
arg | |||
) |
Add an argument to the executable.
Arguments are appended after any options and their order is guaranteed.
arg | argument to add. |
Definition at line 247 of file pipeline.py.
def lal.pipeline.CondorJob.add_file_arg | ( | self, | |
filename | |||
) |
Add a file argument to the executable.
Arguments are appended after any options and their order is guaranteed. Also adds the file name to the list of required input data for this job.
filename | file to add as argument. |
Definition at line 256 of file pipeline.py.
def lal.pipeline.CondorJob.get_args | ( | self | ) |
Return the list of arguments that are to be passed to the executable.
Definition at line 264 of file pipeline.py.
def lal.pipeline.CondorJob.add_opt | ( | self, | |
opt, | |||
value | |||
) |
Add a command line option to the executable.
The order that the arguments will be appended to the command line is not guaranteed, but they will always be added before any command line arguments. The name of the option is prefixed with double hyphen and the program is expected to parse it with getopt_long().
opt | command line option to add. |
value | value to pass to the option (None for no argument). |
Definition at line 276 of file pipeline.py.
def lal.pipeline.CondorJob.get_opt | ( | self, | |
opt | |||
) |
Returns the value associated with the given command line option.
Returns None if the option does not exist in the options list.
opt | command line option |
Definition at line 284 of file pipeline.py.
def lal.pipeline.CondorJob.add_file_opt | ( | self, | |
opt, | |||
filename | |||
) |
Add a command line option to the executable.
The order that the arguments will be appended to the command line is not guaranteed, but they will always be added before any command line arguments. The name of the option is prefixed with double hyphen and the program is expected to parse it with getopt_long().
opt | command line option to add. |
filename | value to pass to the option (None for no argument). |
Definition at line 298 of file pipeline.py.
def lal.pipeline.CondorJob.get_opts | ( | self | ) |
Return the dictionary of opts for the job.
Definition at line 306 of file pipeline.py.
def lal.pipeline.CondorJob.add_short_opt | ( | self, | |
opt, | |||
value | |||
) |
Add a command line option to the executable.
The order that the arguments will be appended to the command line is not guaranteed, but they will always be added before any command line arguments. The name of the option is prefixed with single hyphen and the program is expected to parse it with getopt() or getopt_long() (if a single character option), or getopt_long_only() (if multiple characters). Long and (single-character) short options may be mixed if the executable permits this.
opt | command line option to add. |
value | value to pass to the option (None for no argument). |
Definition at line 320 of file pipeline.py.
def lal.pipeline.CondorJob.get_short_opts | ( | self | ) |
Return the dictionary of short options for the job.
Definition at line 326 of file pipeline.py.
def lal.pipeline.CondorJob.add_ini_opts | ( | self, | |
cp, | |||
section | |||
) |
Parse command line options from a given section in an ini file and pass to the executable.
cp | ConfigParser object pointing to the ini file. |
section | section of the ini file to add to the options. |
Definition at line 335 of file pipeline.py.
def lal.pipeline.CondorJob.set_notification | ( | self, | |
value | |||
) |
Set the email address to send notification to.
value | email address or never for no notification. |
Definition at line 344 of file pipeline.py.
def lal.pipeline.CondorJob.set_log_file | ( | self, | |
path | |||
) |
Set the Condor log file.
path | path to log file. |
Definition at line 351 of file pipeline.py.
def lal.pipeline.CondorJob.set_stdin_file | ( | self, | |
path | |||
) |
Set the file from which Condor directs the stdin of the job.
path | path to stdin file. |
Definition at line 358 of file pipeline.py.
def lal.pipeline.CondorJob.get_stdin_file | ( | self | ) |
Get the file from which Condor directs the stdin of the job.
Definition at line 364 of file pipeline.py.
def lal.pipeline.CondorJob.set_stderr_file | ( | self, | |
path | |||
) |
Set the file to which Condor directs the stderr of the job.
path | path to stderr file. |
Definition at line 371 of file pipeline.py.
def lal.pipeline.CondorJob.get_stderr_file | ( | self | ) |
Get the file to which Condor directs the stderr of the job.
Definition at line 377 of file pipeline.py.
def lal.pipeline.CondorJob.set_stdout_file | ( | self, | |
path | |||
) |
Set the file to which Condor directs the stdout of the job.
path | path to stdout file. |
Definition at line 384 of file pipeline.py.
def lal.pipeline.CondorJob.get_stdout_file | ( | self | ) |
Get the file to which Condor directs the stdout of the job.
Definition at line 390 of file pipeline.py.
def lal.pipeline.CondorJob.set_sub_file | ( | self, | |
path | |||
) |
Set the name of the file to write the Condor submit file to when write_sub_file() is called.
path | path to submit file. |
Definition at line 398 of file pipeline.py.
def lal.pipeline.CondorJob.get_sub_file | ( | self | ) |
Get the name of the file which the Condor submit file will be written to when write_sub_file() is called.
Definition at line 405 of file pipeline.py.
def lal.pipeline.CondorJob.write_sub_file | ( | self | ) |
Write a submit file for this Condor job.
Definition at line 411 of file pipeline.py.