# Mosek, different behavior after upgrade

**URL:** <https://discourse.julialang.org/t/mosek-different-behavior-after-upgrade/4613>\
**Category:** Optimization (Mathematical)\
**Tags:** question, jump\
**Created:** [July 3, 2017, 9:43am UTC](https://discourse.julialang.org/t/mosek-different-behavior-after-upgrade/4613 "2017-07-03T09:43:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mauro](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@mauro](https://discourse.julialang.org/u/mauro)\
**Post date:** [July 3, 2017, 9:43am UTC](https://discourse.julialang.org/t/mosek-different-behavior-after-upgrade/4613/1 "2017-07-03T09:43:45Z")

</div>

Hello everyone,

I upgraded today from Julia 0.5.1 to 0.6.  
Doing so I ended up with the following behavior of Mosek (v.0.7.0) and JuMP (v.0.17.1): the example is

```julia
using JuMP, Mosek

m = Model(solver=MosekSolver())
@variable(m, x[1:3]>=0)

@constraint(m, x[1]^2+x[2]^2<=x[3]^2)

@objective(m, Min, x[1]+x[2]+x[3])
solve(m)

```

and the result

```julia

Problem
  Name :                 
  Objective sense : min             
  Type : QCQO (quadratically constrained optimization problem)
  Constraints : 1               
  Cones : 0               
  Scalar variables : 3               
  Matrix variables : 0               
  Integer variables : 0               

Optimizer started.
Quadratic to conic reformulation started.
MOSEK error 1293: Constraint ''(0) is not convex. Q should be positive semidefinite in a constraint with finite upper bound.
Quadratic to conic reformulation terminated. Time: 0.00    
Optimizer terminated. Time: 0.00    
WARNING: Not solved to optimality, status: Error
:Error

```

To avoid this error I can reformulate the constraint as

> @constraint(m, norm(x[1:2])\<=x[3])

and doing so the problem is immediately recognized as a conic optimization problem.

The same example works fine with both versions of the constraint in my previous Julia 0.5.1, using Mosek (v.0.6.1) and JuMP (v.0.16.2): in that case the first version of the problem is recognized as a conic optimization problem (not as a QCQO), and so no “Quadratic to conic reformulation” takes place.

Is this new behavior due to some errors in the way I upgraded or do you experience the same? In the second case, is this behavior fine?

Thanks,  
Mauro

---

<div class="post-metadata">

**Author:** ![miles.lubin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/miles.lubin/32/279_2.png) [@miles.lubin](https://discourse.julialang.org/u/miles.lubin)\
**Post date:** [July 3, 2017, 1:33pm UTC](https://discourse.julialang.org/t/mosek-different-behavior-after-upgrade/4613/2 "2017-07-03T13:33:00Z")

</div>

This is a breaking change in JuMP 0.17. Previously, JuMP would inconsistently translate some quadratic constraints into conic constraints. JuMP no longer does any such translation; the problem is passed to the solver in the form that you wrote it. Some solvers like CPLEX and Gurobi choose to recognize specially formatted quadratic constraints as conic, while Mosek does not.

---

<div class="post-metadata">

**Author:** ![mauro](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@mauro](https://discourse.julialang.org/u/mauro)\
**Post date:** [July 3, 2017, 8:59pm UTC](https://discourse.julialang.org/t/mosek-different-behavior-after-upgrade/4613/3 "2017-07-03T20:59:40Z")

</div>

Ok, it makes sense. Thank you for the quick response!
