Loading [MathJax]/extensions/TeX/AMSsymbols.js
LAL 7.7.0.1-5e288d3
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
lal.pipeline.CondorJob Class Reference

Detailed Description

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...
 

Constructor & Destructor Documentation

◆ __init__()

def lal.pipeline.CondorJob.__init__ (   self,
  universe,
  executable,
  queue 
)
Parameters
universethe condor universe to run the job in.
executablethe executable to run.
queuenumber 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.

Member Function Documentation

◆ get_executable()

def lal.pipeline.CondorJob.get_executable (   self)

Return the name of the executable for this job.

Definition at line 109 of file pipeline.py.

◆ set_executable()

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.

◆ get_universe()

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.

◆ set_universe()

def lal.pipeline.CondorJob.set_universe (   self,
  universe 
)

Set the condor universe for the job to run in.

Parameters
universethe condor universe to run the job in.

Definition at line 128 of file pipeline.py.

◆ get_grid_type()

def lal.pipeline.CondorJob.get_grid_type (   self)

Return the grid type of the job.

Definition at line 134 of file pipeline.py.

◆ set_grid_type()

def lal.pipeline.CondorJob.set_grid_type (   self,
  grid_type 
)

Set the type of grid resource for the job.

Parameters
grid_typetype of grid resource.

Definition at line 141 of file pipeline.py.

◆ get_grid_server()

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.

◆ set_grid_server()

def lal.pipeline.CondorJob.set_grid_server (   self,
  grid_server 
)

Set the grid server on which to run the job.

Parameters
grid_servergrid server on which to run.

Definition at line 154 of file pipeline.py.

◆ get_grid_scheduler()

def lal.pipeline.CondorJob.get_grid_scheduler (   self)

Return the grid scheduler.

Definition at line 160 of file pipeline.py.

◆ set_grid_scheduler()

def lal.pipeline.CondorJob.set_grid_scheduler (   self,
  grid_scheduler 
)

Set the grid scheduler.

Parameters
grid_schedulergrid scheduler on which to run.

Definition at line 167 of file pipeline.py.

◆ set_executable_installed()

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).

Parameters
installedtrue or fale

Definition at line 176 of file pipeline.py.

◆ get_executable_installed()

def lal.pipeline.CondorJob.get_executable_installed (   self)

return whether or not the executable is installed

Definition at line 182 of file pipeline.py.

◆ add_condor_cmd()

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).

Parameters
cmdCondor command directive.
valuevalue for command.

Definition at line 190 of file pipeline.py.

◆ get_condor_cmds()

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.

◆ add_input_file()

def lal.pipeline.CondorJob.add_input_file (   self,
  filename 
)

Add filename as a necessary input file for this DAG node.

Parameters
filenameinput filename to add

Definition at line 204 of file pipeline.py.

◆ add_output_file()

def lal.pipeline.CondorJob.add_output_file (   self,
  filename 
)

Add filename as a output file for this DAG node.

Parameters
filenameoutput filename to add

Definition at line 213 of file pipeline.py.

◆ add_checkpoint_file()

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.

◆ get_input_files()

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.

◆ get_output_files()

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.

◆ get_checkpoint_files()

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.

◆ add_arg()

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.

Parameters
argargument to add.

Definition at line 247 of file pipeline.py.

◆ add_file_arg()

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.

Parameters
filenamefile to add as argument.

Definition at line 256 of file pipeline.py.

◆ get_args()

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.

◆ add_opt()

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().

Parameters
optcommand line option to add.
valuevalue to pass to the option (None for no argument).

Definition at line 276 of file pipeline.py.

◆ get_opt()

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.

Parameters
optcommand line option

Definition at line 284 of file pipeline.py.

◆ add_file_opt()

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().

Parameters
optcommand line option to add.
filenamevalue to pass to the option (None for no argument).

Definition at line 298 of file pipeline.py.

◆ get_opts()

def lal.pipeline.CondorJob.get_opts (   self)

Return the dictionary of opts for the job.

Definition at line 306 of file pipeline.py.

◆ add_short_opt()

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.

Parameters
optcommand line option to add.
valuevalue to pass to the option (None for no argument).

Definition at line 320 of file pipeline.py.

◆ get_short_opts()

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.

◆ add_ini_opts()

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.

Parameters
cpConfigParser object pointing to the ini file.
sectionsection of the ini file to add to the options.

Definition at line 335 of file pipeline.py.

◆ set_notification()

def lal.pipeline.CondorJob.set_notification (   self,
  value 
)

Set the email address to send notification to.

Parameters
valueemail address or never for no notification.

Definition at line 344 of file pipeline.py.

◆ set_log_file()

def lal.pipeline.CondorJob.set_log_file (   self,
  path 
)

Set the Condor log file.

Parameters
pathpath to log file.

Definition at line 351 of file pipeline.py.

◆ set_stdin_file()

def lal.pipeline.CondorJob.set_stdin_file (   self,
  path 
)

Set the file from which Condor directs the stdin of the job.

Parameters
pathpath to stdin file.

Definition at line 358 of file pipeline.py.

◆ get_stdin_file()

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.

◆ set_stderr_file()

def lal.pipeline.CondorJob.set_stderr_file (   self,
  path 
)

Set the file to which Condor directs the stderr of the job.

Parameters
pathpath to stderr file.

Definition at line 371 of file pipeline.py.

◆ get_stderr_file()

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.

◆ set_stdout_file()

def lal.pipeline.CondorJob.set_stdout_file (   self,
  path 
)

Set the file to which Condor directs the stdout of the job.

Parameters
pathpath to stdout file.

Definition at line 384 of file pipeline.py.

◆ get_stdout_file()

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.

◆ set_sub_file()

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.

Parameters
pathpath to submit file.

Definition at line 398 of file pipeline.py.

◆ get_sub_file()

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.

◆ write_sub_file()

def lal.pipeline.CondorJob.write_sub_file (   self)

Write a submit file for this Condor job.

Definition at line 411 of file pipeline.py.