BugCFHEP114.py
Go to the documentation of this file.
1 #!/usr/bin/env gaudirun.py
2 
3 '''
4 Options file to test fix for https://sft.its.cern.ch/jira/browse/CFHEP-114
5 a problem which is ther when declaring dependencies explicitely in the scheduler
6 and having more dependencies than algorithms.
7 '''
8 
9 from Gaudi.Configuration import *
10 from Configurables import HiveWhiteBoard, HiveSlimEventLoopMgr, ForwardSchedulerSvc, CPUCruncher,AlgResourcePool
11 
12 InertMessageSvc(OutputLevel=INFO)
13 
14 # metaconfig
15 evtslots = 13
16 evtMax = 50
17 cardinality=10
18 algosInFlight=10
19 
20 whiteboard = HiveWhiteBoard("EventDataSvc",
21  EventSlots = evtslots)
22 
23 slimeventloopmgr = HiveSlimEventLoopMgr(OutputLevel=INFO)
24 
25 scheduler = ForwardSchedulerSvc(MaxEventsInFlight = evtslots,
26  MaxAlgosInFlight = algosInFlight,
27  OutputLevel=WARNING,
28  AlgosDependencies = [[],['/Event/a1'],['/Event/a1'],['/Event/a2','/Event/a3','/Event/a4']])
29 
30 AlgResourcePool(OutputLevel=DEBUG)
31 
32 a1 = CPUCruncher("A1",
33  shortCalib=True,
34  varRuntime=.01,
35  avgRuntime=.1 )
36 a1.DataOutputs.output_0.Path = '/Event/a1'
37 
38 a2 = CPUCruncher("A2",
39  shortCalib=True)
40 a2.DataOutputs.output_0.Path = '/Event/a2'
41 
42 a3 = CPUCruncher("A3",
43  shortCalib=True)
44 a3.DataOutputs.output_0.Path = '/Event/a3'
45 a3.DataOutputs.output_1.Path = '/Event/a4'
46 
47 a4 = CPUCruncher("A4",
48  shortCalib=True)
49 a4.DataOutputs.output_0.Path = '/Event/a5'
50 
51 for algo in [a1,a2,a3,a4]:
52  algo.Cardinality = cardinality
53  algo.OutputLevel=WARNING
54 
55 ApplicationMgr( EvtMax = evtMax,
56  EvtSel = 'NONE',
57  ExtSvc =[whiteboard],
58  EventLoop = slimeventloopmgr,
59  TopAlg = [a1,a2,a3,a4],
60  MessageSvcType="InertMessageSvc")
Thread safe extension to the standard MessageSvc.
The Application Manager class.