Skip to content
Snippets Groups Projects
Commit ee628630 authored by Johannes Mey's avatar Johannes Mey
Browse files

add some debug output for external solver.

parent fb3eda51
Branches
Tags
No related merge requests found
...@@ -110,12 +110,15 @@ public class ILPExternalSolver extends AbstractILPSolver { ...@@ -110,12 +110,15 @@ public class ILPExternalSolver extends AbstractILPSolver {
cleanup(watch); cleanup(watch);
throw new SolvingException("Interrupted while waiting for result", e); throw new SolvingException("Interrupted while waiting for result", e);
} }
StopWatch writerWatch = StopWatch.start();
if (!finishedInTime) { if (!finishedInTime) {
// solver already had a timeout, so wait some seconds longer to let it write a solution file // solver already had a timeout, so wait some seconds longer to let it write a solution file
this.timedOut = true; this.timedOut = true;
try { 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) { } } catch (InterruptedException ignored) { }
logger.debug("Solver took {} seconds to write the result.", writerWatch.time(TimeUnit.SECONDS));
// then destroy the process // then destroy the process
process.destroyForcibly(); process.destroyForcibly();
if (!solutionReadable.toAbsolutePath().toFile().exists()) { if (!solutionReadable.toAbsolutePath().toFile().exists()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment