From dbca3945a83367d8df4868553517fa59ad2c43a0 Mon Sep 17 00:00:00 2001 From: kalmarek Date: Tue, 19 Sep 2017 17:37:35 +0200 Subject: [PATCH] call flush_cstdio() AFTER redirect_stdout to fix SCS log buffering issue --- src/SDPs.jl | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/SDPs.jl b/src/SDPs.jl index ab1cffb..b2a9fa5 100644 --- a/src/SDPs.jl +++ b/src/SDPs.jl @@ -58,11 +58,8 @@ end function solve_SDP(SDP_problem) info(logger, Base.repr(SDP_problem)) - # to change buffering mode of stdout to _IOLBF (line bufferin) - # see https://github.com/JuliaLang/julia/issues/8765 - ccall((:printf, "libc"), Int, (Ptr{UInt8},), "\n"); - o = redirect_stdout(solver_logger.handlers["solver_log"].io) + Base.Libc.flush_cstdio() t = @timed solution_status = JuMP.solve(SDP_problem) info(logger, timed_msg(t))