34 """Setup Algorithm Scheduler"""
36 from AthenaCommon.AppMgr
import ServiceMgr
as svcMgr
39 from AthenaCommon.ConcurrencyFlags
import jobproperties
as jps
40 from AthenaCommon.Logging
import logging
42 self.
log = logging.getLogger(
'AlgScheduler' )
44 if (theSched
is None) :
45 from GaudiHive.GaudiHiveConf
import AvalancheSchedulerSvc
46 svcMgr += AvalancheSchedulerSvc()
52 if (thePrec
is None) :
53 from GaudiHive.GaudiHiveConf
import PrecedenceSvc
63 self.
SchedulerSvc.ThreadPoolSize = jps.ConcurrencyFlags.NumThreads()
66 self.
log.
info(
"setting up " + self.
SchedulerSvc.getFullName() +
" with " +
str(jps.ConcurrencyFlags.NumThreads()) +
" threads")
72 """setup a different Scheduler"""
74 if (self.SchedulerSvc.getFullName() != theSched.getFullName()) :
75 self.log.
info(
"replacing " + self.SchedulerSvc.getFullName()
76 +
" with " + theSched.getFullName())
77 from AthenaCommon.AppMgr
import ServiceMgr
as svcMgr
78 svcMgr.remove(self.SchedulerSvc)
80 self.SchedulerSvc = theSched
85 self.SchedulerSvc.OutputLevel = level
86 self.PrecedenceSvc.OutputLevel = level
91 if (
'CheckDependencies' in self.SchedulerSvc.
properties() ):
92 self.SchedulerSvc.CheckDependencies = check
94 self.log.warning( self.SchedulerSvc.getFullName() +
" has no property \"CheckDependencies\"")
99 if (
'ShowControlFlow' in self.SchedulerSvc.
properties() ):
100 self.SchedulerSvc.ShowControlFlow = show
102 self.log.warning(self.SchedulerSvc.getFullName() +
" has no property \"ShowControlFlow\"")
107 if (
'ShowDataFlow' in self.SchedulerSvc.
properties() ):
108 self.SchedulerSvc.ShowDataFlow = show
110 self.log.warning(self.SchedulerSvc.getFullName() +
" has no property \"ShowDataFlow\"")
115 if (
'ShowDataDependencies' in self.SchedulerSvc.
properties() ):
116 self.SchedulerSvc.ShowDataDependencies = show
118 self.log.warning(self.SchedulerSvc.getFullName() +
" has no property \"ShowDataDependencies\"")
123 if (
'DataLoaderAlg' in self.SchedulerSvc.
properties() ):
124 self.SchedulerSvc.DataLoaderAlg = dataLoadAlg
126 self.log.warning(self.SchedulerSvc.getFullName() +
" has no property \"DataLoaderAlg\"")
131 if (
'EnableConditions' in self.SchedulerSvc.
properties() ):
132 self.SchedulerSvc.EnableConditions = enable
134 self.log.warning(self.SchedulerSvc.getFullName() +
" has no property \"EnableConditions\"")
139 if (
'VerboseSubSlots' in self.SchedulerSvc.
properties() ):
140 self.SchedulerSvc.VerboseSubSlots = enable
142 self.log.warning(self.SchedulerSvc.getFullName() +
" has no property \"VerboseSubSlots\"")
147 if (
'Optimizer' in self.SchedulerSvc.
properties() ):
148 self.SchedulerSvc.Optimizer = rule
150 self.log.warning(self.SchedulerSvc.getFullName() +
" has no property \"Optimizer\"")
151 if (
'TaskPriorityRule' in self.PrecedenceSvc.
properties() ):
152 self.PrecedenceSvc.TaskPriorityRule = rule
154 self.log.warning(self.PrecedenceSvc.getFullName() +
" has no property \"TaskPriorityRule\"")
159 self.SchedulerSvc.ThreadPoolSize = tps
164 """Get the Scheduler"""
165 return self.SchedulerSvc