Commit 32665c0f authored by Manuel Mohr's avatar Manuel Mohr
Browse files

Add option to set cpu time limit.

parent 641ba8a1
......@@ -54,6 +54,8 @@ parser.add_option("--no-large", action="store_true", default=False,
help="Exclude OMPL programs")
parser.add_option("-i", "--iterations", metavar="ITR", default=3,
help="Evaluate ITR iterations per program, default=3")
parser.add_option("--time-limit", metavar="TIMELIMIT", default=0,
help="Set cpu time limit for each program run to TIMELIMIT seconds.")
parser.add_option("--c-compiler", metavar="CC", default="gcc",
help="Use CC to build benchmark programs, default=gcc")
......@@ -417,6 +419,11 @@ def generate_spec_config(options):
contents.append("hw_memory = %s" % meminfo["MemTotal"])
contents.append("hw_pcache = %s" % cpuinfo.get("cache size", "?"))
contents.append("")
time_limit = int(options.time_limit)
if time_limit != 0:
contents.append("use_submit_for_speed = 1")
contents.append("submit =ulimit -t %d ; $command" % time_limit)
contents.append("")
contents.append("CC = %s" % options.c_compiler)
contents.append("CXX = %s" % options.cpp_compiler)
contents.append("FC = %s" % options.fortran_compiler)
......
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