I am using Convex.jl in conjuction with Gurobi in a Jupyter notebook to solve a convex programming problem. Everything works but Gurobi is not displaying its log to the console in “realtime”, but it displays everything at once only at the end of the optimization. I tried to “force” the logging (even though it should be enabled by the default options), inizializing the optimizer with opt = MOI.OptimizerWithAttributes(() -> Gurobi.Optimizer(GUROBI_ENV), "DisplayInterval" => 1, "OutputFlag" => 1, "LogToConsole" => 1)
but it does not work.
Is there a way to do it?
PS: I tried also with Mosek and CPLEX and in those cases everything works smoothly.
I have also seen this behavior, specifically with Gurobi. I believe this occurs because Gurobi’s log is buffered before being displayed. I do not know how to control this, nor whether it’s possible to do so.
just to note that version of the example is for v0.16.0 of Convex.jl which is about to be released; the version for the latest existing release v0.15.4 is here (and in rendered form here).
So if anyone tries the example and gets an error about e.g. silent not being accepted by solve!, try that v0.15.4 version of the example instead, or ] add Convex#master to update to the not-yet-released v0.16 of Convex.jl.