mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-23 16:20:28 +01:00
Finally logging solver output to separate file
This commit is contained in:
parent
04df785909
commit
39ca5697c9
12
src/sdps.jl
12
src/sdps.jl
@ -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!")
|
||||||
|
Loading…
Reference in New Issue
Block a user