Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault when using reoptimization and concurrent solving #884

Open
waweber opened this issue Aug 26, 2024 · 2 comments
Open

Segfault when using reoptimization and concurrent solving #884

waweber opened this issue Aug 26, 2024 · 2 comments

Comments

@waweber
Copy link

waweber commented Aug 26, 2024

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

@Joao-Dionisio
Copy link
Collaborator

Hey @waweber! Apologies for the delay, August-time is always difficult.

Are there any updates on this? You can use solveConcurrent normally if you don't reoptimize, right?

@waweber
Copy link
Author

waweber commented Sep 6, 2024

Correct, I can use solveConcurrent without reoptimization, or reoptimize without solveConcurrent, but not both.

Notably, if I use solveConcurrent on the initial optimization, then use the single threaded optimize when reoptimizing, it also segfaults.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants