Direct and persistent interfaces to Xpress#1443
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1443 +/- ##
==========================================
+ Coverage 72.39% 72.94% +0.55%
==========================================
Files 612 619 +7
Lines 86031 90450 +4419
==========================================
+ Hits 62279 65978 +3699
- Misses 23752 24472 +720
Continue to review full report at Codecov.
|
|
I opened #1444 to track adding Xpress to our testing infrastructure |
|
@bknueven Xpress has been added to our GitHub Actions and Travis tests |
|
It looks like xpress 8.9 is causing the python 3.6 and 3.7 tests to segfault. |
|
I spent some time attempting to correct the segfault issue on Python 3.6/3.7. I'm able to reproduce it on my system on Python 3.7. I was ultimately unsuccessful -- though I narrowed it down to a test in pyomo-model-libraries and the xpress_persistent test, the behavior was non-deterministic on my system. I also attempted to re-factor the Xpress direct/persistent interfaces to use as few Xpress python objects as possible, to no avail. Given that the issue only comes up on exit, and the tests still pass, would an acceptable solution be to remove the xpress installation from python 3.6/3.7? I was hoping the new release of Xpress (8.9.2) would resolve this issue, but that's clearly not the case. |
qtothec
left a comment
There was a problem hiding this comment.
Couple typos and a broader question
| # TODO: this isn't a limit of XPRESS, which implements an SLP | ||
| # method for NLPs. But it is a limit of *this* interface | ||
| self._max_obj_degree = 2 | ||
| self._max_constraint_degree = 2 |
There was a problem hiding this comment.
Would you suggest creation of a new interface, or modification of this one to support SLP?
There was a problem hiding this comment.
I think this one could be modified to support SLP. Xpress has support in its Python expression system for trigonometric functions, exponents and logarithms, and general polynomials.
In addition modifying the method which get information from generate_standard_repn, probably some of the solution fetching logic would need to be revisited as well.
That said, this implementation is largely based on its Gurobi and CPLEX counterparts, which don't have such functionality. I would definitely need help to make it work.
|
@bknueven: which test is the most likely to cause a segfault? I can try and take a look at it and see if I can reproduce it here... |
|
@jsiirola here's the subset of tests that reliably reproduce it on my system: Separately they do fine. I'm running macOS with python 3.7.7. |
|
Hmmm. So far I have not been able to reproduce locally with Python 3.7.5 on RHEL6 / RHEL7 and xpress 8.9.0. I will try building Python 3.7.7 and see if that makes a difference. |
DLWoodruff
left a comment
There was a problem hiding this comment.
The code has previously been reviewed and now the tests are passing, so I recommend merging.
Fixes N/A
Summary/Motivation:
Xpress is a commonly used commercial MIP solver. This change adds direct and persistent interfaces to Xpress, leveraging Xpress's python interface. Both are largely based on their Gurobi counterparts. Note that FICO distributes Xpress with a community license (5000 variable/constraint limit) on PyPI.
Changes proposed in this PR:
Limitations:
Legal Acknowledgement
By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution: