Package glue :: Module pipeline :: Class CondorJob
[hide private]
[frames] | no frames]

Class CondorJob

source code

Known Subclasses:

Generic condor job class. Provides methods to set the options in the condor submit file for a particular executable

Instance Methods [hide private]
 
__init__(self, universe, executable, queue) source code
 
add_arg(self, arg)
Add an argument to the executable.
source code
 
add_checkpoint_file(self, filename)
Add filename as a checkpoint file for this DAG job.
source code
 
add_condor_cmd(self, cmd, value)
Add a Condor command to the submit file (e.g.
source code
 
add_file_arg(self, filename)
Add a file argument to the executable.
source code
 
add_file_opt(self, opt, filename)
Add a command line option to the executable.
source code
 
add_ini_opts(self, cp, section)
Parse command line options from a given section in an ini file and pass to the executable.
source code
 
add_input_file(self, filename)
Add filename as a necessary input file for this DAG node.
source code
 
add_opt(self, opt, value)
Add a command line option to the executable.
source code
 
add_output_file(self, filename)
Add filename as a output file for this DAG node.
source code
 
add_short_opt(self, opt, value)
Add a command line option to the executable.
source code
 
get_args(self)
Return the list of arguments that are to be passed to the executable.
source code
 
get_checkpoint_files(self)
Return a list of checkpoint files for this DAG node
source code
 
get_condor_cmds(self)
Return the dictionary of condor keywords to add to the job
source code
 
get_executable(self)
Return the name of the executable for this job.
source code
 
get_executable_installed(self)
return whether or not the executable is installed
source code
 
get_grid_scheduler(self)
Return the grid scheduler.
source code
 
get_grid_server(self)
Return the grid server on which the job will run.
source code
 
get_grid_type(self)
Return the grid type of the job.
source code
 
get_input_files(self)
Return list of input files for this DAG node.
source code
 
get_opt(self, opt)
Returns the value associated with the given command line option.
source code
 
get_opts(self)
Return the dictionary of opts for the job.
source code
 
get_output_files(self)
Return list of output files for this DAG node.
source code
 
get_short_opts(self)
Return the dictionary of short options for the job.
source code
 
get_stderr_file(self)
Get the file to which Condor directs the stderr of the job.
source code
 
get_stdin_file(self)
Get the file from which Condor directs the stdin of the job.
source code
 
get_stdout_file(self)
Get the file to which Condor directs the stdout of the job.
source code
 
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.
source code
 
get_universe(self)
Return the condor universe that the job will run in.
source code
 
set_executable(self, executable)
Set the name of the executable for this job.
source code
 
set_executable_installed(self, installed)
If executable installed is true, then no copying of the executable is done.
source code
 
set_grid_scheduler(self, grid_scheduler)
Set the grid scheduler.
source code
 
set_grid_server(self, grid_server)
Set the grid server on which to run the job.
source code
 
set_grid_type(self, grid_type)
Set the type of grid resource for the job.
source code
 
set_log_file(self, path)
Set the Condor log file.
source code
 
set_notification(self, value)
Set the email address to send notification to.
source code
 
set_stderr_file(self, path)
Set the file to which Condor directs the stderr of the job.
source code
 
set_stdin_file(self, path)
Set the file from which Condor directs the stdin of the job.
source code
 
set_stdout_file(self, path)
Set the file to which Condor directs the stdout of the job.
source code
 
set_sub_file(self, path)
Set the name of the file to write the Condor submit file to when write_sub_file() is called.
source code
 
set_universe(self, universe)
Set the condor universe for the job to run in.
source code
 
write_sub_file(self)
Write a submit file for this Condor job.
source code
Method Details [hide private]

__init__(self, universe, executable, queue)
(Constructor)

source code 
Parameters:
  • universe - the condor universe to run the job in.
  • executable - the executable to run.
  • queue - number of jobs to queue.

add_arg(self, arg)

source code 

Add an argument to the executable. Arguments are appended after any options and their order is guaranteed.

Parameters:
  • arg - argument to add.

add_condor_cmd(self, cmd, value)

source code 

Add a Condor command to the submit file (e.g. a class add or evironment).

Parameters:
  • cmd - Condor command directive.
  • value - value for command.

add_file_arg(self, filename)

source code 

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:
  • filename - file to add as argument.

add_file_opt(self, opt, filename)

source code 

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:
  • opt - command line option to add.
  • value - value to pass to the option (None for no argument).

add_ini_opts(self, cp, section)

source code 

Parse command line options from a given section in an ini file and pass to the executable.

Parameters:
  • cp - ConfigParser object pointing to the ini file.
  • section - section of the ini file to add to the options.

add_input_file(self, filename)

source code 

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

Parameters:
  • filename - input filename to add

add_opt(self, opt, value)

source code 

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:
  • opt - command line option to add.
  • value - value to pass to the option (None for no argument).

add_output_file(self, filename)

source code 

Add filename as a output file for this DAG node.

Parameters:
  • filename - output filename to add

add_short_opt(self, opt, value)

source code 

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:
  • opt - command line option to add.
  • value - value to pass to the option (None for no argument).

get_opt(self, opt)

source code 

Returns the value associated with the given command line option. Returns None if the option does not exist in the options list.

Parameters:
  • opt - command line option

set_executable_installed(self, installed)

source code 

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:
  • installed - true or fale

set_grid_scheduler(self, grid_scheduler)

source code 

Set the grid scheduler.

Parameters:
  • grid_scheduler - grid scheduler on which to run.

set_grid_server(self, grid_server)

source code 

Set the grid server on which to run the job.

Parameters:
  • grid_server - grid server on which to run.

set_grid_type(self, grid_type)

source code 

Set the type of grid resource for the job.

Parameters:
  • grid_type - type of grid resource.

set_log_file(self, path)

source code 

Set the Condor log file.

Parameters:
  • path - path to log file.

set_notification(self, value)

source code 

Set the email address to send notification to.

Parameters:
  • value - email address or never for no notification.

set_stderr_file(self, path)

source code 

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

Parameters:
  • path - path to stderr file.

set_stdin_file(self, path)

source code 

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

Parameters:
  • path - path to stdin file.

set_stdout_file(self, path)

source code 

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

Parameters:
  • path - path to stdout file.

set_sub_file(self, path)

source code 

Set the name of the file to write the Condor submit file to when write_sub_file() is called.

Parameters:
  • path - path to submit file.

set_universe(self, universe)

source code 

Set the condor universe for the job to run in.

Parameters:
  • universe - the condor universe to run the job in.