diff --git a/python/dune/perftool/sumfact/autotune.py b/python/dune/perftool/sumfact/autotune.py index 7578799cf6fa971d943c6e6f7cad084bba07660a..a9517c43b9144aa19a200e10931d8dc455928b81 100644 --- a/python/dune/perftool/sumfact/autotune.py +++ b/python/dune/perftool/sumfact/autotune.py @@ -15,7 +15,7 @@ import subprocess def get_cmake_cache_entry(entry): for line in open(os.path.join(get_option("project_basedir"), "CMakeCache.txt"), "r"): - match = re.match("{}:[INTERNAL|FILEPATH|BOOL|STRING|PATH]+=(.*)".format(entry), line) + match = re.match("{}:[INTERNAL|FILEPATH|BOOL|STRING|PATH|UNINITIALIZED]+=(.*)".format(entry), line) if match: return match.groups()[0] @@ -183,9 +183,16 @@ def autotune_realization(sf): ret = subprocess.call(compiler_invocation(name, filename)) assert ret == 0 + # Check whether the user specified an execution wrapper + call = [] + wrapper = get_cmake_cache_entry("DUNE_PERFTOOL_BENCHMARK_WRAPPER") + if wrapper: + call.append(wrapper) + # Run the benchmark program + call.append(name) devnull = open(os.devnull, 'w') - ret = subprocess.call([name], stdout=devnull, stderr=subprocess.STDOUT) + ret = subprocess.call(call, stdout=devnull, stderr=subprocess.STDOUT) assert ret == 0 # Extract the result form the log file