Opened 6 years ago

Last modified 3 years ago

#21449 closed defect

CoinBackend: _test_solve fails on 32-bit — at Version 11

Reported by: Jeroen Demeyer Owned by:
Priority: blocker Milestone: sage-7.4
Component: doctest coverage Keywords: sdl
Cc: Matthias Köppe Merged in:
Authors: Jeroen Demeyer Reviewers: Thierry Monteil
Report Upstream: N/A Work issues:
Branch: u/jdemeyer/coinbackend___test_solve_fails_on_32_bit (Commits, GitHub, GitLab) Commit: 33ad25e5f987021eff7eb501e9e8416b89d9eca8
Dependencies: Stopgaps:

Status badges

Description (last modified by Matthias Köppe)

On Linux arando 3.13.0-95-generic #142-Ubuntu SMP Fri Aug 12 17:05:16 UTC 2016 i686 i686 i686 GNU/Linux:

**********************************************************************
File "src/sage/numerical/backends/coin_backend.pyx", line 39, in sage.numerical.backends.coin_backend.CoinBackend
Failed example:
    TestSuite(p).run(skip="_test_pickling")               # optional - cbc
Expected nothing
Got:
    Failure in _test_solve:
    Traceback (most recent call last):
      File "/home/jdemeyer/sage-git/local/lib/python2.7/site-packages/sage/misc/sage_unittest.py", line 283, in run
        test_method(tester = tester)
      File "sage/numerical/backends/generic_backend.pyx", line 697, in sage.numerical.backends.generic_backend.GenericBackend._test_solve (build/cythonized/sage/numerical/backends/generic_backend.c:8748)
        with tester.assertRaises(MIPSolverException) as cm:   # unbounded
      File "/home/jdemeyer/sage-git/local/lib/python/unittest/case.py", line 116, in __exit__
        "{0} not raised".format(exc_name))
    AssertionError: MIPSolverException not raised
    ------------------------------------------------------------
    The following tests failed: _test_solve
**********************************************************************

This is what is happening on a 32-bit Linux:

sage: from sage.numerical.backends.coin_backend import CoinBackend
sage: p = CoinBackend()
sage: p.add_linear_constraints(5, 0, None)
sage: p.add_col(range(5), range(5))
sage: p.objective_coefficient(0,1)
sage: p.solve()
0
sage: p.set_verbosity(3)
sage: p.solve()
Cbc3007W No integer variables - nothing to do
Clp0006I 0  Obj 0 Dual inf 0.9999999 (1)
Clp0000I Optimal - objective value -1.7976931e+308
0   ### Instead, an exception should have been raised.
sage: p.get_variable_value(0)
1.7976931348623157e+308  ### BAD

Change History (11)

comment:1 Changed 6 years ago by Jeroen Demeyer

Branch: u/jdemeyer/coinbackend___test_solve_fails_on_32_bit

comment:2 Changed 6 years ago by Jeroen Demeyer

Cc: Matthias Köppe added
Commit: 4b1e5a71451f1f5834dbcf62cfcbfc832c890bbc
Status: newneeds_review

New commits:

4b1e5a7CoinBackend: _test_solve fails on 32-bit

comment:3 Changed 6 years ago by git

Commit: 4b1e5a71451f1f5834dbcf62cfcbfc832c890bbc33ad25e5f987021eff7eb501e9e8416b89d9eca8

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

33ad25eCoinBackend: _test_solve fails on 32-bit

comment:4 Changed 6 years ago by Matthias Köppe

"known bug on 32 bit" -- to whom is this bug known?

comment:5 in reply to:  4 Changed 6 years ago by Jeroen Demeyer

Replying to mkoeppe:

"known bug on 32 bit" -- to whom is this bug known?

To you now :-)

comment:6 Changed 6 years ago by Thierry Monteil

I also fall on this problem. I see that the fix is to ignore the doctest for 32bit systems. How do you know that the doctest failure does not mean that there is a problem somewhere (that should be addressed) ?

comment:7 Changed 6 years ago by Matthias Köppe

There definitely is a problem, and it should NOT be ignored.

comment:8 in reply to:  6 Changed 6 years ago by Jeroen Demeyer

Replying to tmonteil:

How do you know that the doctest failure does not mean that there is a problem somewhere

I am not claiming that. I am adding # known bug, which means that I agree that there is a problem somewhere.

Of course, if the real bug can be fixed, that would be better. But in the mean time, just to have all doctests formally passing (and make a 32-bit patchbot useful), I propose to add the # known bug.

comment:9 Changed 6 years ago by Thierry Monteil

Reviewers: Thierry Monteil

If Mathias is OK with that, i am also in favor to set this ticket to positive review (i confirm that the patch fixes the doctest on my 32bit VM).

If someone has an idea where the bug comes from and how to fix it, that would be great.

comment:10 Changed 6 years ago by Matthias Köppe

I am building a 32-bit environment at the moment to look at what's going on here.

comment:11 Changed 6 years ago by Matthias Köppe

Description: modified (diff)
Note: See TracTickets for help on using tickets.