RHESSysCalibrator  2.1.0
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
rhessyscalibrator.calibration_runner.CalibrationRunnerPBS Class Reference

CalibrationRunner for use with PBS/TORQUE job management system. More...

Inheritance diagram for rhessyscalibrator.calibration_runner.CalibrationRunnerPBS:
rhessyscalibrator.calibration_runner.CalibrationRunnerQueue rhessyscalibrator.calibration_runner.CalibrationRunnerQueue rhessyscalibrator.calibration_runner.CalibrationRunnerQueue rhessyscalibrator.calibration_runner.CalibrationRunner rhessyscalibrator.calibration_runner.CalibrationRunner rhessyscalibrator.calibration_runner.CalibrationRunner rhessyscalibrator.calibration_runner.CalibrationRunner rhessyscalibrator.calibration_runner.CalibrationRunner rhessyscalibrator.calibration_runner.CalibrationRunner rhessyscalibrator.calibration_runner.CalibrationRunner rhessyscalibrator.calibration_runner.CalibrationRunner rhessyscalibrator.calibration_runner.CalibrationRunner

Public Member Functions

def getRunCmd (self, args, kwargs)
 Get job submission command given selected options. More...
 
def getRunStatusCmd (self, args, kwargs)
 Get job status command. More...
 
def getRunCmdRegex (self)
 Get compiled regular expression for parsing run command output. More...
 
def getRunStatusCmdRegex (self)
 Get compiled regular expression for parsing run status command output. More...
 
def mapStatusCode (self, status_code)
 Map between status codes of the underlying queue system and calibrator status codes. More...
 
def __init__ (self, basedir, session_id, queue, db_path, run_path, logger, restart_runs, submit_queue, polling_delay, mem_limit, max_active_jobs, wall_time)
 
def submitJob (self, job)
 Submit a job to the underlying queue system. More...
 
def getRunCmd (self, args, kwargs)
 Get job submission command given selected options. More...
 
def getRunStatusCmd (self, args, kwargs)
 Get job status command. More...
 
def getRunCmdRegex (self)
 Get compiled regular expression for parsing run command output. More...
 
def getRunStatusCmdRegex (self)
 Get compiled regular expression for parsing run status command output. More...
 
def mapStatusCode (self, status_code)
 Map between status codes of the underlying queue system and calibrator status codes. More...
 
def __init__ (self, basedir, session_id, queue, db_path, run_path, logger, restart_runs, submit_queue, polling_delay, mem_limit, max_active_jobs, wall_time)
 
def submitJob (self, job)
 Submit a job to the underlying queue system. More...
 
def getRunCmd (self, args, kwargs)
 Get job submission command given selected options. More...
 
def getRunStatusCmd (self, args, kwargs)
 Get job status command. More...
 
def getRunCmdRegex (self)
 Get compiled regular expression for parsing run command output. More...
 
def getRunStatusCmdRegex (self)
 Get compiled regular expression for parsing run status command output. More...
 
def mapStatusCode (self, status_code)
 Map between status codes of the underlying queue system and calibrator status codes. More...
 
def __init__ (self, basedir, session_id, queue, db_path, run_path, logger, restart_runs, submit_queue, polling_delay, mem_limit, max_active_jobs, wall_time)
 
def submitJob (self, job)
 Submit a job to the underlying queue system. More...
 
- Public Member Functions inherited from rhessyscalibrator.calibration_runner.CalibrationRunnerQueue
def getRunCmd (self, args, kwargs)
 Get job submission command given selected options. More...
 
def getRunStatusCmd (self, args, kwargs)
 Get job status command. More...
 
def getRunCmdRegex (self)
 Get compiled regular expression for parsing run command output. More...
 
def getRunStatusCmdRegex (self)
 Get compiled regular expression for parsing run status command output. More...
 
def submitJob (self, job)
 Submit a job to the underlying queue system. More...
 
def mapStatusCode (self, status_code)
 Map between status codes of the underlying queue system and calibrator status codes. More...
 
def __init__ (self, basedir, session_id, queue, db_path, run_path, logger, restart_runs, submit_queue, polling_delay, mem_limit, max_active_jobs)
 Concrete classes must use getRunCmd() and getRunStatusCmd() to initialize self.run_cmd and self.run_status_cmd before the run() method can be called. More...
 
def pollJobsStatus (self)
 Check status of jobs submitted. More...
 
def run (self)
 Method to be run in a consumer thread/process to launch a run submitted by procuder thread/process. More...
 
def getRunCmd (self, args, kwargs)
 Get job submission command given selected options. More...
 
def getRunStatusCmd (self, args, kwargs)
 Get job status command. More...
 
def getRunCmdRegex (self)
 Get compiled regular expression for parsing run command output. More...
 
def getRunStatusCmdRegex (self)
 Get compiled regular expression for parsing run status command output. More...
 
