How to set verbose=false for `Mosek` in `Convex.jl`

I’m using Convex.jl to solve convex optimisation problems.
In Convex.jl, I can use various solvers, but I cannot make the solver verbose=false only when using Mosek.

How can I do this?

Here’s an MWE:

using Convex
using Mosek
using MosekTools
const SOLVER = Mosek
m = 5; n = 4
x = Variable(n, 1)
A = randn(m, n); b = randn(m, 1)
prob = minimize(sumsquares(A * x - b), [x <= 0])
prob = solve!(prob, SOLVER.Optimizer(verbose=false))

P.S. Can I copy contents in REPL to attach a result here? For reference, I’m using vim and Julia REPL now.

Mosek uses LOG=0, i.e. instead of verbose=false, write LOG=0. Note that this is a solver-specific choice, not a choice Convex made, although we should expose a generic way to suppress output (edit: here’s an issue for that:

Thanks a lot!

1 Like

If you update to version 0.13.7 of Convex you can try the new keyword argument silent_solver for solve!, e.g.

solve!(prob, SOLVER.Optimizer(), silent_solver = true)