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
No related branches found
No related tags found
No related merge requests found
......@@ -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()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment