Skip to content

Segfault when using reoptimization and concurrent solving #884

@waweber

Description

@waweber

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions