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

GLPK: glp_exact ignores verbosity level #20876

Closed
mkoeppe opened this issue Jun 24, 2016 · 21 comments
Closed

GLPK: glp_exact ignores verbosity level #20876

mkoeppe opened this issue Jun 24, 2016 · 21 comments

Comments

@mkoeppe
Copy link
Member

mkoeppe commented Jun 24, 2016

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:

  1. http://lists.gnu.org/archive/html/help-glpk/2011-10/msg00037.html

  2. http://lists.gnu.org/archive/html/bug-glpk/2017-08/msg00013.html

Depends on #23596

Upstream: Fixed upstream, but not in a stable release.

CC: @kiwifb @jdemeyer @dimpase @videlec

Component: packages: standard

Keywords: glpk

Author: Jeroen Demeyer

Branch/Commit: 4f4fa2c

Reviewer: Matthias Koeppe

Issue created by migration from https://trac.sagemath.org/ticket/20876

@mkoeppe mkoeppe added this to the sage-7.3 milestone Jun 24, 2016
@kiwifb
Copy link
Member

kiwifb commented Jun 27, 2016

comment:2

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).

@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe modified the milestones: sage-7.3, sage-8.0 May 12, 2017
@dcoudert
Copy link
Contributor

comment:4

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

@kiwifb
Copy link
Member

kiwifb commented May 12, 2017

comment:5

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.

@dcoudert
Copy link
Contributor

comment:6

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)).

@mkoeppe
Copy link
Member Author

mkoeppe commented May 14, 2017

comment:7

Replying to @kiwifb:

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.

@jdemeyer
Copy link

comment:8

Replying to @kiwifb:

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.

@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link

Upstream: Reported upstream. Developers acknowledge bug.

@jdemeyer
Copy link

Dependencies: #23596

@jdemeyer
Copy link

Author: Jeroen Demeyer

@jdemeyer jdemeyer modified the milestones: sage-8.0, sage-8.1 Aug 31, 2017
@jdemeyer
Copy link

@jdemeyer
Copy link

Commit: cc13c4b

@jdemeyer
Copy link

New commits:

23102feversion bump. Slight improvement on skg-src. Fix broken doctest.
a72d1afMerge branch 'develop' into glpk4.63
30c496fRemove old libraries before installing. This potential enable downrade in the future.
cc13c4bUse verbosity level in glp_exact

@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link

jdemeyer commented Sep 2, 2017

Changed upstream from Reported upstream. Developers acknowledge bug. to Fixed upstream, but not in a stable release.

@mkoeppe
Copy link
Member Author

mkoeppe commented Sep 2, 2017

Reviewer: Matthias Koeppe

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 7, 2017

Changed commit from cc13c4b to 4f4fa2c

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 7, 2017

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. This was a forced push. New commits:

fecaf01version bump. Slight improvement on skg-src. Fix broken doctest.
baacd6cRemove old libraries before installing
4f4fa2cUse verbosity level in glp_exact

@jdemeyer
Copy link

jdemeyer commented Sep 7, 2017

comment:17

Rebased on new version of #23596.

@vbraun
Copy link
Member

vbraun commented Sep 10, 2017

Changed branch from u/jdemeyer/glpk__glp_exact_ignores_verbosity_level to 4f4fa2c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants