PySCIPOpt icon indicating copy to clipboard operation
PySCIPOpt copied to clipboard

Segfault when using reoptimization and concurrent solving

Open waweber opened this issue 6 months ago • 2 comments

Describe the bug A segfault occurs during reoptimization when using concurrent solving.

To Reproduce Run this program:

from pyscipopt import Model

model = Model()
x = model.addVar(lb=0.0, ub=10.0)
y = model.addVar(lb=0.0, ub=10.0)
z = x + y
model.addCons(y >= 2*x)
model.setObjective(z, "maximize")

model.enableReoptimization()
model.solveConcurrent()

print(f"x = {model.getVal(x)}")
print(f"y = {model.getVal(y)}")
print(f"z = {model.getVal(z)}")

model.freeReoptSolve()

model.addCons(x <= 3)
model.solveConcurrent()

print(f"x = {model.getVal(x)}")
print(f"y = {model.getVal(y)}")
print(f"z = {model.getVal(z)}")

The issue occurs with any combination of solving methods that uses solveConcurrent()

Expected behavior The program runs the same way as when normal model.optimize() is called.

System

  • Fedora Linux 40
  • SCIP from master branch
  • PySCIPOpt compiled from master branch

Additional context Not 100% sure if this is from PySCIPOpt or a bug in SCIP itself

waweber avatar Aug 26 '24 22:08 waweber