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

A bit more fixes for the autotune setup

parent ccccc61f
No related branches found
No related tags found
No related merge requests found
......@@ -198,6 +198,7 @@ def autotune_realization(sf):
filename = os.path.join(dir, "{}.cc".format(basename))
logname = os.path.join(dir, "{}.log".format(basename))
lock = os.path.join(dir, "{}.lock".format(basename))
executable = os.path.join(dir, basename)
# Generate and compile a benchmark program
with cache_restoring():
......@@ -205,7 +206,8 @@ def autotune_realization(sf):
if not os.path.isfile(logname):
generate_standalone_code(sf, filename)
ret = subprocess.call(compiler_invocation(basename, filename))
devnull = open(os.devnull, 'w')
ret = subprocess.call(compiler_invocation(executable, filename), stdout=devnull, stderr=subprocess.STDOUT)
if ret != 0:
raise CodegenAutotuneError("Compilation of autotune executable failed. Invocation: {}".format(" ".join(compiler_invocation(name, filename))))
......@@ -216,9 +218,8 @@ def autotune_realization(sf):
call.append(wrapper)
# Run the benchmark program
call.append(basename)
call.append(executable)
call.append(logname)
devnull = open(os.devnull, 'w')
ret = subprocess.call(call, stdout=devnull, stderr=subprocess.STDOUT)
if ret != 0:
raise CodegenAutotuneError("Execution of autotune benchmark failed. Invocation: {}".format(" ".join(call)))
......
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