Opened 3 years ago
Closed 21 months ago
#20876 closed defect (fixed)
GLPK: glp_exact ignores verbosity level
Reported by: | mkoeppe | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-8.1 |
Component: | packages: standard | Keywords: | glpk |
Cc: | fbissey, jdemeyer, dimpase, vdelecroix | Merged in: | |
Authors: | Jeroen Demeyer | Reviewers: | Matthias Koeppe |
Report Upstream: | Fixed upstream, but not in a stable release. | Work issues: | |
Branch: | 4f4fa2c (Commits) | 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 3 years ago by
- Cc vdelecroix added
comment:2 Changed 3 years ago by
comment:3 Changed 2 years ago by
- Description modified (diff)
- Milestone changed from sage-7.3 to sage-8.0
comment:4 Changed 2 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 2 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 2 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 in reply to: ↑ 5 Changed 2 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 in reply to: ↑ 5 Changed 2 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 21 months ago by
- Description modified (diff)
- Report Upstream changed from N/A to Reported upstream. Developers acknowledge bug.
comment:10 Changed 21 months ago by
- Dependencies set to #23596
- Milestone changed from sage-8.0 to sage-8.1
comment:11 Changed 21 months ago by
- Branch set to u/jdemeyer/glpk__glp_exact_ignores_verbosity_level
comment:12 Changed 21 months ago by
- Commit set to cc13c4b9fd129cbceb97d937b91f5e51f12690e7
- Status changed from new to needs_review
comment:13 Changed 21 months ago by
- Description modified (diff)
comment:14 Changed 21 months ago by
- Report Upstream changed from Reported upstream. Developers acknowledge bug. to Fixed upstream, but not in a stable release.
comment:15 Changed 21 months ago by
- Reviewers set to Matthias Koeppe
- Status changed from needs_review to positive_review
comment:16 Changed 21 months ago by
- Commit changed from cc13c4b9fd129cbceb97d937b91f5e51f12690e7 to 4f4fa2c11f1d3fed1132f0972bef7262577a6bec
- Status changed from positive_review to needs_review
comment:17 Changed 21 months ago by
- Status changed from needs_review to positive_review
Rebased on new version of #23596.
comment:18 Changed 21 months ago by
- Branch changed from u/jdemeyer/glpk__glp_exact_ignores_verbosity_level to 4f4fa2c11f1d3fed1132f0972bef7262577a6bec
- Resolution set to fixed
- Status changed from positive_review to 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).