Skip to content
Snippets Groups Projects
Commit 99b2f2f4 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

Add a benchmark compilation wrapper

parent 20df5b20
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
ml gcc/6.4.0
ml benchmark/1.4.0
ml python/3.6.3
ml openmpi
ml cmake
ml openblas
ml metis
ml suite-sparse
ml superlu
ml parmetis
"$@"
sleep 0.1s
......@@ -304,14 +304,20 @@ def autotune_realization(sf):
else:
generate_standalone_code(sf, filename)
call = []
wrapper = get_cmake_cache_entry("DUNE_CODEGEN_BENCHMARK_COMPILATION_WRAPPER")
if wrapper:
call.append(wrapper)
call.extend(compiler_invocation(executable, filename))
devnull = open(os.devnull, 'w')
ret = subprocess.call(compiler_invocation(executable, filename), stdout=devnull, stderr=subprocess.STDOUT)
ret = subprocess.call(call, stdout=devnull, stderr=subprocess.STDOUT)
if ret != 0:
raise CodegenAutotuneError("Compilation of autotune executable failed. Invocation: {}".format(" ".join(compiler_invocation(executable, filename))))
raise CodegenAutotuneError("Compilation of autotune executable failed. Invocation: {}".format(" ".join(call)))
# Check whether the user specified an execution wrapper
call = []
wrapper = get_cmake_cache_entry("DUNE_CODEGEN_BENCHMARK_WRAPPER")
wrapper = get_cmake_cache_entry("DUNE_CODEGEN_BENCHMARK_EXECUTION_WRAPPER")
if wrapper:
call.append(wrapper)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment