Skip to content
Snippets Groups Projects

Various fixes to hepscore19 and correct reptest file mode.

Merged Christopher Henry Hollowell requested to merge chollowe/hep-workloads:qa into qa
2 files
+ 20
15
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 20
15
@@ -12,7 +12,7 @@ import sys, getopt, string, os, subprocess, time, json, glob, yaml
NAME = "HEPScore19"
CONF = """container_benchmark_suite:
name: """ + NAME + """
version: 0.1
version: 0.2
repetitions: 1 #number of repetitions of the same benchmark
reference_scores: {} #to be retrieved from a DB?
method: geometric_mean #or any other algorithm
@@ -65,13 +65,16 @@ def proc_results(benchmark, key, rpath, runs, verbose):
average_score = 0
results = []
try:
benchmark_glob = benchmark.split('-')[:-1]
except:
print "\nError: expect at least 1 '-' character in benchmark name"
sys.exit(2)
if benchmark == "kv-bmk":
benchmark_glob = "test_"
else:
try:
benchmark_glob = benchmark.split('-')[:-1]
except:
print "\nError: expect at least 1 '-' character in benchmark name"
sys.exit(2)
benchmark_glob = '-'.join(benchmark_glob)
benchmark_glob = '-'.join(benchmark_glob)
gpaths=glob.glob(rpath+"/"+benchmark_glob+"*/*summary.json")
@@ -89,7 +92,7 @@ def proc_results(benchmark, key, rpath, runs, verbose):
sys.exit(2)
if verbose:
print '\n ' + str(score)
print str(score)
try:
float(score)
except ValueError:
@@ -117,7 +120,7 @@ def run_benchmark(benchmark, cm, output, verbose, conf):
options_string = ""
runs = int(conf['repetitions'])
log = output + "/" + NAME + ".log"
log = output + "/" + conf['name'] + ".log"
for key in req_options:
if key not in conf['benchmarks'][benchmark]:
@@ -141,10 +144,7 @@ def run_benchmark(benchmark, cm, output, verbose, conf):
sys.stdout.write("Executing " + str(runs) + " run")
if runs>1:
sys.stdout.write('s')
sys.stdout.write(" of " + benchmark_complete)
if not verbose:
print
sys.stdout.write(" of " + benchmark)
command = commands[cm] + benchmark_complete
@@ -165,7 +165,6 @@ def run_benchmark(benchmark, cm, output, verbose, conf):
lfile.flush()
line=cmdf.stdout.readline()
lfile.close()
cmdf.wait()
@@ -173,6 +172,10 @@ def run_benchmark(benchmark, cm, output, verbose, conf):
print "\nError: running " + benchmark + " failed. Exit status " + str(cmdf.returncode) + "\n"
sys.exit(2)
lfile.close()
print
return(proc_results(benchmark, scorekey, output, runs, verbose))
@@ -186,7 +189,7 @@ def read_conf(cfile):
yfile = open(cfile, mode='r')
CONF = string.join((yfile.readlines()), '\n')
except:
print "\nError: cannot open/read from " + arg + "\n"
print "\nError: cannot open/read from " + cfile + "\n"
sys.exit(1)
@@ -295,6 +298,8 @@ def main():
print "Version: " + str(confobj['version'])
print "System: " + ' '.join(os.uname())
print "Container Execution: " + cms
print "Registry: " + confobj['registry']
print "Output: " + output
print "Date: " + time.asctime()
print
Loading