From cded0761f9debbceab093dcfc58682e129f95fc9 Mon Sep 17 00:00:00 2001 From: Hamed Gorjiara Date: Sun, 24 Mar 2019 16:39:57 -0700 Subject: [PATCH] Adding timeout for SATTune --- src/Tuner/basictuner.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Tuner/basictuner.cc b/src/Tuner/basictuner.cc index 6f0f5e0..122f4d3 100644 --- a/src/Tuner/basictuner.cc +++ b/src/Tuner/basictuner.cc @@ -157,9 +157,9 @@ long long BasicTuner::evaluate(Problem *problem, TunerRecord *tuner) { uint timeinsecs = problem->getBestTime() / NANOSEC; uint adaptive = (timeinsecs > 30) ? timeinsecs * 5 : 150; uint maxtime = (adaptive < timeout) ? adaptive : timeout; - + uint satuneTimeout = 2*maxtime; //Do run - snprintf(buffer, sizeof(buffer), "./run.sh deserializerun %s %u tuner%u result%u > log%u", problem->getProblem(), maxtime, execnum, execnum, execnum); + snprintf(buffer, sizeof(buffer), "timeout %u ./run.sh deserializerun %s %u tuner%u result%u > log%u", satuneTimeout, problem->getProblem(), maxtime, execnum, execnum, execnum); model_print("Running: %s\n", buffer); int status = system(buffer); -- 2.34.1