![]() |
ATLAS Offline Software
|
ParallelJobProcessor: a multiple-process processor of Job objects. More...
Public Member Functions | |
| __init__ (self, jobSubmission=None, numberOfProcesses=multiprocessing.cpu_count(), startMethod="fork") | |
| initialisation method that accepts submissions and starts pool | |
| __str__ (self) | |
| return an object self-description string | |
| printout (self) | |
| print in a human-readable way the items of the object self | |
| submit (self, jobSubmission=None) | |
| submit a Job object or a JobGroup object for processing | |
| getResults (self) | |
| get results of JobGroup object submission | |
| statusReport (self) | |
| return a status report string | |
Public Attributes | |
| jobSubmission = jobSubmission | |
| numberOfProcesses = numberOfProcesses | |
| startMethod = startMethod | |
| className = self.__class__.__name__ | |
| str | status = "starting" |
| countOfJobs = None | |
| int | countOfRemainingJobs = 0 |
| pool | |
| list | listOfNamesOfRemainingJobs = [] |
Protected Member Functions | |
| _abort (self) | |
| abort parallel job processor | |
| _terminate (self) | |
| terminate parallel job processor | |
ParallelJobProcessor: a multiple-process processor of Job objects.
| jobSubmission | Job object or JobGroup object for submission |
| numberOfProcesses | the number of processes in the process pool |
Definition at line 869 of file trfUtils.py.
| python.trfUtils.ParallelJobProcessor.__init__ | ( | self, | |
| jobSubmission = None, | |||
| numberOfProcesses = multiprocessing.cpu_count(), | |||
| startMethod = "fork" ) |
initialisation method that accepts submissions and starts pool
This method is the initialisation method of the parallel job processor. It accepts input JobGroup object submissions and prepares a pool of workers.
Definition at line 875 of file trfUtils.py.
| python.trfUtils.ParallelJobProcessor.__str__ | ( | self | ) |
return an object self-description string
This method returns an object description string consisting of a listing of the items of the object self.
Definition at line 921 of file trfUtils.py.
|
protected |
abort parallel job processor
This method aborts the parallel job processor. It is used typically when an exception is raised.
Definition at line 1225 of file trfUtils.py.
|
protected |
terminate parallel job processor
This method terminates the parallel job processor. It terminates the subprocesses of the parallel job processor. It is used typically when terminating the parallel job processor on successful completion of job processing and when aborting the parallel job processor.
Definition at line 1238 of file trfUtils.py.
| python.trfUtils.ParallelJobProcessor.getResults | ( | self | ) |
get results of JobGroup object submission
This method returns an ordered list of results for jobs submitted.
Definition at line 1022 of file trfUtils.py.
| python.trfUtils.ParallelJobProcessor.printout | ( | self | ) |
print in a human-readable way the items of the object self
This function prints in a human-readable way the items of the object self.
Definition at line 933 of file trfUtils.py.
| python.trfUtils.ParallelJobProcessor.statusReport | ( | self | ) |
return a status report string
This method returns a status report string, detailing information on the JobGroup submission and on the job processing status.
Definition at line 1168 of file trfUtils.py.
| python.trfUtils.ParallelJobProcessor.submit | ( | self, | |
| jobSubmission = None ) |
submit a Job object or a JobGroup object for processing
This method submits a specified Job object or JobGroup object for processing. On successful submission, it returns the value 0.
Definition at line 941 of file trfUtils.py.
| python.trfUtils.ParallelJobProcessor.className = self.__class__.__name__ |
Definition at line 887 of file trfUtils.py.
| python.trfUtils.ParallelJobProcessor.countOfJobs = None |
Definition at line 894 of file trfUtils.py.
| int python.trfUtils.ParallelJobProcessor.countOfRemainingJobs = 0 |
Definition at line 895 of file trfUtils.py.
| python.trfUtils.ParallelJobProcessor.jobSubmission = jobSubmission |
Definition at line 884 of file trfUtils.py.
| list python.trfUtils.ParallelJobProcessor.listOfNamesOfRemainingJobs = [] |
Definition at line 965 of file trfUtils.py.
| python.trfUtils.ParallelJobProcessor.numberOfProcesses = numberOfProcesses |
Definition at line 885 of file trfUtils.py.
| python.trfUtils.ParallelJobProcessor.pool |
Definition at line 897 of file trfUtils.py.
| python.trfUtils.ParallelJobProcessor.startMethod = startMethod |
Definition at line 886 of file trfUtils.py.
| str python.trfUtils.ParallelJobProcessor.status = "starting" |
Definition at line 889 of file trfUtils.py.