# Error in solving simple SDP in Mosek+JuMP after updating related Julia packages (previously worked)

**URL:** <https://discourse.julialang.org/t/error-in-solving-simple-sdp-in-mosek-jump-after-updating-related-julia-packages-previously-worked/72308>\
**Category:** Optimization (Mathematical)\
**Tags:** jump\
**Created:** [November 30, 2021, 3:52pm UTC](https://discourse.julialang.org/t/error-in-solving-simple-sdp-in-mosek-jump-after-updating-related-julia-packages-previously-worked/72308 "2021-11-30T15:52:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shuvomoy\_Das\_Gupta](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shuvomoy_das_gupta/32/10069_2.png) [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)\
**Post date:** [November 30, 2021, 3:52pm UTC](https://discourse.julialang.org/t/error-in-solving-simple-sdp-in-mosek-jump-after-updating-related-julia-packages-previously-worked/72308/1 "2021-11-30T15:52:31Z")

</div>

Dear All,

I recently updated some of my Julia packages related to optimization as follows:

```julia
[4076af6c] ↑ JuMP v0.21.10 ⇒ v0.22.1
[b8f27783] ↑ MathOptInterface v0.9.22 ⇒ v0.10.6
[1ec41992] ↑ MosekTools v0.9.4 ⇒ v0.10.0
[4076af6c] ↑ JuMP v0.21.10 ⇒ v0.22.1
[b8f27783] ↑ MathOptInterface v0.9.22 ⇒ v0.10.6
[1ec41992] ↑ MosekTools v0.9.4 ⇒ v0.10.0

```

Now after updating, I am getting error solving a very simple SDP, which I was able to solve without any problem prior to my update. My mosek version is 9.3.10 (the latest). The SDP is as follows:

```julia
using JuMP, MosekTools, Mosek, LinearAlgebra

N = 3

model = Model(optimizer_with_attributes(Mosek.Optimizer))

# construct G ⪰ 0
@variable(model, G[1:N, 1:N], PSD)

@variable(model, F[1:N-1] >= 0)

A = [1 2 3; 4 5 6; 7 8 9]

b = [7;8]

@constraint(model, F'*b + tr(G) <= 0)

@objective(model, Min, sum(F) - tr(G))

optimize!(model)

p_star = objective_value(model)

G_star = value.(G)

F_star = value.(F)

```

The error I am getting is as follows:

```julia

MethodError: no method matching set_column_name(::Mosek.Task, ::MosekTools.MatrixIndex, ::String)
Closest candidates are:
  set_column_name(::Mosek.Task, !Matched::MosekTools.ColumnIndex, ::String) at C:\Users\shuvo\.julia\packages\MosekTools\Ryr4X\src\variable.jl:44
  set_column_name(!Matched::MosekTools.Optimizer, !Matched::MathOptInterface.VariableIndex, ::String) at C:\Users\shuvo\.julia\packages\MosekTools\Ryr4X\src\variable.jl:47
in eval at base\boot.jl:360 
in top-level scope at junk_7.jl:22
in optimize! at JuMP\2IF9U\src\optimizer_interface.jl:167
in optimize! at JuMP\2IF9U\src\optimizer_interface.jl:167 
in var"#optimize!#121" at JuMP\2IF9U\src\optimizer_interface.jl:195
in optimize! at MathOptInterface\eoIu0\src\Utilities\cachingoptimizer.jl:285
in optimize! at MathOptInterface\eoIu0\src\MathOptInterface.jl:80 
in copy_to at MathOptInterface\eoIu0\src\Bridges\bridge_optimizer.jl:421 
in #copy_to#7 at MathOptInterface\eoIu0\src\Bridges\bridge_optimizer.jl:421 
in default_copy_to at MathOptInterface\eoIu0\src\Utilities\copy.jl:438
in pass_attributes at MathOptInterface\eoIu0\src\Utilities\copy.jl:69
in _pass_attribute at MathOptInterface\eoIu0\src\Utilities\copy.jl:84
in set at MathOptInterface\eoIu0\src\Bridges\bridge_optimizer.jl:1327 
in set at MosekTools\Ryr4X\src\variable.jl:296 
in set_column_name at MosekTools\Ryr4X\src\variable.jl:48

```

I have no idea what is going on. The code ran without any problem before updating. Any tips/suggestions regarding how to avoid this issue will be much appreciated.

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [November 30, 2021, 7:03pm UTC](https://discourse.julialang.org/t/error-in-solving-simple-sdp-in-mosek-jump-after-updating-related-julia-packages-previously-worked/72308/2 "2021-11-30T19:03:00Z")

</div>

This looks like a bug in MosekTools.jl. Please open an issue.

---

<div class="post-metadata">

**Author:** ![Shuvomoy\_Das\_Gupta](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shuvomoy_das_gupta/32/10069_2.png) [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)\
**Post date:** [November 30, 2021, 7:03pm UTC](https://discourse.julialang.org/t/error-in-solving-simple-sdp-in-mosek-jump-after-updating-related-julia-packages-previously-worked/72308/3 "2021-11-30T19:03:50Z")

</div>

Yes, I have done that. Thank you @odow .

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [November 30, 2021, 7:14pm UTC](https://discourse.julialang.org/t/error-in-solving-simple-sdp-in-mosek-jump-after-updating-related-julia-packages-previously-worked/72308/4 "2021-11-30T19:14:30Z")

</div>

Link: [https://github.com/jump-dev/MosekTools.jl/issues/80](https://github.com/jump-dev/MosekTools.jl/issues/80)

I replied to your issue with a suggestion for what to do next.
