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

Kernel restarts without showing reason when calling solveConcurrent() on jupyter while SCIP is compiled with TPI=tny #885

Closed
adover134 opened this issue Sep 3, 2024 · 11 comments

Comments

@adover134
Copy link

Describe the bug
Calling solveConcurrent() killed kernel without any error code.

To Reproduce
Run a model with solveConcurrent() with SCIP compiled with TPI=tny using jupyter notebook.

The example model I tried is this:

from pyscipopt import Model
import pandas as pd
import numpy as np

m = Model()

A = m.addVar(vtype='B')
B = m.addVar(vtype='B')
C = m.addVar(vtype='B')
m.addCons(A >= B+C-1)
m.addCons(B >= 1)
m.addCons(C >= 1)

m.setObjective(3)
m.solveConcurrent()

Expected behavior
The solver should run without error. Also, A should be 1 in the solution.

System

  • OS: [e.g. iOS] Ubuntu
  • Version [e.g. 22] 20.04.6 LTS
  • SCIP version 9.1.0
  • How did you install pyscipopt? I installed by git clone the master branch.

Additional context
When tried make test, SCIP showed error on some of tests.

@Joao-Dionisio
Copy link
Collaborator

Hey @adover134! Does Mark's answer in #883 solve your problem?

@adover134
Copy link
Author

adover134 commented Sep 3, 2024

Hello @Joao-Dionisio. As I mentioned in my question, I installed with master branch. This was what Mark's answer suggested.

@Joao-Dionisio
Copy link
Collaborator

Mark suggested installing the master branch of SCIP, not PySCIPOpt

@adover134
Copy link
Author

adover134 commented Sep 3, 2024

I installed the recent tarball of scipoptsuite from https://scipopt.org/#download, is it different with main branch of SCIP?

Edit: I checked the github. It seems tarball is not up-to-date, since master branch was updated only two days ago. I should try it next time.

@adover134
Copy link
Author

adover134 commented Sep 4, 2024

I thought I overwrote the folder, but seems not. I will try once again after remove the original folder and replace with the cloned master branch.

@adover134
Copy link
Author

Thanks, @Joao-Dionisio. I confused cp and mv in linux shell. Now it works.

@adover134 adover134 reopened this Sep 4, 2024
@adover134
Copy link
Author

adover134 commented Sep 4, 2024

I thought this was solved since it could solve very basic one. However, when I tried a big model which has around 15k constraints, I could not get output on console. Also, I tried to use optimize() this time, but also not showing any output. There must be a kind of output problem on compiling with TPI=tny.
Also, when solver seemed to be stopped, it took not much time but timed out with jupyter notebook kernel.

@Joao-Dionisio
Copy link
Collaborator

Hey @adover134! Glad you could solve your original problem. Can you please create a new issue with your new problem? ANd also, can you share what you're trying to run? That way I can run it locally and see if I can figure out anything. Depending on the problem, 15k constraints might be huge, and a reason for the output not showing.

@adover134
Copy link
Author

I can open new issue, but cannot upload the model since it is directly related to my research. Also, I can say that when I compiled with scipsuite tarball, it showed output even with almost 20k constraints.

@Opt-Mucca
Copy link
Collaborator

@adover134 Sorry for not answering this quickly. Happy to know that the problem is actually fixed in SCIP master!
My gut feeling for your current issue with not seeing output is that SCIP is just taking a while when solving your problem. You can increase the amount of information that you would say the commands:
model.setParam("display/verblevel", 5)
If you're not getting output after the root node then SCIP is likely taking ages to process each node, and the command:
model.setParam("display/freq", 10)
This will output info at every 10 nodes instead of 100 (default).
Aside from all this info: If you're getting output from the SCIP tarball and none when using PySCIPOpt then this is most probably an issue and you should definitely open an issue.

Thanks for handling this @Joao-Dionisio !

@adover134
Copy link
Author

If you are okay, then please wait some minutes while I open current problem as new issue. Thank you.

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

3 participants