I have been trying to use Convex with Mosek, but it seems there are still some errors. I have been trying to solve the following examples problem:
using Convex, Mosek
m = 4; n = 5
A = randn(m, n); b = randn(m, 1)
x = Variable(n)
problem = minimize(sumsquares(A * x - b), [x >= 0])
ERROR: UndefVarError: MosekSolver not defined
I know this is an old issue. Want to check if there are any new developments.
The new version of Mosek.jl dropped support from the MathProgBase interface.
You have several choices here:
- Use MosekTools (the interface of Mosek to MathOptInterface) and the branch of Convex with experiemental support for MathOptInterface https://github.com/JuliaOpt/Convex.jl/pull/330
- Use an older version of Mosek.jl where MathProgBase was not dropped yet (note that this may mean that you use Mosek v8 instead of Mosek v9).
- Use JuMP v0.19 or v0.20 which uses MathOptInterface.
Yes, both those options should be working to use Mosek with Convex.jl— if something isn’t working with either please file an issue. (The MOI branch is indeed a work in progress, but it should only be missing warmstart support. But it definitely could have some bugs so keep that in mind and please let me know if you find any. It passes the tests at least ).
Thanks! I will take a look at them and see how things go.
Appreciate the fast response.