ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
python.TaskManager.JobAnalyzer Class Reference
Collaboration diagram for python.TaskManager.JobAnalyzer:

Public Member Functions

def __init__ (self, jobDir, dsName, taskName)
 
def jobList (self)
 
def jobStatus (self, jobName)
 

Public Attributes

 jobDir
 
 dsName
 
 taskName
 
 path
 

Detailed Description

JobAnalyzer is a class for analyzing the jobs of a given task.

Definition at line 674 of file TaskManager.py.

Constructor & Destructor Documentation

◆ __init__()

def python.TaskManager.JobAnalyzer.__init__ (   self,
  jobDir,
  dsName,
  taskName 
)

Definition at line 677 of file TaskManager.py.

677  def __init__(self,jobDir,dsName,taskName):
678  self.jobDir = jobDir
679  self.dsName = dsName
680  self.taskName = taskName
681  self.path = jobDir+'/'+dsName+'/'+taskName
682  #self.maxWallTime = 5*86400 # max time job should be running in s
683 
684 

Member Function Documentation

◆ jobList()

def python.TaskManager.JobAnalyzer.jobList (   self)

Definition at line 685 of file TaskManager.py.

685  def jobList(self):
686  try:
687  l = os.listdir(self.path)
688  except Exception:
689  l = []
690  return l
691 
692 

◆ jobStatus()

def python.TaskManager.JobAnalyzer.jobStatus (   self,
  jobName 
)

Definition at line 693 of file TaskManager.py.

693  def jobStatus(self,jobName):
694  status = TaskManager.StatusCodes['UNKNOWN']
695  exitcode = ''
696  p = self.path+'/'+jobName
697  if os.path.exists(p):
698  if glob.glob(p+'/*.config.py'):
699  status = TaskManager.StatusCodes['CONFIGURED']
700  if glob.glob(p+'/*.SUBMITTED'):
701  status = TaskManager.StatusCodes['SUBMITTED']
702  # Protect against jobs dying w/o updating time stamp files - must be
703  # accompanied by similar protection in TaskAnalyzer
704  #r = glob.glob(p+'/*.RUNNING'):
705  #if r:
706  # status = TaskManager.StatusCodes['RUNNING']
707  # if len(r)==1 && (time.time()-os.path.getctime(r[0]))>self.maxWallTime:
708  # status = TaskManager.StatusCodes['FAILED']
709  if glob.glob(p+'/*.RUNNING'):
710  status = TaskManager.StatusCodes['RUNNING']
711  if glob.glob(p+'/*.POSTPROCESSING'):
712  status = TaskManager.StatusCodes['POSTPROCESSING']
713  if glob.glob(p+'/*.COMPLETED'):
714  status = TaskManager.StatusCodes['COMPLETED']
715  # Check if job completed w/o producing an exit status
716  if len(glob.glob(p+'/*.exit.0'))==0:
717  status = TaskManager.StatusCodes['FAILED']
718  try:
719  exitcode = open(glob.glob(p+'/*.exitstatus.dat')[0]).read()
720  except Exception:
721  pass
722  if len(glob.glob(p+'/*.exit.*'))>len(glob.glob(p+'/*.exit.0')):
723  status = TaskManager.StatusCodes['FAILED']
724  return (status,exitcode)
725 
726 
727 #
728 # Test code for modules
729 #

Member Data Documentation

◆ dsName

python.TaskManager.JobAnalyzer.dsName

Definition at line 679 of file TaskManager.py.

◆ jobDir

python.TaskManager.JobAnalyzer.jobDir

Definition at line 678 of file TaskManager.py.

◆ path

python.TaskManager.JobAnalyzer.path

Definition at line 681 of file TaskManager.py.

◆ taskName

python.TaskManager.JobAnalyzer.taskName

Definition at line 680 of file TaskManager.py.


The documentation for this class was generated from the following file:
read
IovVectorMap_t read(const Folder &theFolder, const SelectionCriterion &choice, const unsigned int limit=10)
Definition: openCoraCool.cxx:569
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
Trk::open
@ open
Definition: BinningType.h:40