ATLAS Offline Software
Loading...
Searching...
No Matches
Control
AthenaMP
python
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
11
from
AthenaCommon.JobProperties
import
JobProperty, JobPropertyContainer
12
from
AthenaCommon.JobProperties
import
jobproperties
13
14
class
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
21
class
OutputReportFile
(JobProperty):
22
""" Flag to set the name of AthenaMP output report file
23
"""
24
statusOn =
True
25
allowedTypes = [
'str'
]
26
StoredValue =
'AthenaMPOutputs'
27
28
class
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
34
class
Strategy
(JobProperty):
35
""" Switch to choose event scheduling strategy"""
36
statusOn =
True
37
allowedTypes = [
'str'
]
38
allowedValues = [
'SharedQueue'
,
'EventService'
,
'RoundRobin'
]
39
StoredValue =
'SharedQueue'
40
41
class
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
48
class
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
56
class
PollingInterval
(JobProperty):
57
""" Time interval in milliseconds between subsequent polling of subproceses
58
"""
59
statusOn =
True
60
allowedTypes = [
'int'
]
61
StoredValue = 100
62
63
class
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
70
class
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
77
class
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
84
class
MemSamplingInterval
(JobProperty):
85
""" Time interval in seconds between taking memory samples
86
"""
87
statusOn =
True
88
allowedTypes = [
'int'
]
89
StoredValue = 0
90
91
class
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
102
class
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
109
class
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
116
class
UseSharedReader
(JobProperty):
117
""" Flag for activating shared reader process
118
"""
119
statusOn =
True
120
allowedTypes = [
'bool'
]
121
StoredValue =
False
122
123
class
UseSharedWriter
(JobProperty):
124
""" Flag for activating shared writer process
125
"""
126
statusOn =
True
127
allowedTypes = [
'bool'
]
128
StoredValue =
False
129
130
class
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
138
class
AthenaMPFlags
(JobPropertyContainer):
139
""" The global AthenaMP job property container.
140
"""
141
pass
142
143
jobproperties.add_Container(AthenaMPFlags)
144
145
146
# We want the following flags in the container
147
list_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
167
for
i
in
list_jobproperties:
168
jobproperties.AthenaMPFlags.add_JobProperty(i)
169
170
171
del list_jobproperties
python.AthenaMPFlags.AffinityCPUList
Definition
AthenaMPFlags.py:28
python.AthenaMPFlags.AthenaMPFlags
Definition
AthenaMPFlags.py:138
python.AthenaMPFlags.ChunkSize
Definition
AthenaMPFlags.py:91
python.AthenaMPFlags.CollectSubprocessLogs
Definition
AthenaMPFlags.py:41
python.AthenaMPFlags.EventOrdersFile
Definition
AthenaMPFlags.py:109
python.AthenaMPFlags.EventRangeChannel
Definition
AthenaMPFlags.py:70
python.AthenaMPFlags.EventsBeforeFork
Definition
AthenaMPFlags.py:63
python.AthenaMPFlags.EvtRangeScattererCaching
Definition
AthenaMPFlags.py:77
python.AthenaMPFlags.MemSamplingInterval
Definition
AthenaMPFlags.py:84
python.AthenaMPFlags.OutputReportFile
Definition
AthenaMPFlags.py:21
python.AthenaMPFlags.PollingInterval
Definition
AthenaMPFlags.py:56
python.AthenaMPFlags.ReadEventOrders
Definition
AthenaMPFlags.py:102
python.AthenaMPFlags.Strategy
Definition
AthenaMPFlags.py:34
python.AthenaMPFlags.UseParallelCompression
Definition
AthenaMPFlags.py:130
python.AthenaMPFlags.UseSharedReader
Definition
AthenaMPFlags.py:116
python.AthenaMPFlags.UseSharedWriter
Definition
AthenaMPFlags.py:123
python.AthenaMPFlags.Version
Definition
AthenaMPFlags.py:48
python.AthenaMPFlags.WorkerTopDir
Definition
AthenaMPFlags.py:14
Generated on
for ATLAS Offline Software by
1.14.0