def submitJob (self, job)
 Submit a job to the underlying queue system. More...
 
def mapStatusCode (self, status_code)
 Map between status codes of the underlying queue system and calibrator status codes. More...
 
def __init__ (self, basedir, session_id, queue, db_path, run_path, logger, restart_runs, submit_queue, polling_delay, mem_limit, max_active_jobs)
 Concrete classes must use getRunCmd() and getRunStatusCmd() to initialize self.run_cmd and self.run_status_cmd before the run() method can be called. More...
 
def pollJobsStatus (self)
 Check status of jobs submitted. More...
 
def run (self)
 Method to be run in a consumer thread/process to launch a run submitted by procuder thread/process. More...
 
def getRunCmd (self, args, kwargs)
 Get job submission command given selected options. More...
 
def getRunStatusCmd (self, args, kwargs)
 Get job status command. More...
 
def getRunCmdRegex (self)
 Get compiled regular expression for parsing run command output. More...
 
def getRunStatusCmdRegex (self)
 Get compiled regular expression for parsing run status command output. More...
 
def submitJob (self, job)
 Submit a job to the underlying queue system. More...
 
def mapStatusCode (self, status_code)
 Map between status codes of the underlying queue system and calibrator status codes. More...
 
def __init__ (self, basedir, session_id, queue, db_path, run_path, logger, restart_runs, submit_queue, polling_delay, mem_limit, max_active_jobs)
 Concrete classes must use getRunCmd() and getRunStatusCmd() to initialize self.run_cmd and self.run_status_cmd before the run() method can be called. More...
 
def pollJobsStatus (self)
 Check status of jobs submitted. More...
 
def run (self)
 Method to be run in a consumer thread/process to launch a run submitted by procuder thread/process. More...
 
- Public Member Functions inherited from rhessyscalibrator.calibration_runner.CalibrationRunner
def __init__
 
def __del__ (self)
 
def run (self)
 
def storeJobInDB (self, job)
 Store new job in ModelRunnerDB2. More...
 
def jobCompleteCallback (self, args, kwargs)
 Called when a job is complete. More...
 
def __init__
 
def __del__ (self)
 
def run (self)
 
def storeJobInDB (self, job)
 Store new job in ModelRunnerDB2. More...
 
def jobCompleteCallback (self, args, kwargs)
 Called when a job is complete. More...
 
def __init__
 
def __del__ (self)
 
def run (self)
 
def storeJobInDB (self, job)
 Store new job in ModelRunnerDB2. More...
 
def jobCompleteCallback (self, args, kwargs)
 Called when a job is complete. More...
 

Public Attributes

 run_cmd
 
 run_status_cmd
 
 wall_time
 
- Public Attributes inherited from rhessyscalibrator.calibration_runner.CalibrationRunnerQueue
 submit_queue
 
 mem_limit
 
 max_active_jobs
 
 run_cmd
 
 run_status_cmd
 
- Public Attributes inherited from rhessyscalibrator.calibration_runner.CalibrationRunner
 basedir
 
 session_id
 
 queue
 
 db_path
 
 run_path
 
 logger
 
 restart_runs
 
 db
 
 numActiveJobs
 

Static Public Attributes

dictionary STATUS_MAP
 
- Static Public Attributes inherited from rhessyscalibrator.calibration_runner.CalibrationRunnerQueue
int INIT_SLEEP_SECS = 15
 
int JOB_STATUS_SLEEP_SECS = 60
 
int JOB_SUBMIT_PENDING_THRESHOLD_SLEEP_SECS = 90
 
int QUEUE_GET_TIMEOUT_SECS = 15
 
int EXIT_SLEEP_SECS = 5
 

Detailed Description

CalibrationRunner for use with PBS/TORQUE job management system.

Constructor & Destructor Documentation

def rhessyscalibrator.calibration_runner.CalibrationRunnerPBS.__init__ (   self,
  basedir,
  session_id,
  queue,
  db_path,
  run_path,
  logger,
  restart_runs,
  submit_queue,
  polling_delay,
  mem_limit,
  max_active_jobs,
  wall_time 
)
def rhessyscalibrator.calibration_runner.CalibrationRunnerPBS.__init__ (   self,
  basedir,
  session_id,
  queue,
  db_path,
  run_path,
  logger,
  restart_runs,
  submit_queue,
  polling_delay,
  mem_limit,
  max_active_jobs,
  wall_time 
)
def rhessyscalibrator.calibration_runner.CalibrationRunnerPBS.__init__ (   self,
  basedir,
  session_id,
  queue,
  db_path,
  run_path,
  logger,
  restart_runs,
  submit_queue,
  polling_delay,
  mem_limit,
  max_active_jobs,
  wall_time 
)

Member Function Documentation

