Commit 4748dd33 authored by Andreas Zwinkau's avatar Andreas Zwinkau
Browse files

Add options to specify which programs to run

parent 8855e098
......@@ -38,6 +38,14 @@ parser.add_option("--config-only", action="store_true", default=False,
help="Just generate config file, but do not build or run")
parser.add_option("--build-only", action="store_true", default=False,
help="Just generate config file and build benchmark programs, but do not run")
parser.add_option("--no-cpp", action="store_true", default=False,
help="Exlude benchmark programs using C++")
parser.add_option("--no-fortran", action="store_true", default=False,
help="Exlude benchmark programs using Fortran")
parser.add_option("--no-medium", action="store_true", default=False,
help="Exlude OMPM programs")
parser.add_option("--no-large", action="store_true", default=False,
help="Exlude OMPL progras")
parser.add_option("-i", "--iterations", metavar="ITR", default=3,
help="Evaluate ITR iterations per program, default=3")
......@@ -57,6 +65,7 @@ parser.add_option("--fortran-compiler-args", metavar="FFLAGS", default="",
parser.add_option("--cpp-compiler-args", metavar="CFLAGS", default="",
help="Append CFLAGS to build benchmark programs for C++ compiler, default empty")
# http://www.spec.org/cpu2006/Docs/config.html
_CONFIG_HEAD = """\
......@@ -220,6 +229,98 @@ def get_portability():
contents.append(text)
return "\n".join(contents)
BENCHMARK_LANGUAGES = [
("SPEC CPU2000", "164.gzip", "c"),
("SPEC CPU2000", "175.vpr", "c"),
("SPEC CPU2000", "176.gcc", "c"),
("SPEC CPU2000", "181.mcf", "c"),
("SPEC CPU2000", "186.crafty", "c"),
("SPEC CPU2000", "197.parser", "c"),
("SPEC CPU2000", "252.eon", "cpp"),
("SPEC CPU2000", "253.perlbmk", "c"),
("SPEC CPU2000", "254.gap", "c"),
("SPEC CPU2000", "255.vortex", "c"),
("SPEC CPU2000", "256.bzip2", "c"),
("SPEC CPU2000", "300.twolf", "c"),
("SPEC CPU2000", "168.wupwise", "fortran77"),
("SPEC CPU2000", "171.swim", "fortran77"),
("SPEC CPU2000", "172.mgrid", "fortran77"),
("SPEC CPU2000", "173.applu", "fortran77"),
("SPEC CPU2000", "177.mesa", "c"),
("SPEC CPU2000", "178.galgel", "fortran90"),
("SPEC CPU2000", "179.art", "c"),
("SPEC CPU2000", "183.equake", "c"),
("SPEC CPU2000", "187.facerec", "fortran90"),
("SPEC CPU2000", "188.ammp", "c"),
("SPEC CPU2000", "189.lucas", "fortran90"),
("SPEC CPU2000", "191.fma3d", "fortran90"),
("SPEC CPU2000", "200.sixtrack", "fortran77"),
("SPEC CPU2000", "301.apsi", "fortran77"),
("SPEC OMP2001", "310.wupwise_m", "?"),
("SPEC OMP2001", "311.wupwise_l", "?"),
("SPEC OMP2001", "312.swim_m", "?"),
("SPEC OMP2001", "313.swim_l", "?"),
("SPEC OMP2001", "314.mgrid_m", "?"),
("SPEC OMP2001", "315.mgrid_l", "?"),
("SPEC OMP2001", "316.applu_m", "?"),
("SPEC OMP2001", "317.applu_l", "?"),
("SPEC OMP2001", "318.galgel_m", "?"),
("SPEC OMP2001", "330.art_m", "?"),
("SPEC OMP2001", "331.art_l", "?"),
("SPEC OMP2001", "320.equake_m", "?"),
("SPEC OMP2001", "321.equake_l", "?"),
("SPEC OMP2001", "332.ammp_m", "?"),
("SPEC OMP2001", "328.fma3d_m", "?"),
("SPEC OMP2001", "329.fma3d_l", "?"),
("SPEC OMP2001", "324.apsi_m", "?"),
("SPEC OMP2001", "325.apsi_l", "?"),
("SPEC OMP2001", "326.gafort_m", "?"),
("SPEC OMP2001", "327.gafort_l", "?"),
("SPEC CPU2006", "400.perlbench", "c"),
("SPEC CPU2006", "401.bzip2", "c"),
("SPEC CPU2006", "403.gcc", "c"),
("SPEC CPU2006", "429.mcf", "c"),
("SPEC CPU2006", "445.gobmk", "c"),
("SPEC CPU2006", "456.hmmer", "c"),
("SPEC CPU2006", "458.sjeng", "c"),
("SPEC CPU2006", "462.libquantum", "c"),
("SPEC CPU2006", "464.h264ref", "c"),
("SPEC CPU2006", "471.omnetpp", "cpp"),
("SPEC CPU2006", "473.astar", "cpp"),
("SPEC CPU2006", "483.xalancbmk", "cpp"),
("SPEC CPU2006", "410.bwaves", "fortran"),
("SPEC CPU2006", "416.gamess", "fortran"),
("SPEC CPU2006", "433.milc", "c"),
("SPEC CPU2006", "434.zeusmp", "fortran"),
("SPEC CPU2006", "435.gromacs", "c,fortran"),
("SPEC CPU2006", "436.cactusADM", "c,fortran"),
("SPEC CPU2006", "437.leslie3d", "fortran"),
("SPEC CPU2006", "444.namd", "cpp"),
("SPEC CPU2006", "447.dealII", "cpp"),
("SPEC CPU2006", "450.soplex", "cpp"),
("SPEC CPU2006", "453.povray", "cpp"),
("SPEC CPU2006", "454.calculix", "c,fortran"),
("SPEC CPU2006", "459.GemsFDTD", "fortran"),
("SPEC CPU2006", "465.tonto", "fortran"),
("SPEC CPU2006", "470.lbm", "c"),
("SPEC CPU2006", "481.wrf", "c,fortran"),
("SPEC CPU2006", "482.sphinx3", "c"),
]
def filter_progs(options):
for suite, prog, langs in BENCHMARK_LANGUAGES:
if suite != SPEC_SUITE:
continue
if options.no_cpp and "cpp" in langs:
continue
if options.no_fortran and "fortran" in langs:
continue
if options.no_medium and prog.endswith("_m"):
continue
if options.no_large and prog.endswith("_l"):
continue
yield prog
def generate_spec_config(options):
"""Generate a config file for SPEC"""
contents = [_CONFIG_HEAD]
......@@ -279,6 +380,7 @@ if __name__ == "__main__":
fh.write(conf)
if options.config_only:
exit(0)
cmd = "env bash -l -c 'source shrc && runspec all -c generated'"
progs = " ".join(filter_progs(options))
cmd = "env bash -l -c 'source shrc && runspec %s -c generated'" % progs
os.system(cmd)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment