# Calling Mosek on Convex.jl

**URL:** <https://discourse.julialang.org/t/calling-mosek-on-convex-jl/34378>\
**Category:** Optimization (Mathematical)\
**Tags:** question\
**Created:** [February 9, 2020, 3:56pm UTC](https://discourse.julialang.org/t/calling-mosek-on-convex-jl/34378 "2020-02-09T15:56:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![martincornejo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/martincornejo/32/13436_2.png) [@martincornejo](https://discourse.julialang.org/u/martincornejo)\
**Post date:** [February 9, 2020, 3:56pm UTC](https://discourse.julialang.org/t/calling-mosek-on-convex-jl/34378/1 "2020-02-09T15:56:27Z")

</div>

I get the following error when trying to solve an SDP problem with Mosek

```julia
using Convex, Mosek

... (problem formulation)

solve!(problem, MosekSolver())

```

**ERROR: UndefVarError: MosekSolver not defined**

---

<div class="post-metadata">

**Author:** ![ericphanson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ericphanson/32/215186_2.png) [@ericphanson](https://discourse.julialang.org/u/ericphanson)\
**Post date:** [February 9, 2020, 4:05pm UTC](https://discourse.julialang.org/t/calling-mosek-on-convex-jl/34378/2 "2020-02-09T16:05:53Z")

</div>

Mosek.jl no longer supports MathProgBase, which is used by the release version of Convex.jl. So one either needs to use an older branch of Mosek.jl, or use MosekTools and the master branch of Convex.jl. The next release of Convex.jl (i.e. v0.13) should just work with MosekTools.

---

<div class="post-metadata">

**Author:** ![martincornejo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/martincornejo/32/13436_2.png) [@martincornejo](https://discourse.julialang.org/u/martincornejo)\
**Post date:** [February 9, 2020, 4:08pm UTC](https://discourse.julialang.org/t/calling-mosek-on-convex-jl/34378/3 "2020-02-09T16:08:01Z")

</div>

I also tried with `using MosekTools` and I’m using the Convex.jl master branch, still the same problem

---

<div class="post-metadata">

**Author:** ![ericphanson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ericphanson/32/215186_2.png) [@ericphanson](https://discourse.julialang.org/u/ericphanson)\
**Post date:** [February 9, 2020, 4:09pm UTC](https://discourse.julialang.org/t/calling-mosek-on-convex-jl/34378/4 "2020-02-09T16:09:09Z")

</div>

On master, the syntax should be

```julia
using Convex, MosekTools
problem = ...
solve!(problem, Mosek.Optimizer())

```
