mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-12-26 02:30:29 +01:00
fix solver logger, once again
This commit is contained in:
parent
47664dd7e4
commit
eefeb926b0
@ -6,6 +6,7 @@ import SCS.SCSSolver
|
|||||||
using Memento
|
using Memento
|
||||||
|
|
||||||
const logger = basic_config("info")
|
const logger = basic_config("info")
|
||||||
|
const solver_logger = basic_config("info")
|
||||||
|
|
||||||
include("sdps.jl")
|
include("sdps.jl")
|
||||||
include("checksolution.jl")
|
include("checksolution.jl")
|
||||||
@ -82,6 +83,9 @@ function κandA(name::String, sdp_constraints, Δ::GroupAlgebraElement, solver::
|
|||||||
if isfile("$name/solver.log")
|
if isfile("$name/solver.log")
|
||||||
rm("$name/solver.log")
|
rm("$name/solver.log")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
add_handler(solver_logger, DefaultHandler("./$name/solver.log"), "solver")
|
||||||
|
|
||||||
t = @timed SDP_problem = create_SDP_problem(sdp_constraints, Δ; upper_bound=upper_bound)
|
t = @timed SDP_problem = create_SDP_problem(sdp_constraints, Δ; upper_bound=upper_bound)
|
||||||
info(logger, timed_msg(t))
|
info(logger, timed_msg(t))
|
||||||
|
|
||||||
|
@ -74,8 +74,6 @@ function solve_SDP(SDP_problem, solver)
|
|||||||
JuMP.setsolver(SDP_problem, solver);
|
JuMP.setsolver(SDP_problem, solver);
|
||||||
# @time MathProgBase.writeproblem(SDP_problem, "/tmp/SDP_problem")
|
# @time MathProgBase.writeproblem(SDP_problem, "/tmp/SDP_problem")
|
||||||
|
|
||||||
solver_logger = basic_config("info")
|
|
||||||
add_handler(solver_logger, DefaultHandler("./$name/solver.log"), "solver")
|
|
||||||
|
|
||||||
TT = STDOUT
|
TT = STDOUT
|
||||||
redirect_stdout(solver_logger.handlers["solver"].io)
|
redirect_stdout(solver_logger.handlers["solver"].io)
|
||||||
|
Loading…
Reference in New Issue
Block a user