1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-12-25 18:25:30 +01:00

a trick to redirect SCS output to a file

This commit is contained in:
kalmar 2017-03-15 17:51:51 +01:00
parent 02a89908db
commit 646a34866b

View File

@ -73,7 +73,12 @@ 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")
TT = STDOUT
redirect_stdout(solver_logger.handlers["solver"].io)
solution_status = JuMP.solve(SDP_problem); solution_status = JuMP.solve(SDP_problem);
remove_handler(solver_logger, "solver")
redirect_stdout(TT)
if solution_status != :Optimal if solution_status != :Optimal
warn("The solver did not solve the problem successfully!") warn("The solver did not solve the problem successfully!")