Skip to content

Fix SCIP warnings caused by parallel test execution - #1257

Open
adamj34 wants to merge 5 commits into
scipopt:masterfrom
adamj34:parallel-testing
Open

adamj34 wants to merge 5 commits into
scipopt:masterfrom
adamj34:parallel-testing

Conversation

@adamj34

@adamj34 adamj34 commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes SCIP warnings that appear when running the test suite with parallel execution (pytest -nauto).
Updates CHANGELOG.md.

Before:

When using pytest -nauto:
par-testing-nauto-before

It can be seen on the screenshot above that warnings originate from flp-subprob, which is defined inside testBenders in tests/test_customizedbenders.py. testBenders is later used by two tests.

However, the same warnings are not present when just using pytest:
par-testin-seq-before

Proposed fix

Manually free the subproblem instance of testBenders.

After:

After the fix, pytest -nauto no longer produces any warnings:
par-testing-nauto-after

@adamj34
adamj34 marked this pull request as ready for review September 16, 2026 20:40
@Joao-Dionisio

Copy link
Copy Markdown
Member

Hey @adamj34 , thank you! The end result is pretty useful, but it feels strange to ask a Python user to free a problem. This might be an issue on the SCIP side, I'll take a look later.

@adamj34

adamj34 commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Sure @Joao-Dionisio, take your time, I don't think it's very urgent.

It's pretty weird that these warnings only appear when the tests are executed in parallel but they are absent when the tests are executed sequentially, so I guess that the real issue lies somewhere else than the tests themselves.

@Joao-Dionisio

Copy link
Copy Markdown
Member

Hey @adamj34 sorry for the delay. Instead of manually freeing, can you please try adding

if SCIPgetStage(self._scip) == SCIP_STAGE_SOLVING and SCIPinProbing(self._scip):
                PY_SCIP_CALL(SCIPendProbing(self._scip))

before the SCIPfree() call in Model._free_scip_instance and checking if it works?

@adamj34

adamj34 commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

Hi @Joao-Dionisio. I added the code snippet you suggested and the end result is the same, i.e., there are no warnings 👍

Comment thread CHANGELOG.md Outdated

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

2 participants