potassco-benchmark-tool 2.2.0__py3-none-any.whl → 2.2.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- benchmarktool/result/xlsx_gen.py +12 -9
- benchmarktool/runscript/parser.py +102 -303
- benchmarktool/runscript/runscript.py +39 -18
- benchmarktool/runscript/schemas/benchmark_spec.xsd +62 -0
- benchmarktool/runscript/schemas/runscript.xsd +292 -0
- {potassco_benchmark_tool-2.2.0.dist-info → potassco_benchmark_tool-2.2.2.dist-info}/METADATA +1 -1
- {potassco_benchmark_tool-2.2.0.dist-info → potassco_benchmark_tool-2.2.2.dist-info}/RECORD +11 -9
- {potassco_benchmark_tool-2.2.0.dist-info → potassco_benchmark_tool-2.2.2.dist-info}/WHEEL +1 -1
- {potassco_benchmark_tool-2.2.0.dist-info → potassco_benchmark_tool-2.2.2.dist-info}/entry_points.txt +0 -0
- {potassco_benchmark_tool-2.2.0.dist-info → potassco_benchmark_tool-2.2.2.dist-info}/licenses/LICENSE +0 -0
- {potassco_benchmark_tool-2.2.0.dist-info → potassco_benchmark_tool-2.2.2.dist-info}/top_level.txt +0 -0
benchmarktool/result/xlsx_gen.py
CHANGED
|
@@ -382,14 +382,14 @@ class Sheet:
|
|
|
382
382
|
instance_summary[instance_result].setdefault(name, False)
|
|
383
383
|
if value_type == "int":
|
|
384
384
|
value_type = "float"
|
|
385
|
-
elif value_type not in {"float", "None"}:
|
|
385
|
+
elif value_type not in {"float", "None", "empty"}:
|
|
386
386
|
value_type = "string"
|
|
387
387
|
if self.ref_sheet is None:
|
|
388
388
|
if value_type == "float":
|
|
389
389
|
block.add_cell(
|
|
390
390
|
instance_result.instance.values["row"] + run.number - 1, name, value_type, float(value)
|
|
391
391
|
)
|
|
392
|
-
elif value_type
|
|
392
|
+
elif value_type in {"None", "empty"}:
|
|
393
393
|
block.add_cell(
|
|
394
394
|
instance_result.instance.values["row"] + run.number - 1, name, value_type, np.nan
|
|
395
395
|
)
|
|
@@ -438,7 +438,7 @@ class Sheet:
|
|
|
438
438
|
)
|
|
439
439
|
else:
|
|
440
440
|
block.add_cell(
|
|
441
|
-
(inst_val["row"] + inst_val["max_runs"]) // inst_val["max_runs"] - 1, name, "
|
|
441
|
+
(inst_val["row"] + inst_val["max_runs"]) // inst_val["max_runs"] - 1, name, "None", np.nan
|
|
442
442
|
)
|
|
443
443
|
|
|
444
444
|
def add_benchclass_summary(
|
|
@@ -468,7 +468,7 @@ class Sheet:
|
|
|
468
468
|
},
|
|
469
469
|
)
|
|
470
470
|
else:
|
|
471
|
-
block.add_cell(benchclass_result.benchclass.values["row"], name, "
|
|
471
|
+
block.add_cell(benchclass_result.benchclass.values["row"], name, "None", np.nan)
|
|
472
472
|
|
|
473
473
|
def finish(self) -> None:
|
|
474
474
|
"""
|
|
@@ -523,16 +523,16 @@ class Sheet:
|
|
|
523
523
|
self.values = self.values.reindex(index=self.content.index, columns=self.content.columns)
|
|
524
524
|
self.values = self.values.combine_first(self.content)
|
|
525
525
|
else:
|
|
526
|
-
self.values = (
|
|
527
|
-
self.content.iloc[2 : self.result_offset - 1, 1:].combine_first(self.values).combine_first(self.content)
|
|
528
|
-
)
|
|
526
|
+
self.values = self.content.copy()
|
|
529
527
|
|
|
530
528
|
# defragmentation (temporary workaround)
|
|
531
529
|
self.content = self.content.copy()
|
|
532
530
|
self.values = self.values.copy()
|
|
533
531
|
|
|
534
532
|
# add summaries
|
|
533
|
+
self.values = self.values.replace({None: np.nan})
|
|
535
534
|
self.add_row_summary(col)
|
|
535
|
+
self.values = self.values.replace({None: np.nan})
|
|
536
536
|
self.add_col_summary()
|
|
537
537
|
|
|
538
538
|
# color cells
|
|
@@ -583,6 +583,7 @@ class Sheet:
|
|
|
583
583
|
float_occur (dict[str, Any]): Dict containing column references of float columns.
|
|
584
584
|
col (int): Current column index.
|
|
585
585
|
"""
|
|
586
|
+
self.values[col] = self.values[col].astype(object)
|
|
586
587
|
for row in range(self.result_offset - 2):
|
|
587
588
|
ref_range = ",".join(get_cell_index(col_ref, row + 2, True) for col_ref in sorted(float_occur[measure]))
|
|
588
589
|
values = np.array(self.values.loc[2 + row, sorted(float_occur[measure])], float)
|
|
@@ -922,12 +923,14 @@ class SystemBlock:
|
|
|
922
923
|
"""
|
|
923
924
|
if name not in self.columns:
|
|
924
925
|
self.content.at[1, name] = name
|
|
926
|
+
# force correct dtype
|
|
927
|
+
self.content[name] = self.content[name].astype(object)
|
|
925
928
|
self.columns[name] = value_type
|
|
926
929
|
# first occurrence of column
|
|
927
|
-
elif self.columns[name]
|
|
930
|
+
elif self.columns[name] in {"None", "empty"}:
|
|
928
931
|
self.columns[name] = value_type
|
|
929
932
|
# mixed system column
|
|
930
|
-
elif value_type not in
|
|
933
|
+
elif value_type not in {self.columns[name], "None", "empty"}:
|
|
931
934
|
self.columns[name] = "string"
|
|
932
935
|
# leave space for header and add new row if necessary
|
|
933
936
|
if row + 2 not in self.content.index:
|
|
@@ -22,13 +22,9 @@ from benchmarktool.runscript.runscript import (
|
|
|
22
22
|
SeqJob,
|
|
23
23
|
Setting,
|
|
24
24
|
System,
|
|
25
|
+
TagDisj,
|
|
25
26
|
)
|
|
26
27
|
|
|
27
|
-
try:
|
|
28
|
-
from StringIO import StringIO # type: ignore[import-not-found]
|
|
29
|
-
except ModuleNotFoundError:
|
|
30
|
-
from io import StringIO
|
|
31
|
-
|
|
32
28
|
|
|
33
29
|
# pylint: disable=anomalous-backslash-in-string, line-too-long, too-many-locals
|
|
34
30
|
class Parser:
|
|
@@ -51,299 +47,13 @@ class Parser:
|
|
|
51
47
|
fileName (str): a string holding a path to a xml file.
|
|
52
48
|
"""
|
|
53
49
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
<!-- the runscript -->
|
|
59
|
-
<xs:complexType name="runscriptType">
|
|
60
|
-
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
|
61
|
-
<xs:element name="machine" type="machineType"/>
|
|
62
|
-
<xs:element name="system" type="systemType">
|
|
63
|
-
<!-- setting keys have to be unique per system/version-->
|
|
64
|
-
<!-- unfortunately i have found no way to create a link between settings and systems -->
|
|
65
|
-
<!-- schematron should be able to do this but the lxml implementation seems to be incomplete-->
|
|
66
|
-
<xs:unique name="settingKey">
|
|
67
|
-
<xs:selector xpath="setting"/>
|
|
68
|
-
<xs:field xpath="@name"/>
|
|
69
|
-
</xs:unique>
|
|
70
|
-
</xs:element>
|
|
71
|
-
<xs:element name="config" type="configType"/>
|
|
72
|
-
<xs:element name="benchmark" type="benchmarkType"/>
|
|
73
|
-
<xs:element name="distjob" type="distjobType"/>
|
|
74
|
-
<xs:element name="seqjob" type="seqjobType"/>
|
|
75
|
-
<xs:element name="project" type="projectType"/>
|
|
76
|
-
</xs:choice>
|
|
77
|
-
<xs:attribute name="output" type="xs:string" use="required"/>
|
|
78
|
-
</xs:complexType>
|
|
79
|
-
|
|
80
|
-
<!-- a project -->
|
|
81
|
-
<xs:complexType name="projectType">
|
|
82
|
-
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
|
83
|
-
<xs:element name="runspec" type="runspecType"/>
|
|
84
|
-
<xs:element name="runtag" type="runtagType"/>
|
|
85
|
-
</xs:choice>
|
|
86
|
-
<xs:attribute name="name" type="nameType" use="required"/>
|
|
87
|
-
<xs:attribute name="job" type="nameType" use="required"/>
|
|
88
|
-
</xs:complexType>
|
|
89
|
-
|
|
90
|
-
<!-- a machine -->
|
|
91
|
-
<xs:complexType name="machineType">
|
|
92
|
-
<xs:attribute name="name" type="nameType" use="required"/>
|
|
93
|
-
<xs:attribute name="cpu" type="xs:token" use="required"/>
|
|
94
|
-
<xs:attribute name="memory" type="xs:token" use="required"/>
|
|
95
|
-
</xs:complexType>
|
|
96
|
-
|
|
97
|
-
<!-- a system -->
|
|
98
|
-
<xs:complexType name="systemType">
|
|
99
|
-
<xs:choice minOccurs="1" maxOccurs="unbounded">
|
|
100
|
-
<xs:element name="setting">
|
|
101
|
-
<xs:complexType>
|
|
102
|
-
<xs:sequence>
|
|
103
|
-
<xs:element name="encoding" minOccurs="0" maxOccurs="unbounded">
|
|
104
|
-
<xs:complexType>
|
|
105
|
-
<xs:attribute name="file" type="xs:string" use="required"/>
|
|
106
|
-
<xs:attribute name="enctag">
|
|
107
|
-
<xs:simpleType>
|
|
108
|
-
<xs:list itemType="nameType"/>
|
|
109
|
-
</xs:simpleType>
|
|
110
|
-
</xs:attribute>
|
|
111
|
-
</xs:complexType>
|
|
112
|
-
</xs:element>
|
|
113
|
-
</xs:sequence>
|
|
114
|
-
<xs:attribute name="name" type="nameType" use="required"/>
|
|
115
|
-
<xs:attribute name="cmdline" type="xs:string"/>
|
|
116
|
-
<xs:attribute name="cmdline_post" type="xs:string"/>
|
|
117
|
-
<xs:attribute name="tag">
|
|
118
|
-
<xs:simpleType>
|
|
119
|
-
<xs:list itemType="nameType"/>
|
|
120
|
-
</xs:simpleType>
|
|
121
|
-
</xs:attribute>
|
|
122
|
-
<xs:attribute name="dist_template" type="xs:string"/>
|
|
123
|
-
<xs:attribute name="dist_options" type="xs:string"/>
|
|
124
|
-
<xs:anyAttribute processContents="lax"/>
|
|
125
|
-
</xs:complexType>
|
|
126
|
-
</xs:element>
|
|
127
|
-
</xs:choice>
|
|
128
|
-
<xs:attribute name="name" type="nameType" use="required"/>
|
|
129
|
-
<xs:attribute name="version" type="versionType" use="required"/>
|
|
130
|
-
<xs:attribute name="measures" type="nameType" use="required"/>
|
|
131
|
-
<xs:attribute name="config" type="nameType" use="required"/>
|
|
132
|
-
<xs:attribute name="cmdline" type="xs:string"/>
|
|
133
|
-
<xs:attribute name="cmdline_post" type="xs:string"/>
|
|
134
|
-
</xs:complexType>
|
|
135
|
-
|
|
136
|
-
<!-- generic attributes for jobs-->
|
|
137
|
-
<xs:attributeGroup name="jobAttr">
|
|
138
|
-
<xs:attribute name="name" type="nameType" use="required"/>
|
|
139
|
-
<xs:attribute name="timeout" type="timeType" use="required"/>
|
|
140
|
-
<xs:attribute name="runs" type="xs:positiveInteger" use="required"/>
|
|
141
|
-
<xs:attribute name="memout" type="xs:positiveInteger"/>
|
|
142
|
-
<xs:attribute name="template_options" type="xs:string"/>
|
|
143
|
-
<xs:anyAttribute processContents="lax"/>
|
|
144
|
-
</xs:attributeGroup>
|
|
145
|
-
|
|
146
|
-
<!-- a seqjob -->
|
|
147
|
-
<xs:complexType name="seqjobType">
|
|
148
|
-
<xs:attributeGroup ref="jobAttr"/>
|
|
149
|
-
<xs:attribute name="parallel" type="xs:positiveInteger" use="required"/>
|
|
150
|
-
</xs:complexType>
|
|
151
|
-
|
|
152
|
-
<!-- a distjob -->
|
|
153
|
-
<xs:complexType name="distjobType">
|
|
154
|
-
<xs:attributeGroup ref="jobAttr"/>
|
|
155
|
-
<xs:attribute name="script_mode" use="required">
|
|
156
|
-
<xs:simpleType>
|
|
157
|
-
<xs:restriction base="xs:string">
|
|
158
|
-
<xs:enumeration value="multi"/>
|
|
159
|
-
<xs:enumeration value="timeout"/>
|
|
160
|
-
</xs:restriction>
|
|
161
|
-
</xs:simpleType>
|
|
162
|
-
</xs:attribute>
|
|
163
|
-
<xs:attribute name="walltime" type="timeType" use="required"/>
|
|
164
|
-
<xs:attribute name="cpt" type="xs:positiveInteger" use="required"/>
|
|
165
|
-
<xs:attribute name="partition" type="xs:string"/>
|
|
166
|
-
</xs:complexType>
|
|
167
|
-
|
|
168
|
-
<!-- a config -->
|
|
169
|
-
<xs:complexType name="configType">
|
|
170
|
-
<xs:attribute name="name" type="nameType" use="required"/>
|
|
171
|
-
<xs:attribute name="template" type="xs:string" use="required"/>
|
|
172
|
-
</xs:complexType>
|
|
173
|
-
|
|
174
|
-
<!-- a benchmark -->
|
|
175
|
-
<xs:complexType name="benchmarkType">
|
|
176
|
-
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
|
177
|
-
<xs:element name="files">
|
|
178
|
-
<xs:complexType>
|
|
179
|
-
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
|
180
|
-
<xs:element name="add">
|
|
181
|
-
<xs:complexType>
|
|
182
|
-
<xs:attribute name="file" type="xs:string" use="required"/>
|
|
183
|
-
<xs:attribute name="group" type="xs:string"/>
|
|
184
|
-
</xs:complexType>
|
|
185
|
-
</xs:element>
|
|
186
|
-
<xs:element name="encoding">
|
|
187
|
-
<xs:complexType>
|
|
188
|
-
<xs:attribute name="file" type="xs:string" use="required"/>
|
|
189
|
-
</xs:complexType>
|
|
190
|
-
</xs:element>
|
|
191
|
-
</xs:choice>
|
|
192
|
-
<xs:attribute name="path" type="xs:string" use="required"/>
|
|
193
|
-
<xs:attribute name="enctag">
|
|
194
|
-
<xs:simpleType>
|
|
195
|
-
<xs:list itemType="nameType"/>
|
|
196
|
-
</xs:simpleType>
|
|
197
|
-
</xs:attribute>
|
|
198
|
-
</xs:complexType>
|
|
199
|
-
</xs:element>
|
|
200
|
-
<xs:element name="folder">
|
|
201
|
-
<xs:complexType>
|
|
202
|
-
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
|
203
|
-
<xs:element name="ignore">
|
|
204
|
-
<xs:complexType>
|
|
205
|
-
<xs:attribute name="prefix" type="xs:string" use="required"/>
|
|
206
|
-
</xs:complexType>
|
|
207
|
-
</xs:element>
|
|
208
|
-
<xs:element name="encoding">
|
|
209
|
-
<xs:complexType>
|
|
210
|
-
<xs:attribute name="file" type="xs:string" use="required"/>
|
|
211
|
-
</xs:complexType>
|
|
212
|
-
</xs:element>
|
|
213
|
-
</xs:choice>
|
|
214
|
-
<xs:attribute name="path" type="xs:string" use="required"/>
|
|
215
|
-
<xs:attribute name="group" type="xs:boolean"/>
|
|
216
|
-
<xs:attribute name="enctag">
|
|
217
|
-
<xs:simpleType>
|
|
218
|
-
<xs:list itemType="nameType"/>
|
|
219
|
-
</xs:simpleType>
|
|
220
|
-
</xs:attribute>
|
|
221
|
-
</xs:complexType>
|
|
222
|
-
</xs:element>
|
|
223
|
-
</xs:choice>
|
|
224
|
-
<xs:attribute name="name" type="nameType" use="required"/>
|
|
225
|
-
</xs:complexType>
|
|
226
|
-
|
|
227
|
-
<!-- common attributes for runspec/runtag -->
|
|
228
|
-
<xs:attributeGroup name="runAttr">
|
|
229
|
-
<xs:attribute name="machine" type="nameType" use="required"/>
|
|
230
|
-
<xs:attribute name="benchmark" type="nameType" use="required"/>
|
|
231
|
-
</xs:attributeGroup>
|
|
232
|
-
|
|
233
|
-
<!-- a runspec -->
|
|
234
|
-
<xs:complexType name="runspecType">
|
|
235
|
-
<xs:attribute name="system" type="nameType" use="required"/>
|
|
236
|
-
<xs:attribute name="version" type="versionType" use="required"/>
|
|
237
|
-
<xs:attribute name="setting" type="nameType" use="required"/>
|
|
238
|
-
<xs:attributeGroup ref="runAttr"/>
|
|
239
|
-
</xs:complexType>
|
|
240
|
-
|
|
241
|
-
<!-- a runtag -->
|
|
242
|
-
<xs:complexType name="runtagType">
|
|
243
|
-
<xs:attributeGroup ref="runAttr"/>
|
|
244
|
-
<xs:attribute name="tag" type="tagrefType" use="required"/>
|
|
245
|
-
</xs:complexType>
|
|
246
|
-
|
|
247
|
-
<!-- simple types used througout the above definitions -->
|
|
248
|
-
<xs:simpleType name="versionType">
|
|
249
|
-
<xs:restriction base="xs:string">
|
|
250
|
-
<xs:pattern value="[0-9a-zA-Z._-]+"/>
|
|
251
|
-
</xs:restriction>
|
|
252
|
-
</xs:simpleType>
|
|
253
|
-
|
|
254
|
-
<xs:simpleType name="timeType">
|
|
255
|
-
<xs:restriction base="xs:string">
|
|
256
|
-
<xs:pattern value="([0-9]+)|([0-9]+d)?[ ]*([0-9]+h)?[ ]*([0-9]+m)?[ ]*([0-9]+s)?"/>
|
|
257
|
-
</xs:restriction>
|
|
258
|
-
</xs:simpleType>
|
|
259
|
-
|
|
260
|
-
<xs:simpleType name="tagrefType">
|
|
261
|
-
<xs:restriction base="xs:string">
|
|
262
|
-
<xs:pattern value="(\\*all\\*)|([A-Za-z_\\-0-9]+([ ]*[A-Za-z_\\-0-9]+)*)([ ]*\\|[ ]*([A-Za-z_\\-0-9]+([ ]*[A-Za-z_\\-0-9]+)*))*"/>
|
|
263
|
-
</xs:restriction>
|
|
264
|
-
</xs:simpleType>
|
|
265
|
-
|
|
266
|
-
<xs:simpleType name="nameType">
|
|
267
|
-
<xs:restriction base="xs:string">
|
|
268
|
-
<xs:pattern value="[A-Za-z_\\-0-9]*"/>
|
|
269
|
-
</xs:restriction>
|
|
270
|
-
</xs:simpleType>
|
|
271
|
-
|
|
272
|
-
<!-- the root element -->
|
|
273
|
-
<xs:element name="runscript" type="runscriptType">
|
|
274
|
-
<!-- machine keys -->
|
|
275
|
-
<xs:keyref name="machineRef" refer="machineKey">
|
|
276
|
-
<xs:selector xpath="project/runspec|project/runall"/>
|
|
277
|
-
<xs:field xpath="@machine"/>
|
|
278
|
-
</xs:keyref>
|
|
279
|
-
<xs:key name="machineKey">
|
|
280
|
-
<xs:selector xpath="machine"/>
|
|
281
|
-
<xs:field xpath="@name"/>
|
|
282
|
-
</xs:key>
|
|
283
|
-
<!-- benchmark keys -->
|
|
284
|
-
<xs:keyref name="benchmarkRef" refer="benchmarkKey">
|
|
285
|
-
<xs:selector xpath="project/runspec|project/runall"/>
|
|
286
|
-
<xs:field xpath="@benchmark"/>
|
|
287
|
-
</xs:keyref>
|
|
288
|
-
<xs:key name="benchmarkKey">
|
|
289
|
-
<xs:selector xpath="benchmark"/>
|
|
290
|
-
<xs:field xpath="@name"/>
|
|
291
|
-
</xs:key>
|
|
292
|
-
<!-- system keys -->
|
|
293
|
-
<xs:keyref name="systemRef" refer="systemKey">
|
|
294
|
-
<xs:selector xpath="project/runspec"/>
|
|
295
|
-
<xs:field xpath="@system"/>
|
|
296
|
-
<xs:field xpath="@version"/>
|
|
297
|
-
</xs:keyref>
|
|
298
|
-
<xs:key name="systemKey">
|
|
299
|
-
<xs:selector xpath="system"/>
|
|
300
|
-
<xs:field xpath="@name"/>
|
|
301
|
-
<xs:field xpath="@version"/>
|
|
302
|
-
</xs:key>
|
|
303
|
-
<!-- config keys -->
|
|
304
|
-
<xs:keyref name="configRef" refer="configKey">
|
|
305
|
-
<xs:selector xpath="system"/>
|
|
306
|
-
<xs:field xpath="@config"/>
|
|
307
|
-
</xs:keyref>
|
|
308
|
-
<xs:key name="configKey">
|
|
309
|
-
<xs:selector xpath="config"/>
|
|
310
|
-
<xs:field xpath="@name"/>
|
|
311
|
-
</xs:key>
|
|
312
|
-
<!-- config keys -->
|
|
313
|
-
<xs:keyref name="jobRef" refer="jobKey">
|
|
314
|
-
<xs:selector xpath="project"/>
|
|
315
|
-
<xs:field xpath="@job"/>
|
|
316
|
-
</xs:keyref>
|
|
317
|
-
<xs:key name="jobKey">
|
|
318
|
-
<xs:selector xpath="seqjob|distjob"/>
|
|
319
|
-
<xs:field xpath="@name"/>
|
|
320
|
-
</xs:key>
|
|
321
|
-
<!-- project keys -->
|
|
322
|
-
<xs:unique name="projectKey">
|
|
323
|
-
<xs:selector xpath="project"/>
|
|
324
|
-
<xs:field xpath="@name"/>
|
|
325
|
-
</xs:unique>
|
|
326
|
-
</xs:element>
|
|
327
|
-
</xs:schema>
|
|
328
|
-
"""
|
|
50
|
+
schemas_dir = os.path.join(os.path.dirname(__file__), "schemas")
|
|
51
|
+
if not os.path.isdir(schemas_dir): # nocoverage
|
|
52
|
+
raise SystemExit(
|
|
53
|
+
f"*** ERROR: Resources missing: '{schemas_dir}' does not exist.\nTry reinstalling the package.\n"
|
|
329
54
|
)
|
|
330
|
-
)
|
|
331
|
-
schema = etree.XMLSchema(schemadoc)
|
|
332
55
|
|
|
333
|
-
|
|
334
|
-
doc = etree.parse(file_name)
|
|
335
|
-
except (etree.XMLSyntaxError, OSError) as e:
|
|
336
|
-
if isinstance(e, OSError):
|
|
337
|
-
sys.stderr.write(f"*** ERROR: Runscript file '{file_name}' not found.\n")
|
|
338
|
-
sys.exit(1)
|
|
339
|
-
sys.stderr.write(f"*** ERROR: XML Syntax Error in runscript: {e}\n")
|
|
340
|
-
sys.exit(1)
|
|
341
|
-
|
|
342
|
-
try:
|
|
343
|
-
schema.assertValid(doc)
|
|
344
|
-
except etree.DocumentInvalid as e:
|
|
345
|
-
sys.stderr.write(f"*** ERROR: Invalid runscript file: {e}\n")
|
|
346
|
-
sys.exit(1)
|
|
56
|
+
doc = self.parse_file(file_name, schemas_dir, "runscript.xsd")
|
|
347
57
|
|
|
348
58
|
root = doc.getroot()
|
|
349
59
|
run = Runscript(root.get("output"))
|
|
@@ -387,10 +97,10 @@ class Parser:
|
|
|
387
97
|
dist_options = ""
|
|
388
98
|
encodings: dict[str, set[str]] = {"_default_": set()}
|
|
389
99
|
for grandchild in child.xpath("./encoding"):
|
|
390
|
-
if grandchild.get("
|
|
100
|
+
if grandchild.get("encoding_tag") is None:
|
|
391
101
|
encodings["_default_"].add(os.path.normpath(grandchild.get("file")))
|
|
392
102
|
else:
|
|
393
|
-
enctags = set(grandchild.get("
|
|
103
|
+
enctags = set(grandchild.get("encoding_tag").split(None))
|
|
394
104
|
for t in enctags:
|
|
395
105
|
if t not in encodings:
|
|
396
106
|
encodings[t] = set()
|
|
@@ -425,16 +135,74 @@ class Parser:
|
|
|
425
135
|
element: Any
|
|
426
136
|
for node in root.xpath("./benchmark"):
|
|
427
137
|
benchmark = Benchmark(node.get("name"))
|
|
138
|
+
for child in node.xpath("./spec"):
|
|
139
|
+
# discover spec files
|
|
140
|
+
spec_root = child.get("path")
|
|
141
|
+
for dirpath, dirnames, filenames in os.walk(spec_root):
|
|
142
|
+
tag = child.get("instance_tag")
|
|
143
|
+
if "spec.xml" in filenames:
|
|
144
|
+
# stop recursion if spec.xml found
|
|
145
|
+
dirnames.clear()
|
|
146
|
+
spec_file = os.path.join(dirpath, "spec.xml")
|
|
147
|
+
spec = self.parse_file(spec_file, schemas_dir, "benchmark_spec.xsd").getroot()
|
|
148
|
+
for class_elem in spec.xpath("./class"):
|
|
149
|
+
rel_path = os.path.relpath(dirpath, spec_root)
|
|
150
|
+
if rel_path != ".":
|
|
151
|
+
class_name = os.path.join(rel_path, class_elem.get("name"))
|
|
152
|
+
else:
|
|
153
|
+
class_name = class_elem.get("name")
|
|
154
|
+
if class_elem.get("encoding_tag") is None:
|
|
155
|
+
enctag = set()
|
|
156
|
+
else:
|
|
157
|
+
enctag = set(class_elem.get("encoding_tag").split(None))
|
|
158
|
+
|
|
159
|
+
elements: list[Any] = []
|
|
160
|
+
instances = class_elem.xpath("./instance")
|
|
161
|
+
if instances:
|
|
162
|
+
files = Benchmark.Files(dirpath, class_name)
|
|
163
|
+
for instance in instances:
|
|
164
|
+
if (
|
|
165
|
+
tag is None
|
|
166
|
+
or instance.get("instance_tag") is None
|
|
167
|
+
or TagDisj(tag).match(set(instance.get("instance_tag").split(None)))
|
|
168
|
+
):
|
|
169
|
+
files.add_file(instance.get("file"), instance.get("group"))
|
|
170
|
+
files.add_enctags(enctag)
|
|
171
|
+
if files.files:
|
|
172
|
+
elements.append(files)
|
|
173
|
+
|
|
174
|
+
# folder elements are still in development
|
|
175
|
+
for folder_elem in class_elem.xpath("./folder"):
|
|
176
|
+
if (
|
|
177
|
+
tag is None
|
|
178
|
+
or folder_elem.get("instance_tag") is None
|
|
179
|
+
or TagDisj(tag).match(set(folder_elem.get("instance_tag").split(None)))
|
|
180
|
+
):
|
|
181
|
+
if folder_elem.get("group") is not None:
|
|
182
|
+
group = folder_elem.get("group").lower() == "true"
|
|
183
|
+
else:
|
|
184
|
+
group = False
|
|
185
|
+
folder = Benchmark.Folder(
|
|
186
|
+
os.path.join(dirpath, folder_elem.get("path")), group, class_name
|
|
187
|
+
)
|
|
188
|
+
folder.add_enctags(enctag)
|
|
189
|
+
elements.append(folder)
|
|
190
|
+
|
|
191
|
+
for element in elements:
|
|
192
|
+
for encoding in class_elem.xpath("./encoding"):
|
|
193
|
+
element.add_encoding(os.path.join(dirpath, encoding.get("file")))
|
|
194
|
+
benchmark.add_element(element)
|
|
195
|
+
|
|
428
196
|
for child in node.xpath("./folder"):
|
|
429
197
|
if child.get("group") is not None:
|
|
430
198
|
group = child.get("group").lower() == "true"
|
|
431
199
|
else:
|
|
432
200
|
group = False
|
|
433
201
|
element = Benchmark.Folder(child.get("path"), group)
|
|
434
|
-
if child.get("
|
|
202
|
+
if child.get("encoding_tag") is None:
|
|
435
203
|
tag = set()
|
|
436
204
|
else:
|
|
437
|
-
tag = set(child.get("
|
|
205
|
+
tag = set(child.get("encoding_tag").split(None))
|
|
438
206
|
element.add_enctags(tag)
|
|
439
207
|
for grandchild in child.xpath("./encoding"):
|
|
440
208
|
element.add_encoding(grandchild.get("file"))
|
|
@@ -443,10 +211,10 @@ class Parser:
|
|
|
443
211
|
benchmark.add_element(element)
|
|
444
212
|
for child in node.xpath("./files"):
|
|
445
213
|
element = Benchmark.Files(child.get("path"))
|
|
446
|
-
if child.get("
|
|
214
|
+
if child.get("encoding_tag") is None:
|
|
447
215
|
tag = set()
|
|
448
216
|
else:
|
|
449
|
-
tag = set(child.get("
|
|
217
|
+
tag = set(child.get("encoding_tag").split(None))
|
|
450
218
|
element.add_enctags(tag)
|
|
451
219
|
for grandchild in child.xpath("./encoding"):
|
|
452
220
|
element.add_encoding(grandchild.get("file"))
|
|
@@ -474,6 +242,35 @@ class Parser:
|
|
|
474
242
|
self.validate_components(run)
|
|
475
243
|
return run
|
|
476
244
|
|
|
245
|
+
def parse_file(self, file_name: str, schema_dir: str, schema_file: str) -> etree._ElementTree:
|
|
246
|
+
"""
|
|
247
|
+
Parse a given XML file and validate it against a given schema.
|
|
248
|
+
|
|
249
|
+
Attributes:
|
|
250
|
+
file_name (str): a string holding a path to a xml file.
|
|
251
|
+
schema_dir (str): a string holding a path to the schema directory.
|
|
252
|
+
schema_file (str): a string holding the name of the schema file.
|
|
253
|
+
"""
|
|
254
|
+
|
|
255
|
+
try:
|
|
256
|
+
schema = etree.XMLSchema(file=os.path.join(schema_dir, schema_file))
|
|
257
|
+
except etree.XMLSchemaParseError as e:
|
|
258
|
+
raise SystemExit(f"*** ERROR: Failed to load schema file {schema_file}: {e}\n") from e
|
|
259
|
+
|
|
260
|
+
try:
|
|
261
|
+
doc = etree.parse(file_name)
|
|
262
|
+
except (etree.XMLSyntaxError, OSError) as e:
|
|
263
|
+
if isinstance(e, OSError):
|
|
264
|
+
raise SystemExit(f"*** ERROR: File '{file_name}' not found.\n") from e
|
|
265
|
+
raise SystemExit(f"*** ERROR: XML Syntax Error in file '{file_name}': {e}\n") from e
|
|
266
|
+
|
|
267
|
+
try:
|
|
268
|
+
schema.assertValid(doc)
|
|
269
|
+
except etree.DocumentInvalid as e:
|
|
270
|
+
raise SystemExit(f"*** ERROR: '{file_name}' is invalid: {e}\n") from e
|
|
271
|
+
|
|
272
|
+
return doc
|
|
273
|
+
|
|
477
274
|
def validate_components(self, run: Runscript) -> None:
|
|
478
275
|
"""
|
|
479
276
|
Check runscript for the existence of all required components.
|
|
@@ -506,7 +303,9 @@ class Parser:
|
|
|
506
303
|
# instances
|
|
507
304
|
for benchmark in run.benchmarks.values():
|
|
508
305
|
if not benchmark.elements:
|
|
509
|
-
sys.stderr.write(
|
|
306
|
+
sys.stderr.write(
|
|
307
|
+
f"*** WARNING: No spec or instance folders/files defined/used for benchmark '{benchmark.name}'.\n"
|
|
308
|
+
)
|
|
510
309
|
|
|
511
310
|
# project
|
|
512
311
|
if not run.projects:
|
|
@@ -841,26 +841,28 @@ class Benchmark:
|
|
|
841
841
|
def paths(self) -> Iterator[str]:
|
|
842
842
|
"""
|
|
843
843
|
Returns the location of the instance files by concatenating
|
|
844
|
-
location
|
|
844
|
+
location and instance name.
|
|
845
845
|
"""
|
|
846
846
|
for file in self.files:
|
|
847
|
-
yield os.path.join(self.location,
|
|
847
|
+
yield os.path.join(self.location, file)
|
|
848
848
|
|
|
849
849
|
class Folder:
|
|
850
850
|
"""
|
|
851
851
|
Describes a folder that should recursively be scanned for benchmarks.
|
|
852
852
|
"""
|
|
853
853
|
|
|
854
|
-
def __init__(self, path: str, group: bool = False):
|
|
854
|
+
def __init__(self, path: str, group: bool = False, class_name: Optional[str] = None):
|
|
855
855
|
"""
|
|
856
856
|
Initializes a benchmark folder.
|
|
857
857
|
|
|
858
858
|
Attributes:
|
|
859
859
|
path (str): The location of the folder.
|
|
860
860
|
group (bool): Whether to group instances by their file name prefix.
|
|
861
|
+
class_name (Optional[str]): The class name of the instances.
|
|
861
862
|
"""
|
|
862
863
|
self.path = path
|
|
863
864
|
self.group = group
|
|
865
|
+
self.class_name = class_name
|
|
864
866
|
self.prefixes: set[str] = set()
|
|
865
867
|
self.encodings: set[str] = set()
|
|
866
868
|
self.enctags: set[str] = set()
|
|
@@ -926,7 +928,7 @@ class Benchmark:
|
|
|
926
928
|
sub.append(dirname)
|
|
927
929
|
dirs[:] = sub
|
|
928
930
|
for filename in files:
|
|
929
|
-
if self._skip(relroot, filename):
|
|
931
|
+
if self._skip(relroot, filename) or filename == "spec.xml":
|
|
930
932
|
continue
|
|
931
933
|
m = re.match(r"^(([^.]+(?:\.[^.]+)*?)(?:\.[^.]+)?)\.[^.]+$", filename)
|
|
932
934
|
if m is None:
|
|
@@ -943,8 +945,8 @@ class Benchmark:
|
|
|
943
945
|
instances[group].add(filename)
|
|
944
946
|
for group, instfiles in instances.items():
|
|
945
947
|
benchmark.add_instance(
|
|
946
|
-
root=
|
|
947
|
-
|
|
948
|
+
root=root,
|
|
949
|
+
class_name=relroot if self.class_name is None else self.class_name,
|
|
948
950
|
files=(group, instfiles),
|
|
949
951
|
encodings=self.encodings,
|
|
950
952
|
enctags=self.enctags,
|
|
@@ -955,14 +957,16 @@ class Benchmark:
|
|
|
955
957
|
Describes a set of individual files in a benchmark.
|
|
956
958
|
"""
|
|
957
959
|
|
|
958
|
-
def __init__(self, path: str):
|
|
960
|
+
def __init__(self, path: str, class_name: Optional[str] = None):
|
|
959
961
|
"""
|
|
960
962
|
Initializes to the empty set of files.
|
|
961
963
|
|
|
962
964
|
Attributes:
|
|
963
965
|
path (str): Root path, all file paths are relative to this path.
|
|
966
|
+
class_name (Optional[str]): The class name of the instances.
|
|
964
967
|
"""
|
|
965
968
|
self.path = path
|
|
969
|
+
self.class_name = class_name
|
|
966
970
|
self.files: dict[str, set[str]] = {}
|
|
967
971
|
self.encodings: set[str] = set()
|
|
968
972
|
self.enctags: set[str] = set()
|
|
@@ -1025,10 +1029,9 @@ class Benchmark:
|
|
|
1025
1029
|
"Grouped files must be located in the same folder.\n"
|
|
1026
1030
|
)
|
|
1027
1031
|
continue
|
|
1028
|
-
relroot = paths[0][0]
|
|
1029
1032
|
benchmark.add_instance(
|
|
1030
|
-
root=self.path,
|
|
1031
|
-
|
|
1033
|
+
root=os.path.join(self.path, paths[0][0]),
|
|
1034
|
+
class_name=paths[0][0] if self.class_name is None else self.class_name,
|
|
1032
1035
|
files=(group, set(map(lambda x: x[1], paths))),
|
|
1033
1036
|
encodings=self.encodings,
|
|
1034
1037
|
enctags=self.enctags,
|
|
@@ -1044,7 +1047,7 @@ class Benchmark:
|
|
|
1044
1047
|
self.elements.append(element)
|
|
1045
1048
|
|
|
1046
1049
|
def add_instance(
|
|
1047
|
-
self, *, root: str,
|
|
1050
|
+
self, *, root: str, class_name: str, files: tuple[str, set[str]], encodings: set[str], enctags: set[str]
|
|
1048
1051
|
) -> None:
|
|
1049
1052
|
"""
|
|
1050
1053
|
Adds an instance to the benchmark set. (This function
|
|
@@ -1052,15 +1055,22 @@ class Benchmark:
|
|
|
1052
1055
|
|
|
1053
1056
|
Attributes:
|
|
1054
1057
|
root (str): The root folder of the instance.
|
|
1055
|
-
|
|
1058
|
+
class_name (str): The class name of the instance.
|
|
1056
1059
|
files (tuple[str,set[str]]): The name and files of the instance.
|
|
1057
1060
|
encodings (set[str]): The encodings associated to the instance.
|
|
1058
1061
|
enctags (set[str]): The encoding tags associated to the instance.
|
|
1059
1062
|
"""
|
|
1060
|
-
classname = Benchmark.Class(
|
|
1063
|
+
classname = Benchmark.Class(class_name)
|
|
1061
1064
|
if classname not in self.instances:
|
|
1062
1065
|
self.instances[classname] = set()
|
|
1063
|
-
|
|
1066
|
+
ins = Benchmark.Instance(root, classname, files[0], files[1], encodings, enctags)
|
|
1067
|
+
if ins in self.instances[classname]:
|
|
1068
|
+
sys.stderr.write(
|
|
1069
|
+
f"*** WARNING: skipping duplicate instance '{files[0]}' of class '{class_name}' "
|
|
1070
|
+
f"of benchmark '{self.name}'!\n"
|
|
1071
|
+
)
|
|
1072
|
+
return
|
|
1073
|
+
self.instances[classname].add(ins)
|
|
1064
1074
|
|
|
1065
1075
|
def init(self) -> None:
|
|
1066
1076
|
"""
|
|
@@ -1172,7 +1182,7 @@ class Project:
|
|
|
1172
1182
|
job: Job = field(compare=False)
|
|
1173
1183
|
runspecs: dict[str, list["Runspec"]] = field(default_factory=dict, compare=False)
|
|
1174
1184
|
|
|
1175
|
-
def add_runtag(self, machine_name: str, benchmark_name: str, tag: str) -> None:
|
|
1185
|
+
def add_runtag(self, machine_name: str, benchmark_name: str, tag: Optional[str] = None) -> None:
|
|
1176
1186
|
"""
|
|
1177
1187
|
Adds a run tag to the project, i.e., a set of run specifications
|
|
1178
1188
|
identified by certain tags.
|
|
@@ -1180,8 +1190,10 @@ class Project:
|
|
|
1180
1190
|
Attributes:
|
|
1181
1191
|
machine_name (str): The machine to run on.
|
|
1182
1192
|
benchmark_name (str): The benchmark set to evaluate.
|
|
1183
|
-
tag (str):
|
|
1193
|
+
tag (Optional[str]): The tags of systems+settings to run.
|
|
1184
1194
|
"""
|
|
1195
|
+
if tag is None:
|
|
1196
|
+
tag = "*all*"
|
|
1185
1197
|
disj = TagDisj(tag)
|
|
1186
1198
|
assert isinstance(self.runscript, Runscript)
|
|
1187
1199
|
for system in self.runscript.systems.values():
|
|
@@ -1209,6 +1221,16 @@ class Project:
|
|
|
1209
1221
|
setting_name (str): The settings to run the system with.
|
|
1210
1222
|
benchmark_name (str): The benchmark set to evaluate.
|
|
1211
1223
|
"""
|
|
1224
|
+
if machine_name not in self.runscript.machines:
|
|
1225
|
+
raise SystemExit(f"*** ERROR: Machine '{machine_name}' not defined!\n")
|
|
1226
|
+
if (system_name, system_version) not in self.runscript.systems:
|
|
1227
|
+
raise SystemExit(f"*** ERROR: System '{system_name}-{system_version}' not defined!\n")
|
|
1228
|
+
if setting_name not in self.runscript.systems[(system_name, system_version)].settings:
|
|
1229
|
+
raise SystemExit(
|
|
1230
|
+
f"*** ERROR: Setting '{setting_name}' for system '{system_name}-{system_version}' not defined!\n"
|
|
1231
|
+
)
|
|
1232
|
+
if benchmark_name not in self.runscript.benchmarks:
|
|
1233
|
+
raise SystemExit(f"*** ERROR: Benchmark '{benchmark_name}' not defined!\n")
|
|
1212
1234
|
runspec = Runspec(
|
|
1213
1235
|
self.runscript.machines[machine_name],
|
|
1214
1236
|
self.runscript.systems[(system_name, system_version)],
|
|
@@ -1323,8 +1345,7 @@ class Runscript:
|
|
|
1323
1345
|
if force:
|
|
1324
1346
|
shutil.rmtree(self.output)
|
|
1325
1347
|
else:
|
|
1326
|
-
|
|
1327
|
-
sys.exit(1)
|
|
1348
|
+
raise SystemExit("*** ERROR: Output directory already exists.\n")
|
|
1328
1349
|
for project in self.projects.values():
|
|
1329
1350
|
project.gen_scripts(skip)
|
|
1330
1351
|
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
|
2
|
+
<!-- a benchmark -->
|
|
3
|
+
<xs:complexType name="classType">
|
|
4
|
+
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
|
5
|
+
<xs:element name="instance">
|
|
6
|
+
<xs:complexType>
|
|
7
|
+
<xs:attribute name="file" type="xs:string" use="required"/>
|
|
8
|
+
<xs:attribute name="instance_tag">
|
|
9
|
+
<xs:simpleType>
|
|
10
|
+
<xs:list itemType="nameType"/>
|
|
11
|
+
</xs:simpleType>
|
|
12
|
+
</xs:attribute>
|
|
13
|
+
<xs:attribute name="group" type="nameType"/>
|
|
14
|
+
</xs:complexType>
|
|
15
|
+
</xs:element>
|
|
16
|
+
<xs:element name="folder">
|
|
17
|
+
<xs:complexType>
|
|
18
|
+
<xs:attribute name="path" type="xs:string" use="required"/>
|
|
19
|
+
<xs:attribute name="instance_tag">
|
|
20
|
+
<xs:simpleType>
|
|
21
|
+
<xs:list itemType="nameType"/>
|
|
22
|
+
</xs:simpleType>
|
|
23
|
+
</xs:attribute>
|
|
24
|
+
<xs:attribute name="group" type="xs:boolean"/>
|
|
25
|
+
</xs:complexType>
|
|
26
|
+
</xs:element>
|
|
27
|
+
<xs:element name="encoding">
|
|
28
|
+
<xs:complexType>
|
|
29
|
+
<xs:attribute name="file" type="xs:string" use="required"/>
|
|
30
|
+
</xs:complexType>
|
|
31
|
+
</xs:element>
|
|
32
|
+
</xs:choice>
|
|
33
|
+
<xs:attribute name="name" type="classnameType" use="required"/>
|
|
34
|
+
<xs:attribute name="encoding_tag">
|
|
35
|
+
<xs:simpleType>
|
|
36
|
+
<xs:list itemType="nameType"/>
|
|
37
|
+
</xs:simpleType>
|
|
38
|
+
</xs:attribute>
|
|
39
|
+
</xs:complexType>
|
|
40
|
+
|
|
41
|
+
<!-- simple types used througout the above definitions -->
|
|
42
|
+
<xs:simpleType name="nameType">
|
|
43
|
+
<xs:restriction base="xs:string">
|
|
44
|
+
<xs:pattern value="[A-Za-z_\-0-9]*"/>
|
|
45
|
+
</xs:restriction>
|
|
46
|
+
</xs:simpleType>
|
|
47
|
+
|
|
48
|
+
<xs:simpleType name="classnameType">
|
|
49
|
+
<xs:restriction base="xs:string">
|
|
50
|
+
<xs:pattern value="[A-Za-z_\-0-9/]*"/>
|
|
51
|
+
</xs:restriction>
|
|
52
|
+
</xs:simpleType>
|
|
53
|
+
|
|
54
|
+
<!-- the root element -->
|
|
55
|
+
<xs:element name="spec">
|
|
56
|
+
<xs:complexType>
|
|
57
|
+
<xs:choice minOccurs="1" maxOccurs="unbounded">
|
|
58
|
+
<xs:element name="class" type="classType"/>
|
|
59
|
+
</xs:choice>
|
|
60
|
+
</xs:complexType>
|
|
61
|
+
</xs:element>
|
|
62
|
+
</xs:schema>
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
|
2
|
+
<!-- the runscript -->
|
|
3
|
+
<xs:complexType name="runscriptType">
|
|
4
|
+
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
|
5
|
+
<xs:element name="machine" type="machineType"/>
|
|
6
|
+
<xs:element name="system" type="systemType">
|
|
7
|
+
<!-- setting keys have to be unique per system/version -->
|
|
8
|
+
<!-- setting-system link only possible with xsd 1.1, -->
|
|
9
|
+
<!-- which is not supported by the current lxml version -->
|
|
10
|
+
<xs:unique name="settingKey">
|
|
11
|
+
<xs:selector xpath="setting"/>
|
|
12
|
+
<xs:field xpath="@name"/>
|
|
13
|
+
</xs:unique>
|
|
14
|
+
</xs:element>
|
|
15
|
+
<xs:element name="config" type="configType"/>
|
|
16
|
+
<xs:element name="benchmark" type="benchmarkType"/>
|
|
17
|
+
<xs:element name="distjob" type="distjobType"/>
|
|
18
|
+
<xs:element name="seqjob" type="seqjobType"/>
|
|
19
|
+
<xs:element name="project" type="projectType"/>
|
|
20
|
+
</xs:choice>
|
|
21
|
+
<xs:attribute name="output" type="xs:string" use="required"/>
|
|
22
|
+
</xs:complexType>
|
|
23
|
+
|
|
24
|
+
<!-- a project -->
|
|
25
|
+
<xs:complexType name="projectType">
|
|
26
|
+
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
|
27
|
+
<xs:element name="runspec" type="runspecType"/>
|
|
28
|
+
<xs:element name="runtag" type="runtagType"/>
|
|
29
|
+
</xs:choice>
|
|
30
|
+
<xs:attribute name="name" type="nameType" use="required"/>
|
|
31
|
+
<xs:attribute name="job" type="nameType" use="required"/>
|
|
32
|
+
</xs:complexType>
|
|
33
|
+
|
|
34
|
+
<!-- a machine -->
|
|
35
|
+
<xs:complexType name="machineType">
|
|
36
|
+
<xs:attribute name="name" type="nameType" use="required"/>
|
|
37
|
+
<xs:attribute name="cpu" type="xs:token" use="required"/>
|
|
38
|
+
<xs:attribute name="memory" type="xs:token" use="required"/>
|
|
39
|
+
</xs:complexType>
|
|
40
|
+
|
|
41
|
+
<!-- a system -->
|
|
42
|
+
<xs:complexType name="systemType">
|
|
43
|
+
<xs:choice minOccurs="1" maxOccurs="unbounded">
|
|
44
|
+
<xs:element name="setting">
|
|
45
|
+
<xs:complexType>
|
|
46
|
+
<xs:sequence>
|
|
47
|
+
<xs:element name="encoding" minOccurs="0" maxOccurs="unbounded">
|
|
48
|
+
<xs:complexType>
|
|
49
|
+
<xs:attribute name="file" type="xs:string" use="required"/>
|
|
50
|
+
<xs:attribute name="encoding_tag">
|
|
51
|
+
<xs:simpleType>
|
|
52
|
+
<xs:list itemType="nameType"/>
|
|
53
|
+
</xs:simpleType>
|
|
54
|
+
</xs:attribute>
|
|
55
|
+
</xs:complexType>
|
|
56
|
+
</xs:element>
|
|
57
|
+
</xs:sequence>
|
|
58
|
+
<xs:attribute name="name" type="nameType" use="required"/>
|
|
59
|
+
<xs:attribute name="cmdline" type="xs:string"/>
|
|
60
|
+
<xs:attribute name="cmdline_post" type="xs:string"/>
|
|
61
|
+
<xs:attribute name="tag">
|
|
62
|
+
<xs:simpleType>
|
|
63
|
+
<xs:list itemType="nameType"/>
|
|
64
|
+
</xs:simpleType>
|
|
65
|
+
</xs:attribute>
|
|
66
|
+
<xs:attribute name="dist_template" type="xs:string"/>
|
|
67
|
+
<xs:attribute name="dist_options" type="xs:string"/>
|
|
68
|
+
<xs:anyAttribute processContents="lax"/>
|
|
69
|
+
</xs:complexType>
|
|
70
|
+
</xs:element>
|
|
71
|
+
</xs:choice>
|
|
72
|
+
<xs:attribute name="name" type="nameType" use="required"/>
|
|
73
|
+
<xs:attribute name="version" type="versionType" use="required"/>
|
|
74
|
+
<xs:attribute name="measures" type="nameType" use="required"/>
|
|
75
|
+
<xs:attribute name="config" type="nameType" use="required"/>
|
|
76
|
+
<xs:attribute name="cmdline" type="xs:string"/>
|
|
77
|
+
<xs:attribute name="cmdline_post" type="xs:string"/>
|
|
78
|
+
</xs:complexType>
|
|
79
|
+
|
|
80
|
+
<!-- generic attributes for jobs-->
|
|
81
|
+
<xs:attributeGroup name="jobAttr">
|
|
82
|
+
<xs:attribute name="name" type="nameType" use="required"/>
|
|
83
|
+
<xs:attribute name="timeout" type="timeType" use="required"/>
|
|
84
|
+
<xs:attribute name="runs" type="xs:positiveInteger" use="required"/>
|
|
85
|
+
<xs:attribute name="memout" type="xs:positiveInteger"/>
|
|
86
|
+
<xs:attribute name="template_options" type="xs:string"/>
|
|
87
|
+
<xs:anyAttribute processContents="lax"/>
|
|
88
|
+
</xs:attributeGroup>
|
|
89
|
+
|
|
90
|
+
<!-- a seqjob -->
|
|
91
|
+
<xs:complexType name="seqjobType">
|
|
92
|
+
<xs:attributeGroup ref="jobAttr"/>
|
|
93
|
+
<xs:attribute name="parallel" type="xs:positiveInteger" use="required"/>
|
|
94
|
+
</xs:complexType>
|
|
95
|
+
|
|
96
|
+
<!-- a distjob -->
|
|
97
|
+
<xs:complexType name="distjobType">
|
|
98
|
+
<xs:attributeGroup ref="jobAttr"/>
|
|
99
|
+
<xs:attribute name="script_mode" use="required">
|
|
100
|
+
<xs:simpleType>
|
|
101
|
+
<xs:restriction base="xs:string">
|
|
102
|
+
<xs:enumeration value="multi"/>
|
|
103
|
+
<xs:enumeration value="timeout"/>
|
|
104
|
+
</xs:restriction>
|
|
105
|
+
</xs:simpleType>
|
|
106
|
+
</xs:attribute>
|
|
107
|
+
<xs:attribute name="walltime" type="timeType" use="required"/>
|
|
108
|
+
<xs:attribute name="cpt" type="xs:positiveInteger" use="required"/>
|
|
109
|
+
<xs:attribute name="partition" type="xs:string"/>
|
|
110
|
+
</xs:complexType>
|
|
111
|
+
|
|
112
|
+
<!-- a config -->
|
|
113
|
+
<xs:complexType name="configType">
|
|
114
|
+
<xs:attribute name="name" type="nameType" use="required"/>
|
|
115
|
+
<xs:attribute name="template" type="xs:string" use="required"/>
|
|
116
|
+
</xs:complexType>
|
|
117
|
+
|
|
118
|
+
<xs:complexType name="testType">
|
|
119
|
+
<xs:choice minOccurs="1" maxOccurs="1">
|
|
120
|
+
<xs:choice minOccurs="1" maxOccurs="unbounded">
|
|
121
|
+
<xs:element name="a"/>
|
|
122
|
+
<xs:element name="b"/>
|
|
123
|
+
</xs:choice>
|
|
124
|
+
<xs:element name="c"/>
|
|
125
|
+
</xs:choice>
|
|
126
|
+
</xs:complexType>
|
|
127
|
+
|
|
128
|
+
<!-- a benchmark -->
|
|
129
|
+
<xs:complexType name="benchmarkType">
|
|
130
|
+
<xs:choice minOccurs="1" maxOccurs="1">
|
|
131
|
+
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
|
132
|
+
<xs:element name="spec">
|
|
133
|
+
<xs:complexType>
|
|
134
|
+
<xs:attribute name="path" type="xs:string" use="required"/>
|
|
135
|
+
<xs:attribute name="instance_tag" type="tagrefType"/>
|
|
136
|
+
</xs:complexType>
|
|
137
|
+
</xs:element>
|
|
138
|
+
</xs:choice>
|
|
139
|
+
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
|
140
|
+
<xs:element name="files">
|
|
141
|
+
<xs:complexType>
|
|
142
|
+
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
|
143
|
+
<xs:element name="add">
|
|
144
|
+
<xs:complexType>
|
|
145
|
+
<xs:attribute name="file" type="xs:string" use="required"/>
|
|
146
|
+
<xs:attribute name="group" type="xs:string"/>
|
|
147
|
+
</xs:complexType>
|
|
148
|
+
</xs:element>
|
|
149
|
+
<xs:element name="encoding">
|
|
150
|
+
<xs:complexType>
|
|
151
|
+
<xs:attribute name="file" type="xs:string" use="required"/>
|
|
152
|
+
</xs:complexType>
|
|
153
|
+
</xs:element>
|
|
154
|
+
</xs:choice>
|
|
155
|
+
<xs:attribute name="path" type="xs:string" use="required"/>
|
|
156
|
+
<xs:attribute name="encoding_tag">
|
|
157
|
+
<xs:simpleType>
|
|
158
|
+
<xs:list itemType="nameType"/>
|
|
159
|
+
</xs:simpleType>
|
|
160
|
+
</xs:attribute>
|
|
161
|
+
</xs:complexType>
|
|
162
|
+
</xs:element>
|
|
163
|
+
<xs:element name="folder">
|
|
164
|
+
<xs:complexType>
|
|
165
|
+
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
|
166
|
+
<xs:element name="ignore">
|
|
167
|
+
<xs:complexType>
|
|
168
|
+
<xs:attribute name="prefix" type="xs:string" use="required"/>
|
|
169
|
+
</xs:complexType>
|
|
170
|
+
</xs:element>
|
|
171
|
+
<xs:element name="encoding">
|
|
172
|
+
<xs:complexType>
|
|
173
|
+
<xs:attribute name="file" type="xs:string" use="required"/>
|
|
174
|
+
</xs:complexType>
|
|
175
|
+
</xs:element>
|
|
176
|
+
</xs:choice>
|
|
177
|
+
<xs:attribute name="path" type="xs:string" use="required"/>
|
|
178
|
+
<xs:attribute name="group" type="xs:boolean"/>
|
|
179
|
+
<xs:attribute name="encoding_tag">
|
|
180
|
+
<xs:simpleType>
|
|
181
|
+
<xs:list itemType="nameType"/>
|
|
182
|
+
</xs:simpleType>
|
|
183
|
+
</xs:attribute>
|
|
184
|
+
</xs:complexType>
|
|
185
|
+
</xs:element>
|
|
186
|
+
</xs:choice>
|
|
187
|
+
</xs:choice>
|
|
188
|
+
<xs:attribute name="name" type="nameType" use="required"/>
|
|
189
|
+
</xs:complexType>
|
|
190
|
+
|
|
191
|
+
<!-- common attributes for runspec/runtag -->
|
|
192
|
+
<xs:attributeGroup name="runAttr">
|
|
193
|
+
<xs:attribute name="machine" type="nameType" use="required"/>
|
|
194
|
+
<xs:attribute name="benchmark" type="nameType" use="required"/>
|
|
195
|
+
</xs:attributeGroup>
|
|
196
|
+
|
|
197
|
+
<!-- a runspec -->
|
|
198
|
+
<xs:complexType name="runspecType">
|
|
199
|
+
<xs:attribute name="system" type="nameType" use="required"/>
|
|
200
|
+
<xs:attribute name="version" type="versionType" use="required"/>
|
|
201
|
+
<xs:attribute name="setting" type="nameType" use="required"/>
|
|
202
|
+
<xs:attributeGroup ref="runAttr"/>
|
|
203
|
+
</xs:complexType>
|
|
204
|
+
|
|
205
|
+
<!-- a runtag -->
|
|
206
|
+
<xs:complexType name="runtagType">
|
|
207
|
+
<xs:attributeGroup ref="runAttr"/>
|
|
208
|
+
<xs:attribute name="tag" type="tagrefType"/>
|
|
209
|
+
</xs:complexType>
|
|
210
|
+
|
|
211
|
+
<!-- simple types used througout the above definitions -->
|
|
212
|
+
<xs:simpleType name="versionType">
|
|
213
|
+
<xs:restriction base="xs:string">
|
|
214
|
+
<xs:pattern value="[0-9a-zA-Z._-]+"/>
|
|
215
|
+
</xs:restriction>
|
|
216
|
+
</xs:simpleType>
|
|
217
|
+
|
|
218
|
+
<xs:simpleType name="timeType">
|
|
219
|
+
<xs:restriction base="xs:string">
|
|
220
|
+
<xs:pattern value="([0-9]+)|([0-9]+d)?[ ]*([0-9]+h)?[ ]*([0-9]+m)?[ ]*([0-9]+s)?"/>
|
|
221
|
+
</xs:restriction>
|
|
222
|
+
</xs:simpleType>
|
|
223
|
+
|
|
224
|
+
<xs:simpleType name="tagrefType">
|
|
225
|
+
<xs:restriction base="xs:string">
|
|
226
|
+
<xs:pattern value="(\*all\*)|([A-Za-z_\-0-9]+([ ]*[A-Za-z_\-0-9]+)*)([ ]*\|[ ]*([A-Za-z_\-0-9]+([ ]*[A-Za-z_\-0-9]+)*))*"/>
|
|
227
|
+
</xs:restriction>
|
|
228
|
+
</xs:simpleType>
|
|
229
|
+
|
|
230
|
+
<xs:simpleType name="nameType">
|
|
231
|
+
<xs:restriction base="xs:string">
|
|
232
|
+
<xs:pattern value="[A-Za-z_\-0-9]*"/>
|
|
233
|
+
</xs:restriction>
|
|
234
|
+
</xs:simpleType>
|
|
235
|
+
|
|
236
|
+
<!-- the root element -->
|
|
237
|
+
<xs:element name="runscript" type="runscriptType">
|
|
238
|
+
<!-- machine keys -->
|
|
239
|
+
<xs:key name="machineKey">
|
|
240
|
+
<xs:selector xpath="machine"/>
|
|
241
|
+
<xs:field xpath="@name"/>
|
|
242
|
+
</xs:key>
|
|
243
|
+
<xs:keyref name="machineRef" refer="machineKey">
|
|
244
|
+
<xs:selector xpath="project/runspec"/>
|
|
245
|
+
<xs:field xpath="@machine"/>
|
|
246
|
+
</xs:keyref>
|
|
247
|
+
<!-- benchmark keys -->
|
|
248
|
+
<xs:key name="benchmarkKey">
|
|
249
|
+
<xs:selector xpath="benchmark"/>
|
|
250
|
+
<xs:field xpath="@name"/>
|
|
251
|
+
</xs:key>
|
|
252
|
+
<xs:keyref name="benchmarkRef" refer="benchmarkKey">
|
|
253
|
+
<xs:selector xpath="project/runspec"/>
|
|
254
|
+
<xs:field xpath="@benchmark"/>
|
|
255
|
+
</xs:keyref>
|
|
256
|
+
<!-- system keys -->
|
|
257
|
+
<xs:key name="systemKey">
|
|
258
|
+
<xs:selector xpath="system"/>
|
|
259
|
+
<xs:field xpath="@name"/>
|
|
260
|
+
<xs:field xpath="@version"/>
|
|
261
|
+
</xs:key>
|
|
262
|
+
<xs:keyref name="systemRef" refer="systemKey">
|
|
263
|
+
<xs:selector xpath="project/runspec"/>
|
|
264
|
+
<xs:field xpath="@system"/>
|
|
265
|
+
<xs:field xpath="@version"/>
|
|
266
|
+
</xs:keyref>
|
|
267
|
+
<!-- config keys -->
|
|
268
|
+
<xs:key name="configKey">
|
|
269
|
+
<xs:selector xpath="config"/>
|
|
270
|
+
<xs:field xpath="@name"/>
|
|
271
|
+
</xs:key>
|
|
272
|
+
<xs:keyref name="configRef" refer="configKey">
|
|
273
|
+
<xs:selector xpath="system"/>
|
|
274
|
+
<xs:field xpath="@config"/>
|
|
275
|
+
</xs:keyref>
|
|
276
|
+
<!-- config keys -->
|
|
277
|
+
<xs:key name="jobKey">
|
|
278
|
+
<xs:selector xpath="seqjob|distjob"/>
|
|
279
|
+
<xs:field xpath="@name"/>
|
|
280
|
+
</xs:key>
|
|
281
|
+
<xs:keyref name="jobRef" refer="jobKey">
|
|
282
|
+
<xs:selector xpath="project"/>
|
|
283
|
+
<xs:field xpath="@job"/>
|
|
284
|
+
</xs:keyref>
|
|
285
|
+
<!-- project keys -->
|
|
286
|
+
<xs:unique name="projectKey">
|
|
287
|
+
<xs:selector xpath="project"/>
|
|
288
|
+
<xs:field xpath="@name"/>
|
|
289
|
+
</xs:unique>
|
|
290
|
+
|
|
291
|
+
</xs:element>
|
|
292
|
+
</xs:schema>
|
|
@@ -12,15 +12,17 @@ benchmarktool/result/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
|
|
|
12
12
|
benchmarktool/result/ipynb_gen.py,sha256=QGnU4E3am8K0kPlaKBAh_1utNwWmzc6Um97WSwGuFWg,14854
|
|
13
13
|
benchmarktool/result/parser.py,sha256=AeM0KZlTMPL8csOIBG3JD5A4yzxoXcra1kom87NCeB8,6625
|
|
14
14
|
benchmarktool/result/result.py,sha256=7wDNlrm4qF2vi1HoXFMx18aqjgWuDiNfh9-UXlYZQf4,14703
|
|
15
|
-
benchmarktool/result/xlsx_gen.py,sha256=
|
|
15
|
+
benchmarktool/result/xlsx_gen.py,sha256=Jf_9jOnnPlZAYnRV3ZeZsJMgIfWudmYTVLF0JkTZ3O0,40086
|
|
16
16
|
benchmarktool/resultparser/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
17
|
benchmarktool/resultparser/clasp.py,sha256=8ZE1zcaV6D9o2lx_qq_s6MlgRQi4fkO5LTbBVFmhBXA,4035
|
|
18
18
|
benchmarktool/runscript/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
|
-
benchmarktool/runscript/parser.py,sha256=
|
|
20
|
-
benchmarktool/runscript/runscript.py,sha256=
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
potassco_benchmark_tool-2.2.
|
|
24
|
-
potassco_benchmark_tool-2.2.
|
|
25
|
-
potassco_benchmark_tool-2.2.
|
|
26
|
-
potassco_benchmark_tool-2.2.
|
|
19
|
+
benchmarktool/runscript/parser.py,sha256=JDGZwwWVq6xZFlnhh9xdMdAmUHxt6a9s6PyNmqqqamM,16352
|
|
20
|
+
benchmarktool/runscript/runscript.py,sha256=epSGedAmWeWYs84rVj9sJyx-Zo8h8SZy3nEyV1NB9nI,56295
|
|
21
|
+
benchmarktool/runscript/schemas/benchmark_spec.xsd,sha256=b0z-4RWmFzA41poA8VTS99LhAby-mEP_URxnirPp0p0,2403
|
|
22
|
+
benchmarktool/runscript/schemas/runscript.xsd,sha256=0gBumYo8nTI8c0nDx_RPgrMqoVTKlUeIczXJkf99zac,12670
|
|
23
|
+
potassco_benchmark_tool-2.2.2.dist-info/licenses/LICENSE,sha256=eiYGM1U3OL1PkD5Leken0kocRuk_9Inhq6aiyfSWYYs,1065
|
|
24
|
+
potassco_benchmark_tool-2.2.2.dist-info/METADATA,sha256=6x6vwbEz2ro7hj-7ScKnjlugh9SgJqf8bCafIoubLPM,4270
|
|
25
|
+
potassco_benchmark_tool-2.2.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
26
|
+
potassco_benchmark_tool-2.2.2.dist-info/entry_points.txt,sha256=pHyaCS16SLT-m0ZpybGtvg2PxI5TNKonBUH1DJyeKVY,58
|
|
27
|
+
potassco_benchmark_tool-2.2.2.dist-info/top_level.txt,sha256=raOGCL-YmmJFALuaHUXcH4bFccgTAB7JVLPxFFqFL7Y,14
|
|
28
|
+
potassco_benchmark_tool-2.2.2.dist-info/RECORD,,
|
{potassco_benchmark_tool-2.2.0.dist-info → potassco_benchmark_tool-2.2.2.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{potassco_benchmark_tool-2.2.0.dist-info → potassco_benchmark_tool-2.2.2.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{potassco_benchmark_tool-2.2.0.dist-info → potassco_benchmark_tool-2.2.2.dist-info}/top_level.txt
RENAMED
|
File without changes
|