diff --git a/bin/donkey_benchmark_compilation_wrapper.sh b/bin/donkey_benchmark_compilation_wrapper.sh index e2691b5d71db2473b731fabcea6a1095ec2516d9..a786d111264ef0e67769100713f1776e3e002c3d 100755 --- a/bin/donkey_benchmark_compilation_wrapper.sh +++ b/bin/donkey_benchmark_compilation_wrapper.sh @@ -13,7 +13,4 @@ ml parmetis ("$@") code=$? -echo "Code: $code" -sleep 0.1s - exit $code diff --git a/bin/donkey_benchmark_execution_wrapper.py b/bin/donkey_benchmark_execution_wrapper.py index ef77e1a14d36f578762342ed4fbd6351062d2429..d383963318291ae947c70b1f083c320a60250303 100755 --- a/bin/donkey_benchmark_execution_wrapper.py +++ b/bin/donkey_benchmark_execution_wrapper.py @@ -13,8 +13,3 @@ ret = subprocess.call(command) # If that failed - fail! if ret != 0: sys.exit(ret) - -# If that was succesful, wait for the output file to be available on the filesystem -# This step is necessary because the NFS synchronization is too slow for our workflow. -while not os.path.isfile(sys.argv[-1]): - time.sleep(0.1) diff --git a/python/dune/codegen/sumfact/autotune.py b/python/dune/codegen/sumfact/autotune.py index d19fd7be5587258e8db1f3ada3301b1e7017f95e..e0788ca6c3e1a41e524593e7ec4cd66160144602 100644 --- a/python/dune/codegen/sumfact/autotune.py +++ b/python/dune/codegen/sumfact/autotune.py @@ -14,6 +14,7 @@ import re import subprocess import filelock import hashlib +import time def get_cmake_cache_entry(entry): @@ -320,6 +321,10 @@ def autotune_realization(sf): if ret != 0: raise CodegenAutotuneError("Compilation of autotune executable failed. Invocation: {}".format(" ".join(call))) + # File system synchronization! + while not os.path.exists(executable): + time.sleep(0.01) + # Check whether the user specified an execution wrapper call = [] wrapper = get_cmake_cache_entry("DUNE_CODEGEN_BENCHMARK_EXECUTION_WRAPPER") @@ -337,6 +342,10 @@ def autotune_realization(sf): if ret != 0: raise CodegenAutotuneError("Execution of autotune benchmark failed. Invocation: {}".format(" ".join(call))) + # File system synchronization! + while not os.path.exists(logname): + time.sleep(0.01) + # Extract the result form the log file if get_option("autotune_google_benchmark"): import json