Opened 6 years ago
Last modified 3 years ago
#21449 closed defect
CoinBackend: _test_solve fails on 32bit — at Version 11
Reported by:  Jeroen Demeyer  Owned by:  

Priority:  blocker  Milestone:  sage7.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: 
Description (last modified by )
On Linux arando 3.13.095generic #142Ubuntu 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/sagegit/local/lib/python2.7/sitepackages/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/sagegit/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 32bit 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
Branch:  → u/jdemeyer/coinbackend___test_solve_fails_on_32_bit 

comment:2 Changed 6 years ago by
Cc:  Matthias Köppe added 

Commit:  → 4b1e5a71451f1f5834dbcf62cfcbfc832c890bbc 
Status:  new → needs_review 
comment:3 Changed 6 years ago by
Commit:  4b1e5a71451f1f5834dbcf62cfcbfc832c890bbc → 33ad25e5f987021eff7eb501e9e8416b89d9eca8 

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
33ad25e  CoinBackend: _test_solve fails on 32bit

comment:5 Changed 6 years ago by
comment:6 followup: 8 Changed 6 years ago by
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:8 Changed 6 years ago by
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 32bit patchbot useful), I propose to add the # known bug
.
comment:9 Changed 6 years ago by
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
I am building a 32bit environment at the moment to look at what's going on here.
comment:11 Changed 6 years ago by
Description:  modified (diff) 

New commits:
CoinBackend: _test_solve fails on 32bit