def rhessyscalibrator.calibration_runner.CalibrationRunnerPBS.getRunCmd (   self,
  args,
  kwargs 
)

Get job submission command given selected options.

Returns
String representing job submission command
def rhessyscalibrator.calibration_runner.CalibrationRunnerPBS.getRunCmd (   self,
  args,
  kwargs 
)

Get job submission command given selected options.

Returns
String representing job submission command
def rhessyscalibrator.calibration_runner.CalibrationRunnerPBS.getRunCmd (   self,
  args,
  kwargs 
)

Get job submission command given selected options.

Returns
String representing job submission command
def rhessyscalibrator.calibration_runner.CalibrationRunnerPBS.getRunCmdRegex (   self)

Get compiled regular expression for parsing run command output.

def rhessyscalibrator.calibration_runner.CalibrationRunnerPBS.getRunCmdRegex (   self)

Get compiled regular expression for parsing run command output.

def rhessyscalibrator.calibration_runner.CalibrationRunnerPBS.getRunCmdRegex (   self)

Get compiled regular expression for parsing run command output.

def rhessyscalibrator.calibration_runner.CalibrationRunnerPBS.getRunStatusCmd (   self,
  args,
  kwargs 
)

Get job status command.

Returns
String representing job status command
def rhessyscalibrator.calibration_runner.CalibrationRunnerPBS.getRunStatusCmd (   self,
  args,
  kwargs 
)

Get job status command.

Returns
String representing job status command
def rhessyscalibrator.calibration_runner.CalibrationRunnerPBS.getRunStatusCmd (   self,
  args,
  kwargs 
)

Get job status command.

Returns
String representing job status command
def rhessyscalibrator.calibration_runner.CalibrationRunnerPBS.getRunStatusCmdRegex (   self)

Get compiled regular expression for parsing run status command output.

Concrete classes must return a regex that matches the job ID in group 1 and the job status in group 2.

def rhessyscalibrator.calibration_runner.CalibrationRunnerPBS.getRunStatusCmdRegex (   self)

Get compiled regular expression for parsing run status command output.

Concrete classes must return a regex that matches the job ID in group 1 and the job status in group 2.

def rhessyscalibrator.calibration_runner.CalibrationRunnerPBS.getRunStatusCmdRegex (   self)

Get compiled regular expression for parsing run status command output.

Concrete classes must return a regex that matches the job ID in group 1 and the job status in group 2.

def rhessyscalibrator.calibration_runner.CalibrationRunnerPBS.mapStatusCode (   self,
  status_code 
)

Map between status codes of the underlying queue system and calibrator status codes.

Parameters
status_codeString representing status code of underlying queue system
Returns
String representing calibrator status code
def rhessyscalibrator.calibration_runner.CalibrationRunnerPBS.mapStatusCode (   self,
  status_code 
)

Map between status codes of the underlying queue system and calibrator status codes.

Parameters
status_codeString representing status code of underlying queue system
Returns
String representing calibrator status code
def rhessyscalibrator.calibration_runner.CalibrationRunnerPBS.mapStatusCode (   self,
  status_code 
)

Map between status codes of the underlying queue system and calibrator status codes.

Parameters
status_codeString representing status code of underlying queue system
Returns
String representing calibrator status code
def rhessyscalibrator.calibration_runner.CalibrationRunnerPBS.submitJob (   self,
  job 
)

Submit a job to the underlying queue system.

Note
Will add job to calibration DB.
Parameters
jobmodel_runner_db.ModelRun representing the job to run

Exception if run status command output is not what was expected

def rhessyscalibrator.calibration_runner.CalibrationRunnerPBS.submitJob (   self,
  job 
)

Submit a job to the underlying queue system.

Note
Will add job to calibration DB.
Parameters
jobmodel_runner_db.ModelRun representing the job to run

Exception if run status command output is not what was expected

def rhessyscalibrator.calibration_runner.CalibrationRunnerPBS.submitJob (   self,
  job 
)

Submit a job to the underlying queue system.

Note
Will add job to calibration DB.
Parameters
jobmodel_runner_db.ModelRun representing the job to run

Exception if run status command output is not what was expected

Member Data Documentation

rhessyscalibrator.calibration_runner.CalibrationRunnerPBS.run_cmd
rhessyscalibrator.calibration_runner.CalibrationRunnerPBS.run_status_cmd
dictionary rhessyscalibrator.calibration_runner.CalibrationRunnerPBS.STATUS_MAP
static
Initial value:
1 = {'C': 'DONE', 'E': 'EXIT', 'H': 'WAIT',
2  'Q': 'PEND', 'R': 'RUN', 'T': 'UNKWN',
3  'W': 'WAIT', 'S': 'SSUSP'
4  }
rhessyscalibrator.calibration_runner.CalibrationRunnerPBS.wall_time

The documentation for this class was generated from the following file: