#21449 closed defect (fixed)
CoinBackend: _test_solve fails on 32bit
Reported by:  jdemeyer  Owned by:  

Priority:  blocker  Milestone:  sage7.4 
Component:  doctest coverage  Keywords:  sdl 
Cc:  mkoeppe  Merged in:  
Authors:  Jeroen Demeyer  Reviewers:  Thierry Monteil, Matthias Koeppe 
Report Upstream:  N/A  Work issues:  
Branch:  5eacf72 (Commits)  Commit:  
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 (24)
comment:1 Changed 3 years ago by
 Branch set to u/jdemeyer/coinbackend___test_solve_fails_on_32_bit
comment:2 Changed 3 years ago by
 Cc mkoeppe added
 Commit set to 4b1e5a71451f1f5834dbcf62cfcbfc832c890bbc
 Status changed from new to needs_review
comment:3 Changed 3 years ago by
 Commit changed from 4b1e5a71451f1f5834dbcf62cfcbfc832c890bbc to 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:4 followup: ↓ 5 Changed 3 years ago by
"known bug on 32 bit"  to whom is this bug known?
comment:5 in reply to: ↑ 4 Changed 3 years ago by
comment:6 followup: ↓ 8 Changed 3 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:7 Changed 3 years ago by
There definitely is a problem, and it should NOT be ignored.
comment:8 in reply to: ↑ 6 Changed 3 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 3 years ago by
 Reviewers set to 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 3 years ago by
I am building a 32bit environment at the moment to look at what's going on here.
comment:11 Changed 3 years ago by
 Description modified (diff)
comment:12 followup: ↓ 13 Changed 3 years ago by
Upgrading CBC to 2.9.8 (latest) does NOT fix this problem.
comment:13 in reply to: ↑ 12 Changed 3 years ago by
Replying to mkoeppe:
Upgrading CBC to 2.9.8 (latest) does NOT fix this problem.
Do you have an idea about where the problem comes from ? Does upstream say something about this ?
comment:14 followup: ↓ 15 Changed 3 years ago by
I haven't checked with upstream yet. I am actually not sure yet if this a problem with the library or with our Cython wrapper.
comment:15 in reply to: ↑ 14 Changed 3 years ago by
Replying to mkoeppe:
I haven't checked with upstream yet. I am actually not sure yet if this a problem with the library or with our Cython wrapper.
So shall we accept the current fix and postpone a real fix for when we understant more the situation ?
comment:16 Changed 3 years ago by
The patch at least needs to include reference to a ticket; and when this ticket is closed a followup tickets for an actual fix needs to be opened.
comment:17 Changed 3 years ago by
I created a new ticket at #21550 (details to be filled in) and added a reference to that ticket in the doctest.
comment:18 Changed 3 years ago by
 Commit changed from 33ad25e5f987021eff7eb501e9e8416b89d9eca8 to 5eacf72e79d02bc30ce5701d86db4ce8a03a10f2
Branch pushed to git repo; I updated commit sha1. New commits:
5eacf72  Add ticket number

comment:19 followup: ↓ 20 Changed 3 years ago by
I am surprised to see that sys.float_info
returns the same on 32bit and on 64bit Linux. On 32bit:
dima@arando:~$ python Python 2.7.6 (default, Jun 22 2015, 18:00:18) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.float_info sys.float_info(max=1.7976931348623157e+308, max_exp=1024, max_10_exp=308, min=2.2250738585072014e308, min_exp=1021, min_10_exp=307, dig=15, mant_dig=53, epsilon=2.220446049250313e16, radix=2, rounds=1)
anyhow we might be hitting a classic like https://gcc.gnu.org/bugzilla/show_bug.cgi?id=323
comment:20 in reply to: ↑ 19 Changed 3 years ago by
Replying to dimpase:
I am surprised to see that
sys.float_info
returns the same on 32bit and on 64bit Linux. On 32bit:
Why? The C type double
is the same on 32bit and 64bit architectures.
comment:21 Changed 3 years ago by
 Reviewers changed from Thierry Monteil to Thierry Monteil, Matthias Koeppe
 Status changed from needs_review to positive_review
comment:22 Changed 3 years ago by
 Branch changed from u/jdemeyer/coinbackend___test_solve_fails_on_32_bit to 5eacf72e79d02bc30ce5701d86db4ce8a03a10f2
 Resolution set to fixed
 Status changed from positive_review to closed
comment:23 Changed 2 years ago by
 Commit 5eacf72e79d02bc30ce5701d86db4ce8a03a10f2 deleted
 Reviewers changed from Thierry Monteil, Matthias Koeppe to Thierry Monteil, Matthias Koeppe
comment:24 Changed 3 months ago by
 Keywords sdl added
New commits:
CoinBackend: _test_solve fails on 32bit