Opened 6 years ago
Closed 5 years ago
#20876 closed defect (fixed)
GLPK: glp_exact ignores verbosity level
Reported by: | Matthias Köppe | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-8.1 |
Component: | packages: standard | Keywords: | glpk |
Cc: | François Bissey, Jeroen Demeyer, Dima Pasechnik, Vincent Delecroix | Merged in: | |
Authors: | Jeroen Demeyer | Reviewers: | Matthias Koeppe |
Report Upstream: | Fixed upstream, but not in a stable release. | Work issues: | |
Branch: | 4f4fa2c (Commits, GitHub, GitLab) | Commit: | 4f4fa2c11f1d3fed1132f0972bef7262577a6bec |
Dependencies: | #23596 | Stopgaps: |
Description (last modified by )
The GLPK exact solver ignores msg_lev
and prints a lot of things on the screen while solving (see tests in #20424).
sage: p = MixedIntegerLinearProgram(solver="GLPK/exact") sage: p.get_backend().set_verbosity(0) sage: TestSuite(p.get_backend()).run(skip="_test_pickling") glp_exact: 5 rows, 1 columns, 4 non-zeros GNU MP bignum library is being used ...
Reported upstream:
Change History (18)
comment:1 Changed 6 years ago by
Cc: | Vincent Delecroix added |
---|
comment:2 Changed 6 years ago by
comment:3 Changed 6 years ago by
Description: | modified (diff) |
---|---|
Milestone: | sage-7.3 → sage-8.0 |
comment:4 Changed 6 years ago by
another example.
sage: p = MixedIntegerLinearProgram(solver="GLPK/exact") sage: b = p.new_variable(nonnegative=True) sage: p.add_constraint(b[0]+b[1] == 1) sage: p.solve(log=0) glp_exact: 1 rows, 2 columns, 2 non-zeros GNU MP bignum library is being used 0: infsum = 1 (0) 1: infsum = 0 (0) * 1: objval = 0 (0) * 1: objval = 0 (0) OPTIMAL SOLUTION FOUND 0.0
However, it's not the only issue with this solver:
sage: for solver in ['Cplex', 'Gurobi', 'Coin', 'PPL', 'GLPK']: ....: p = MixedIntegerLinearProgram(solver=solver) ....: _ = p.solve() ....: sage: p = MixedIntegerLinearProgram(solver="GLPK/exact") sage: p.solve() glp_exact: problem has no rows/columns --------------------------------------------------------------------------- MIPSolverException Traceback (most recent call last) ... MIPSolverException: GLPK: Solver failure
We also have this with another solver...
sage: p = MixedIntegerLinearProgram(solver="CVXOPT") sage: p.solve() --------------------------------------------------------------------------- TypeError Traceback (most recent call last) ... TypeError: 'c' must be a dense column matrix
comment:5 follow-ups: 7 8 Changed 6 years ago by
Re-reading the summary, is this a deliberate behavior from upstream? If not, ignoring the verbosity level sounds like an upstream bug. In that case I have no problem with going forward with a fix.
comment:6 Changed 6 years ago by
I had a look at the code of the backends, but I'm not confident with inheritance. The backend of GLPK/exact
inherits from the backend of GLPK
and has no specific method modifying the verbosity level. So I don't understand what's going on. However, the doc of the backend suggests that the default behavior is verbose (see after cdef class GLPKExactBackend(GLPKBackend)
).
comment:7 Changed 6 years ago by
Replying to fbissey:
Re-reading the summary, is this a deliberate behavior from upstream? If not, ignoring the verbosity level sounds like an upstream bug. In that case I have no problem with going forward with a fix.
I think it is an upstream bug that should be fixed.
Replying to dcoudert: The problem is not in our sage code.
comment:8 Changed 6 years ago by
Replying to fbissey:
Re-reading the summary, is this a deliberate behavior from upstream? If not, ignoring the verbosity level sounds like an upstream bug. In that case I have no problem with going forward with a fix.
+1 to adding a patch in Sage and submitting that patch upstream.
comment:9 Changed 5 years ago by
Description: | modified (diff) |
---|---|
Report Upstream: | N/A → Reported upstream. Developers acknowledge bug. |
comment:10 Changed 5 years ago by
Authors: | → Jeroen Demeyer |
---|---|
Dependencies: | → #23596 |
Milestone: | sage-8.0 → sage-8.1 |
comment:11 Changed 5 years ago by
Branch: | → u/jdemeyer/glpk__glp_exact_ignores_verbosity_level |
---|
comment:12 Changed 5 years ago by
Commit: | → cc13c4b9fd129cbceb97d937b91f5e51f12690e7 |
---|---|
Status: | new → needs_review |
comment:13 Changed 5 years ago by
Description: | modified (diff) |
---|
comment:14 Changed 5 years ago by
Report Upstream: | Reported upstream. Developers acknowledge bug. → Fixed upstream, but not in a stable release. |
---|
comment:15 Changed 5 years ago by
Reviewers: | → Matthias Koeppe |
---|---|
Status: | needs_review → positive_review |
comment:16 Changed 5 years ago by
Commit: | cc13c4b9fd129cbceb97d937b91f5e51f12690e7 → 4f4fa2c11f1d3fed1132f0972bef7262577a6bec |
---|---|
Status: | positive_review → needs_review |
comment:17 Changed 5 years ago by
Status: | needs_review → positive_review |
---|
Rebased on new version of #23596.
comment:18 Changed 5 years ago by
Branch: | u/jdemeyer/glpk__glp_exact_ignores_verbosity_level → 4f4fa2c11f1d3fed1132f0972bef7262577a6bec |
---|---|
Resolution: | → fixed |
Status: | positive_review → closed |
I am ok with patching but I prefer stuff that is also submitted upstream so we have hope that the functionality will eventually be there (cross fingers).