Pyomo / pyomo

An object-oriented algebraic modeling language in Python for structured optimization problems.
https://www.pyomo.org
Other
2.01k stars 518 forks source link

Warmstart broken for MOSEK>=10 #2613

Closed jsiirola closed 1 year ago

jsiirola commented 1 year ago

Summary

It appears that warmstart is partially broken on MOSEK 10. The example below was pulled from pyomo/solvers/tests/models/MIQP_simple.py. While it worked in MOSEK 8 / 9, it is failing in MOSEK 10.

As the assertion is on the C side, this error is untrappable and kills the entire Python interpreter.

@Utkarsh-Detha, can you provide more insight on what may be happening?

Steps to reproduce the issue

from pyomo.environ import *

model = ConcreteModel()

model.a = Param(initialize=1.0)
model.x = Var(within=NonNegativeReals, initialize=1)
model.y = Var(within=Binary, initialize=1)

model.obj = Objective(expr=model.x**2 + 3.0*model.y**2)
model.c1 = Constraint(expr=model.a <= model.y)
model.c2 = Constraint(expr=(2.0, model.x/model.a - model.y, 10))

solver = SolverFactory('mosek_direct').solve(
    model, warmstart=True, load_solutions=False)

Error Message

MOSEK fatal error stoptask
Version : 10.0.28
File    : src/mosek/mosekqo.c
Line    : 5104
Msg     : Assertion failed
MOSEK fatal error stopenv
Version : 10.0.28
Platform: Linux/64-X86
File    : src/mosek/mosekqo.c
Line    : 5104
Msg     : Assertion failed
Segmentation fault (core dumped)

Information on your system

Pyomo version: 6.4.3.dev0 Python version: 3.7 Operating system: Linux How Pyomo was installed (PyPI, conda, source): source Solver (if applicable): MOSEK 10.0.27 and 10.0.28

Utkarsh-Detha commented 1 year ago

I am looking into this and will get back as soon as I have an answer/fix. Thank you for bringing this up.

Utkarsh-Detha commented 1 year ago

@jsiirola the newest release (the second point in the release notes) addresses this issue. The recent pull-request does not fix this issue (as it was not caused by the interface), but does address something related to warm-start that I noticed while looking at it in the past few days.