ATLAS Offline Software
Loading...
Searching...
No Matches
AthenaMPFlags.py
Go to the documentation of this file.
1# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
2
3# @file: AthenaMPFlags.py
4# @purpose: a container of flags for AthenaMP settings
5# @author: Mous Tatarkhanov <tmmous@berkeley.edu>
6
7__author__ = 'Mous Tatarkhanov'
8__version__ = "$Revision: 1.17 $"
9__doc__ = "A container of flags for AthenaMP"
10
11from AthenaCommon.JobProperties import JobProperty, JobPropertyContainer
12from AthenaCommon.JobProperties import jobproperties
13
14class WorkerTopDir(JobProperty):
15 """ Flag to set the location for worker's run dir
16 """
17 statusOn = True
18 allowedTypes = ['str']
19 StoredValue = 'athenaMP_workers'
20
21class OutputReportFile(JobProperty):
22 """ Flag to set the name of AthenaMP output report file
23 """
24 statusOn = True
25 allowedTypes = ['str']
26 StoredValue = 'AthenaMPOutputs'
27
28class AffinityCPUList(JobProperty):
29 """ Flag to set the pining of parallel workers to cpu from the list"""
30 statusOn = True
31 allowdTypes = ['list']
32 StoredValue = []
33
34class Strategy(JobProperty):
35 """ Switch to choose event scheduling strategy"""
36 statusOn = True
37 allowedTypes = ['str']
38 allowedValues = ['SharedQueue','EventService','RoundRobin']
39 StoredValue = 'SharedQueue'
40
41class CollectSubprocessLogs(JobProperty):
42 """ Flag for including all sub-process logs in the master log file
43 """
44 statusOn = True
45 allowedTypes = ['bool']
46 StoredValue = False
47
48class Version(JobProperty):
49 """ To distinguish between AthenaMP 1 and 2 (requested by transforms)
50 """
51 statusOn = True
52 allowedTypes = ['int']
53 allowedValues = [2]
54 StoredValue = 2
55
56class PollingInterval(JobProperty):
57 """ Time interval in milliseconds between subsequent polling of subproceses
58 """
59 statusOn = True
60 allowedTypes = ['int']
61 StoredValue = 100
62
63class EventsBeforeFork(JobProperty):
64 """ Flag to set the nbr of events to process before forking.
65 """
66 statusOn = True
67 allowedTypes = ['int']
68 StoredValue = 0
69
70class EventRangeChannel(JobProperty):
71 """ For the Event Service: Channel for communicating Event Ranges with the Pilot
72 """
73 statusOn = True
74 allowedTypes = ['str']
75 StoredValue = 'EventService_EventRanges'
76
77class EvtRangeScattererCaching(JobProperty):
78 """ For the Event Service: flag for activating extra event caching by the EvtRangeScatterer
79 """
80 statusOn = True
81 allowedTypes = ['bool']
82 StoredValue = False
83
84class MemSamplingInterval(JobProperty):
85 """ Time interval in seconds between taking memory samples
86 """
87 statusOn = True
88 allowedTypes = ['int']
89 StoredValue = 0
90
91class ChunkSize(JobProperty):
92 """ Size of event chunks in the shared queue
93 if chunk_size==-1, chunk size is set to auto_flush for files compressed with LZMA
94 if chunk_size==-2, chunk size is set to auto_flush for files compressed with LZMA or ZLIB
95 if chunk_size==-3, chunk size is set to auto_flush for files compressed with LZMA, ZLIB, or LZ4
96 if chunk_size<=-4, chunk size is set to auto_flush
97 """
98 statusOn = True
99 allowedTypes = ['int']
100 StoredValue = -1
101
102class ReadEventOrders(JobProperty):
103 """ Flag for reading event orders (Shared Queue) from an ASCII file for reproducibility
104 """
105 statusOn = True
106 allowedTypes = ['bool']
107 StoredValue = False
108
109class EventOrdersFile(JobProperty):
110 """ Name of the file for storing/reading event orders (Shared Queue)
111 """
112 statusOn = True
113 allowedTypes = ['str']
114 StoredValue = 'athenamp_eventorders.txt'
115
116class UseSharedReader(JobProperty):
117 """ Flag for activating shared reader process
118 """
119 statusOn = True
120 allowedTypes = ['bool']
121 StoredValue = False
122
123class UseSharedWriter(JobProperty):
124 """ Flag for activating shared writer process
125 """
126 statusOn = True
127 allowedTypes = ['bool']
128 StoredValue = False
129
130class UseParallelCompression(JobProperty):
131 """ Flag for activating event data compression in the workers
132 """
133 statusOn = True
134 allowedTypes = ['bool']
135 StoredValue = True
136
137# Defines the container for the performance monitoring flags
138class AthenaMPFlags(JobPropertyContainer):
139 """ The global AthenaMP job property container.
140 """
141 pass
142
143jobproperties.add_Container(AthenaMPFlags)
144
145
146# We want the following flags in the container
147list_jobproperties = [
148 WorkerTopDir,
149 OutputReportFile,
150 AffinityCPUList,
151 Strategy,
152 CollectSubprocessLogs,
153 Version,
154 PollingInterval,
155 EventsBeforeFork,
156 EventRangeChannel,
157 MemSamplingInterval,
158 EvtRangeScattererCaching,
159 ChunkSize,
160 ReadEventOrders,
161 EventOrdersFile,
162 UseSharedReader,
163 UseSharedWriter,
164 UseParallelCompression,
165 ]
166
167for i in list_jobproperties:
168 jobproperties.AthenaMPFlags.add_JobProperty(i)
169
170
171del list_jobproperties