#13797: LinearFunction.__hash__ overflow
--------------------------------------+-------------------------------------
       Reporter:  jdemeyer            |         Owner:  ncohen      
           Type:  defect              |        Status:  needs_review
       Priority:  blocker             |     Milestone:  sage-5.5    
      Component:  linear programming  |    Resolution:              
       Keywords:                      |   Work issues:              
Report Upstream:  N/A                 |     Reviewers:              
        Authors:  Volker Braun        |     Merged in:              
   Dependencies:                      |      Stopgaps:              
--------------------------------------+-------------------------------------
Description changed by dimpase:

Old description:

> On cicero (32-bit Linux):
>
> {{{
> sage -t  --long -force_lib devel/sage/sage/graphs/generic_graph.py
> **********************************************************************
> File
> "/home/buildbot/build/sage/cicero-1/cicero_full/build/sage-5.5.rc1/devel
> /sage-main/sage/graphs/generic_graph.py", line 4436:
>     sage: arborescences = g.edge_disjoint_spanning_trees(k)  # long time
> (up to 15s on sage.math, 2011)
> Exception raised:
>     Traceback (most recent call last):
>       File
> "/home/buildbot/build/sage/cicero-1/cicero_full/build/sage-5.5.rc1/local/bin/ncadoctest.py",
> line 1231, in run_one_test
>         self.run_one_example(test, example, filename, compileflags)
>       File
> "/home/buildbot/build/sage/cicero-1/cicero_full/build/sage-5.5.rc1/local/bin/sagedoctest.py",
> line 38, in run_one_example
>         OrigDocTestRunner.run_one_example(self, test, example, filename,
> compileflags)
>       File
> "/home/buildbot/build/sage/cicero-1/cicero_full/build/sage-5.5.rc1/local/bin/ncadoctest.py",
> line 1172, in run_one_example
>         compileflags, 1) in test.globs
>       File "<doctest __main__.example_68[8]>", line 1, in <module>
>         arborescences = g.edge_disjoint_spanning_trees(k)  # long time
> (up to 15s on sage.math, 2011)###line 4436:
>     sage: arborescences = g.edge_disjoint_spanning_trees(k)  # long time
> (up to 15s on sage.math, 2011)
>       File
> "/home/buildbot/build/sage/cicero-1/cicero_full/build/sage-5.5.rc1/local/lib/python
> /site-packages/sage/graphs/generic_graph.py", line 4511, in
> edge_disjoint_spanning_trees
>         p.add_constraint(r_edges[j][(u,v)] + r_edges[j][(v, u)] -
> edges[j][(u,v)], min=0)
>       File "mip.pyx", line 1976, in
> sage.numerical.mip.MIPVariable.__getitem__ (sage/numerical/mip.c:10250)
>       File "linear_functions.pyx", line 821, in
> sage.numerical.linear_functions.LinearFunction.__hash__
> (sage/numerical/linear_functions.c:6740)
>     OverflowError: Python int too large to convert to C long
> **********************************************************************
> }}}

New description:

 On cicero (32-bit Linux):

 {{{
 sage -t  --long -force_lib devel/sage/sage/graphs/generic_graph.py
 **********************************************************************
 File
 "/home/buildbot/build/sage/cicero-1/cicero_full/build/sage-5.5.rc1/devel
 /sage-main/sage/graphs/generic_graph.py", line 4436:
     sage: arborescences = g.edge_disjoint_spanning_trees(k)  # long time
 (up to 15s on sage.math, 2011)
 Exception raised:
     Traceback (most recent call last):
       File
 
"/home/buildbot/build/sage/cicero-1/cicero_full/build/sage-5.5.rc1/local/bin/ncadoctest.py",
 line 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File
 
"/home/buildbot/build/sage/cicero-1/cicero_full/build/sage-5.5.rc1/local/bin/sagedoctest.py",
 line 38, in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File
 
"/home/buildbot/build/sage/cicero-1/cicero_full/build/sage-5.5.rc1/local/bin/ncadoctest.py",
 line 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_68[8]>", line 1, in <module>
         arborescences = g.edge_disjoint_spanning_trees(k)  # long time (up
 to 15s on sage.math, 2011)###line 4436:
     sage: arborescences = g.edge_disjoint_spanning_trees(k)  # long time
 (up to 15s on sage.math, 2011)
       File
 
"/home/buildbot/build/sage/cicero-1/cicero_full/build/sage-5.5.rc1/local/lib/python
 /site-packages/sage/graphs/generic_graph.py", line 4511, in
 edge_disjoint_spanning_trees
         p.add_constraint(r_edges[j][(u,v)] + r_edges[j][(v, u)] -
 edges[j][(u,v)], min=0)
       File "mip.pyx", line 1976, in
 sage.numerical.mip.MIPVariable.__getitem__ (sage/numerical/mip.c:10250)
       File "linear_functions.pyx", line 821, in
 sage.numerical.linear_functions.LinearFunction.__hash__
 (sage/numerical/linear_functions.c:6740)
     OverflowError: Python int too large to convert to C long
 **********************************************************************
 }}}
 Apply

  * [attachment:trac_13797_hash_overflow.patch]

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13797#comment:6>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to