#5428: [with patch, needs review] Doctest failure in
devel/sage/doc/en/bordeaux_2008/method_of_graphs.rst
---------------------+------------------------------------------------------
 Reporter:  jsp      |       Owner:  mabshoff
     Type:  defect   |      Status:  new     
 Priority:  blocker  |   Milestone:  sage-3.4
Component:  doctest  |    Keywords:          
---------------------+------------------------------------------------------

Comment(by cwitty):

 I tracked down some architecture-dependence in sage.modular when I was
 working on randstate.pyx (trying to remove "# random"), but then I never
 got around to submitting the patch.  Perhaps this is the problem?

 Untested, very old, possibly no-longer-applies patch chunk:
 {{{
 --- a/sage/modular/modsym/relation_matrix.py    Sat Mar 29 12:28:22 2008
 -0700
 +++ b/sage/modular/modsym/relation_matrix.py    Sun Mar 30 07:09:50 2008
 -0700
 @@ -391,7 +391,8 @@ def sparse_2term_quotient(rels, n, F):
      ZERO = F(0)
      coef = [ONE for i in xrange(n)]
      related_to_me = [[] for i in xrange(n)]
 -    for v0, v1 in rels:
 +    # Sort rels so that we get the same answer on 32-bit and 64-bit
 platforms.
 +    for v0, v1 in sorted(rels):
          c0 = coef[v0[0]] * F(v0[1])
          c1 = coef[v1[0]] * F(v1[1])
          # Mod out by the relation
 }}}

 Iterating through a set uses an order that depends on the {{{__hash__}}},
 and {{{__hash__}}} values are different between 32-bit and 64-bit
 platforms.  I think I remember that sorting rels fixed that.  (I don't
 know what the performance implications are, but probably not much; sorting
 is pretty fast.)

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5428#comment:13>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel

--~--~---------~--~----~------------~-------~--~----~
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