1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-11-13 22:05:27 +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);
# @time MathProgBase.writeproblem(SDP_problem, "/tmp/SDP_problem")
TT = STDOUT
redirect_stdout(solver_logger.handlers["solver"].io)
solution_status = JuMP.solve(SDP_problem);
remove_handler(solver_logger, "solver")
redirect_stdout(TT)
if solution_status != :Optimal
warn("The solver did not solve the problem successfully!")