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

Do not test the version of glpk #22443

Closed
infinity0 mannequin opened this issue Feb 25, 2017 · 18 comments
Closed

Do not test the version of glpk #22443

infinity0 mannequin opened this issue Feb 25, 2017 · 18 comments

Comments

@infinity0
Copy link
Mannequin

infinity0 mannequin commented Feb 25, 2017

The test should not fail just because the version is different.

CC: @tobihan

Component: interfaces

Keywords: days84

Author: Tobias Hansen

Branch/Commit: c257367

Reviewer: Vincent Delecroix

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

@infinity0 infinity0 mannequin added this to the sage-7.6 milestone Feb 25, 2017
@infinity0 infinity0 mannequin added the p: major / 3 label Feb 25, 2017
@infinity0
Copy link
Mannequin Author

infinity0 mannequin commented Feb 25, 2017

@infinity0
Copy link
Mannequin Author

infinity0 mannequin commented Feb 25, 2017

Author: Tobias Hansen

@infinity0

This comment has been minimized.

@infinity0
Copy link
Mannequin Author

infinity0 mannequin commented Feb 25, 2017

New commits:

39bfdb7Do not test the version of glpk

@infinity0
Copy link
Mannequin Author

infinity0 mannequin commented Feb 25, 2017

Commit: 39bfdb7

@infinity0 infinity0 mannequin added c: interfaces labels Feb 25, 2017
@videlec
Copy link
Contributor

videlec commented Feb 25, 2017

Reviewer: Vincent Delecroix

@vbraun
Copy link
Member

vbraun commented Feb 27, 2017

comment:4
sage -t --long src/sage/numerical/mip.pyx
**********************************************************************
File "src/sage/numerical/mip.pyx", line 2521, in sage.numerical.mip.MixedIntegerLinearProgram.number_of_variables.get_backend
Failed example:
    p.solve()  # rel tol 1e-5
Expected:
    GLPK Simplex Optimizer, v...
    2 rows, 2 columns, 4 non-zeros
    *     0: obj =   7.000000000e+00 inf =   0.000e+00 (2)
    *     2: obj =   9.400000000e+00 inf =   0.000e+00 (0)
    OPTIMAL LP SOLUTION FOUND
    9.4
Got:
    GLPK Simplex Optimizer, v4.60
    2 rows, 2 columns, 4 non-zeros
    *     0: obj =   7.000000000e+00 inf =   0.000e+00 (2)
    *     2: obj =   9.400000000e+00 inf =   0.000e+00 (0)
    OPTIMAL LP SOLUTION FOUND
    9.399999999999999
**********************************************************************
1 item had failures:
   1 of  10 in sage.numerical.mip.MixedIntegerLinearProgram.number_of_variables.get_backend
    [599 tests, 1 failure, 4.98 s]

@videlec
Copy link
Contributor

videlec commented Feb 27, 2017

comment:6

Indeed, the # rel tol 1e-5 blocks the correct interpretation of ellipsis! There is something broken in the Sage doctest framework.

@videlec
Copy link
Contributor

videlec commented Feb 27, 2017

comment:7

However, the tolerance allows changing v4.60 to v4.59999999 ;-)

@tscrim
Copy link
Collaborator

tscrim commented Feb 27, 2017

comment:8

I don't think this has ever come up before (nor do I think it really will again). I would just work around this by storing the answer and manually comparing it with maybe (a big maybe) leaving a comment for anyone who is wondering about this later.

@vbraun
Copy link
Member

vbraun commented Feb 27, 2017

comment:9

It can't really work when comparing with tolerance, you'd need to know how many floating point numbers are inside the ellipsis to match up want/have values.

@videlec
Copy link
Contributor

videlec commented Feb 27, 2017

comment:10

I am pushing a fix in a minute.

@videlec
Copy link
Contributor

videlec commented Feb 27, 2017

Changed commit from 39bfdb7 to c257367

@videlec
Copy link
Contributor

videlec commented Feb 27, 2017

New commits:

c25736722443: do not make GLPK version appears in doctest

@videlec
Copy link
Contributor

videlec commented Feb 27, 2017

Changed keywords from none to days84

@videlec
Copy link
Contributor

videlec commented Feb 27, 2017

@kiwifb
Copy link
Member

kiwifb commented Mar 11, 2017

comment:13

Replying to @tscrim:

I don't think this has ever come up before (nor do I think it really will again). I would just work around this by storing the answer and manually comparing it with maybe (a big maybe) leaving a comment for anyone who is wondering about this later.

Actually a few years back Christopher, my partner in crime for sage-on-gentoo, tried to fix this. Hopefully the current solution is imaginative enough as I have moved from 4.60 to 4.61 in sage-on-gentoo and I have the failing tests - again.

@vbraun
Copy link
Member

vbraun commented Mar 11, 2017

Changed branch from u/vdelecroix/22443 to c257367

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

4 participants