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

writing several .sol/.lp/.log to file within loop leads to -> ERROR: cannot create file .... Too many open files #542

Open
JPelda opened this issue Nov 14, 2021 · 3 comments
Assignees
Labels

Comments

@JPelda
Copy link

JPelda commented Nov 14, 2021

File "src\pyscipopt\scip.pyx", line 1387, in pyscipopt.scip.Model.writeProblem
File "src\pyscipopt\scip.pyx", line 239, in pyscipopt.scip.PY_SCIP_CALL
OSError: SCIP: cannot create file!

I found in a forum that I would have to change the allowed maximum of simulatiously opened files. However, it might be better to close opened files after writing to them anyway. The error happens after writing 83 .sol files but my simulation is going to produce 8759 of those solution files. Any idea to get this working?

I appreciate any help! And thank you very much for your work on pyscipopt!

Best
Johannes

@JPelda
Copy link
Author

JPelda commented Nov 17, 2021

With new version pyscipopt 3.4 it seems to work although the windows explorer stops working. Closing file descriptor is a good choice!

@CGraczyk
Copy link
Collaborator

line 70, in <module>
    scip.writeStatistics()
  File "src/pyscipopt/scip.pyx", line 4612, in pyscipopt.scip.Model.writeStatistics
OSError: [Errno 9] Bad file descriptor

model.writeStatistics() is failing - seems to be introduced by #543, ideas @mattmilten ?

@mattmilten
Copy link
Collaborator

I honestly don't know how to resolve that issue. On the one hand, we cannot close the file explicitly (see #570), still there are apparently some dangling file descriptors flying around.

@mmghannam mmghannam added the bug label Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants