From ee6286301c10d3d618fabae8a54f25a14d73a92d Mon Sep 17 00:00:00 2001
From: Johannes Mey <johannes.mey@tu-dresden.de>
Date: Wed, 29 Aug 2018 16:50:49 +0200
Subject: [PATCH] add some debug output for external solver.

---
 .../inf/st/mquat/solving/ilp/ILPExternalSolver.java          | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/jastadd-mquat-solver-ilp/src/main/java/de/tudresden/inf/st/mquat/solving/ilp/ILPExternalSolver.java b/jastadd-mquat-solver-ilp/src/main/java/de/tudresden/inf/st/mquat/solving/ilp/ILPExternalSolver.java
index 851e078..35c5ec9 100644
--- a/jastadd-mquat-solver-ilp/src/main/java/de/tudresden/inf/st/mquat/solving/ilp/ILPExternalSolver.java
+++ b/jastadd-mquat-solver-ilp/src/main/java/de/tudresden/inf/st/mquat/solving/ilp/ILPExternalSolver.java
@@ -110,12 +110,15 @@ public class ILPExternalSolver extends AbstractILPSolver {
       cleanup(watch);
       throw new SolvingException("Interrupted while waiting for result", e);
     }
+    StopWatch writerWatch = StopWatch.start();
     if (!finishedInTime) {
       // solver already had a timeout, so wait some seconds longer to let it write a solution file
       this.timedOut = true;
       try {
-        process.waitFor(10, TimeUnit.SECONDS);
+        logger.debug("Solver had a timeout, waiting ten seconds to let it write the result.");
+        process.waitFor(60, TimeUnit.SECONDS);
       } catch (InterruptedException ignored) { }
+      logger.debug("Solver took {} seconds to write the result.", writerWatch.time(TimeUnit.SECONDS));
       // then destroy the process
       process.destroyForcibly();
       if (!solutionReadable.toAbsolutePath().toFile().exists()) {
-- 
GitLab