Opened 8 years ago
Closed 8 years ago
#15639 closed defect (fixed)
Random failure in integer_vector
Reported by:  vbraun  Owned by:  

Priority:  major  Milestone:  sage6.3 
Component:  combinatorics  Keywords:  
Cc:  f.poloni, ncohen, wdj  Merged in:  
Authors:  Federico Poloni  Reviewers:  Volker Braun 
Report Upstream:  N/A  Work issues:  
Branch:  c6a37f2 (Commits, GitHub, GitLab)  Commit:  c6a37f23ef40496638728fb615ce98aab0841761 
Dependencies:  Stopgaps: 
Description
Got this once on skynet/eno:
sage t long src/sage/combinat/integer_vector.py ********************************************************************** File "src/sage/combinat/integer_vector.py", line 347, in sage.combinat.integer_vector._slider01.range.gale_ryser_theorem Failed example: for algorithm in ["gale", "ryser"]: # long time for i in range(50): # long time if not test_algorithm(algorithm, 3, 10): # long time print "Something wrong with algorithm ", algorithm # long time break # long time Expected nothing Got: Something wrong with algorithm ryser
Likely due to #15609.
Common Python pitfalls are that the sort order of sets / dict entries can be dependent on memory locations.
Change History (11)
comment:1 Changed 8 years ago by
 Cc wdj added
comment:2 Changed 8 years ago by
comment:3 Changed 8 years ago by
I would also find it weird that the two tickets may be related ^^;
Nathann
comment:4 Changed 8 years ago by
 Milestone changed from sage6.1 to sage6.2
comment:5 Changed 8 years ago by
 Milestone changed from sage6.2 to sage6.3
comment:6 Changed 8 years ago by
 Branch set to u/f.poloni/ticket/15639
 Status changed from new to needs_review
I have changed the output of the test so that when it fails again we get the (random) input values that caused failure. In this way, when it fails again it will be much easier to debug.
This does not fix the issue, there must still be a bug in the ryser
algorithm, but I think that we can close the bug nevertheless until a new test failure report comes.
comment:7 Changed 8 years ago by
 Commit set to c6a37f23ef40496638728fb615ce98aab0841761
Branch pushed to git repo; I updated commit sha1. New commits:
c6a37f2  changed output of a randomized test to get an error message that makes the failure reproducible

comment:9 Changed 8 years ago by
 Reviewers set to Volker Braun
comment:10 Changed 8 years ago by
comment:11 Changed 8 years ago by
 Branch changed from u/f.poloni/ticket/15639 to c6a37f23ef40496638728fb615ce98aab0841761
 Resolution set to fixed
 Status changed from positive_review to closed
I don't think that the two bugs are related. #15609 only adds a function
IntegerVectors_nk.rank()
which is never called by the test that fails (I checked by adding aprint
in it and seeing if it appears in the output  not the most elegant way, but it works).I might be biased as I am the author of the patch that closed #15609, but my guess is that the bug was present before. It is difficult to tell because the test that fails is randomized and so it generates different matrices every time it is run.