1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-11-27 01:10:28 +01:00

Finally logging solver output to separate file

This commit is contained in:
kalmar 2017-03-16 15:37:52 +01:00
parent 04df785909
commit 39ca5697c9

View File

@ -75,17 +75,15 @@ function solve_SDP(SDP_problem, solver)
out = STDOUT out = STDOUT
err = STDERR err = STDERR
redirect_stdout(solver_logger.handlers["solver"].io) o = redirect_stdout(solver_logger.handlers["solver"].io)
redirect_stderr(solver_logger.handlers["solver"].io) e = redirect_stderr(solver_logger.handlers["solver"].io)
solution_status = JuMP.solve(SDP_problem); solution_status = JuMP.solve(SDP_problem);
Base.Libc.flush_cstdio()
flush(solver_logger.handlers["solver"].io)
info(solver_logger, "Finished!")
remove_handler(solver_logger, "solver") remove_handler(solver_logger, "solver")
redirect_stdout(out) redirect_stdout(o)
redirect_stderr(err) redirect_stderr(e)
if solution_status != :Optimal if solution_status != :Optimal
warn(logger, "The solver did not solve the problem successfully!") warn(logger, "The solver did not solve the problem successfully!")