Package bigjob_dynamic :: Module many_job :: Class many_job_service
[hide private]
[frames] | no frames]

Class many_job_service

source code


Instance Methods [hide private]
 
__init__(self, bigjob_list, coordination_url)
accepts resource list as key/value pair:...
source code
 
__init_bigjobs(self)
start on specified resources a bigjob
source code
 
__start_bigjob(self, bj_dict)
private method - starts a bigjob on the defined resource
source code
 
add_resource(self, resource_dictionary)
adds bigjob described in resource_dictionary to resources
source code
 
remove_resource(self, bigjob)
remove bigjob from resource list of manyjob
source code
 
__cleanup_resources(self)
called periodically from scheduling thread terminates big-jobs which are marked and don't have any running sub-jobs
source code
 
get_resources(self)
returns list with bigjob dictionaries for each managed bigjob 1 dictionary exists
source code
 
list_bigjobs(self)
returns a list of bigjob objects
source code
 
__schedule_bigjobs(self)
prioritizes bigjob_list (bigjob with shortest expected delay will have index 0)
source code
 
create_job(self, job_description) source code
 
__run_subjob(self, subjob) source code
 
queue_subjob(self, subjob) source code
 
__schedule_subjob(self, subjob)
find resource (bigjob) for subjob returns bigjob object
source code
 
__check_subjobs_states(self)
iterate through all sub-jobs and check state
source code
 
__free_resources(self, subjob)
free resources taken by subjob
source code
 
__reschedule_subjobs_thread(self)
periodically checks subjob_queue for unscheduled subjobs if a unscheduled job exists it is scheduled
source code
 
__get_free_cores(self, bigjob)
return number of free cores if bigjob is active
source code
 
__get_total_free_cores(self)
get's the total number of free cores from all active bigjobs
source code
 
cancel(self) source code
 
print_stats(self, times, description) source code
 
__has_finished(self, state) source code
 
__repr__(self)
repr(x)
source code
 
__del__(self) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, bigjob_list, coordination_url)
(Constructor)

source code 
accepts resource list as key/value pair:
( {"resource_url" : "gram://qb1.loni.org/jobmanager-pbs", "number_nodes" : "32", "allocation" : "loni_stopgap2", "queue" : "workq", "bigjob_agent": "$(HOME)/src/REMDgManager/bigjob/advert_launcher.sh",  "walltime":1000},
  {"resource_url" : "gram://qb1.loni.org/jobmanager-pbs", "number_nodes" : "32", "allocation" : "loni_stopgap2", "queue" : "workq", "bigjob_agent": "$(HOME)/src/REMDgManager/bigjob/advert_launcher.sh", "walltime":1000})

Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)