Opened 6 years ago

Last modified 3 years ago

#17074 new defect

Random timeout in quiver.py

Reported by: vbraun Owned by:
Priority: major Milestone: sage-6.4
Component: algebra Keywords: random_fail, cluster
Cc: SimonKing, nthiery, ncohen, stumpc5, saliola, gmoose05 Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

I've seen this before, but it is happening more frequently now:

sage -t --long src/sage/combinat/cluster_algebra_quiver/quiver.py
    Timed out
**********************************************************************
Tests run before process (pid=25131) timed out:
sage: Q = ClusterQuiver(['A',5]); Q ## line 58 ##
Quiver on 5 vertices of type ['A', 5]
sage: Q = ClusterQuiver(['B',2]); Q ## line 61 ##
Quiver on 2 vertices of type ['B', 2]
sage: Q2 = ClusterQuiver(['C',2]); Q2 ## line 63 ##
Quiver on 2 vertices of type ['B', 2]
sage: MT = Q.mutation_type(); MT.standard_quiver() == Q ## line 65 ##
True
sage: MT = Q2.mutation_type(); MT.standard_quiver() == Q2 ## line 67 ##
False
sage: Q = ClusterQuiver(['A',[2,5],1]); Q ## line 70 ##
Quiver on 7 vertices of type ['A', [2, 5], 1]
sage: Q = ClusterQuiver(['A', [5,0],1]); Q ## line 73 ##
Quiver on 5 vertices of type ['D', 5]
sage: Q.is_finite() ## line 75 ##
True
sage: Q.is_acyclic() ## line 77 ##
False
sage: Q = ClusterQuiver(['F', 4, [2,1]]); Q ## line 80 ##
Quiver on 6 vertices of type ['F', 4, [1, 2]]
sage: MT = Q.mutation_type(); MT.standard_quiver() == Q ## line 82 ##
False
sage: dg = Q.digraph(); Q.mutate([2,1,4,0,5,3]) ## line 84 ##
sage: dg2 = Q.digraph(); dg2.is_isomorphic(dg,edge_labels=True) ## line 85 ##
False
sage: dg2.is_isomorphic(MT.standard_quiver().digraph(),edge_labels=True) ## line 87 ##
True
sage: Q = ClusterQuiver(['G',2, (3,1)]); Q ## line 90 ##
Quiver on 4 vertices of type ['G', 2, [1, 3]]
sage: MT = Q.mutation_type(); MT.standard_quiver() == Q ## line 92 ##
False
sage: Q = ClusterQuiver(['GR',[3,6]]); Q ## line 95 ##
Quiver on 4 vertices of type ['D', 4]
sage: MT = Q.mutation_type(); MT.standard_quiver() == Q ## line 97 ##
False
sage: Q = ClusterQuiver(['GR',[3,7]]); Q ## line 100 ##
Quiver on 6 vertices of type ['E', 6]
sage: Q = ClusterQuiver(['TR',2]); Q ## line 103 ##
Quiver on 3 vertices of type ['A', 3]
sage: MT = Q.mutation_type(); MT.standard_quiver() == Q ## line 105 ##
False
sage: Q.mutate([1,0]); MT.standard_quiver() == Q ## line 107 ##
True
sage: Q = ClusterQuiver(['TR',3]); Q ## line 110 ##
Quiver on 6 vertices of type ['D', 6]
sage: MT = Q.mutation_type(); MT.standard_quiver() == Q ## line 112 ##
False
sage: Q = ClusterQuiver(['A',[2,5],1]); Q ## line 117 ##
Quiver on 7 vertices of type ['A', [2, 5], 1]
sage: T = ClusterQuiver( Q ); T ## line 119 ##
Quiver on 7 vertices of type ['A', [2, 5], 1]
sage: Q = ClusterQuiver(['A',[2,5],1]); Q ## line 124 ##
Quiver on 7 vertices of type ['A', [2, 5], 1]
sage: T = ClusterQuiver( Q._M ); T ## line 126 ##
Quiver on 7 vertices
sage: Q = ClusterQuiver( matrix([[0,1,-1],[-1,0,1],[1,-1,0],[1,2,3]]) ); Q ## line 129 ##
Quiver on 4 vertices with 1 frozen vertex
sage: Q = ClusterQuiver( matrix([]) ); Q ## line 132 ##
Quiver without vertices
sage: Q = ClusterQuiver(['A',[2,5],1]); Q ## line 137 ##
Quiver on 7 vertices of type ['A', [2, 5], 1]
sage: T = ClusterQuiver( Q._digraph ); T ## line 139 ##
Quiver on 7 vertices
sage: Q = ClusterQuiver( DiGraph([[1,2],[2,3],[3,4],[4,1]]) ); Q ## line 142 ##
Quiver on 4 vertices
sage: Q = ClusterQuiver(['A',[2,5],1]); Q ## line 147 ##
Quiver on 7 vertices of type ['A', [2, 5], 1]
sage: T = ClusterQuiver( Q._digraph.edges() ); T ## line 149 ##
Quiver on 7 vertices
sage: Q = ClusterQuiver( [[1,2],[2,3],[3,4],[4,1]] ); Q ## line 152 ##
Quiver on 4 vertices
sage: Q = ClusterQuiver(DiGraph([[1,1]])) ## line 157 ##
sage: Q = ClusterQuiver([[1,1]]) ## line 162 ##
sage: Q = ClusterQuiver(DiGraph([[1, 0],[0,1]])) ## line 167 ##
sage: Q = ClusterQuiver('whatever') ## line 172 ##
sage: sig_on_count() ## line 176 ##
0
sage: Q = ClusterQuiver(['A',4]) ## line 181 ##
sage: TestSuite(Q).run() ## line 182 ##
sage: sig_on_count() ## line 183 ##
0
sage: Q = ClusterQuiver(['A',5]) ## line 355 ##
sage: T = Q.mutate( 2, inplace=False ) ## line 356 ##
sage: Q.__eq__( T ) ## line 357 ##
False
sage: T.mutate( 2 ) ## line 359 ##
sage: Q.__eq__( T ) ## line 360 ##
True
sage: sig_on_count() ## line 362 ##
0
sage: Q = ClusterQuiver(['A',5]) ## line 371 ##
sage: Q._repr_() ## line 372 ##
"Quiver on 5 vertices of type ['A', 5]"
sage: sig_on_count() ## line 374 ##
0
sage: Q = ClusterQuiver(['A',5]) ## line 401 ##
sage: pl = Q.plot() ## line 402 ##
sage: pl = Q.plot(circular=True) ## line 403 ##
sage: sig_on_count() ## line 404 ##
0
sage: Q = ClusterQuiver(['A',5]) ## line 485 ##
sage: Q.show() # long time ## line 486 ##
sage: sig_on_count() ## line 487 ##
0
sage: Q = ClusterQuiver(['A',4]) ## line 506 ##
sage: Q.interact() # long time ## line 507 ##
'The interactive mode only runs in the Sage notebook.'
sage: sig_on_count() ## line 509 ##
0
sage: Q = ClusterQuiver(['F',4,[1,2]]) ## line 566 ##
sage: Q.save_image(os.path.join(SAGE_TMP, 'sage.png')) ## line 567 ##
sage: sig_on_count() ## line 568 ##
0
sage: Q = ClusterQuiver(['F',4,[1,2]]) ## line 584 ##
sage: Q.qmu_save(os.path.join(SAGE_TMP, 'sage.qmu')) ## line 585 ##
sage: S=ClusterSeed(['A',3]) ## line 589 ##
sage: T1=S.principal_extension() ## line 590 ##
sage: T2=T1.principal_extension(ignore_coefficients=True) ## line 591 ##
sage: Q=T2.quiver() ## line 592 ##
sage: Q.qmu_save(os.path.join(SAGE_TMP, 'sage.qmu')) ## line 593 ##
sage: sig_on_count() ## line 594 ##
0
sage: ClusterQuiver(['A',4]).b_matrix() ## line 647 ##
[ 0  1  0  0]
[-1  0 -1  0]
[ 0  1  0  1]
[ 0  0 -1  0]
sage: ClusterQuiver(['B',4]).b_matrix() ## line 653 ##
[ 0  1  0  0]
[-1  0 -1  0]
[ 0  1  0  1]
[ 0  0 -2  0]
sage: ClusterQuiver(['D',4]).b_matrix() ## line 659 ##
[ 0  1  0  0]
[-1  0 -1 -1]
[ 0  1  0  0]
[ 0  1  0  0]
sage: ClusterQuiver(QuiverMutationType([['A',2],['B',2]])).b_matrix() ## line 665 ##
[ 0  1  0  0]
[-1  0  0  0]
[ 0  0  0  1]
[ 0  0 -2  0]
sage: sig_on_count() ## line 670 ##
0
sage: ClusterQuiver(['A',1]).digraph() ## line 679 ##
Digraph on 1 vertex
sage: ClusterQuiver(['A',1]).digraph().vertices() ## line 681 ##
[0]
sage: ClusterQuiver(['A',1]).digraph().edges() ## line 683 ##
[]
sage: ClusterQuiver(['A',4]).digraph() ## line 686 ##
Digraph on 4 vertices
sage: ClusterQuiver(['A',4]).digraph().edges() ## line 688 ##
[(0, 1, (1, -1)), (2, 1, (1, -1)), (2, 3, (1, -1))]
sage: ClusterQuiver(['B',4]).digraph() ## line 691 ##
Digraph on 4 vertices
sage: ClusterQuiver(['A',4]).digraph().edges() ## line 693 ##
[(0, 1, (1, -1)), (2, 1, (1, -1)), (2, 3, (1, -1))]
sage: ClusterQuiver(QuiverMutationType([['A',2],['B',2]])).digraph() ## line 696 ##
Digraph on 4 vertices
sage: ClusterQuiver(QuiverMutationType([['A',2],['B',2]])).digraph().edges() ## line 699 ##
[(0, 1, (1, -1)), (2, 3, (1, -2))]
sage: sig_on_count() ## line 701 ##
0
sage: ClusterQuiver(['A',4]).mutation_type() ## line 725 ##
['A', 4]
sage: ClusterQuiver(['A',(3,1),1]).mutation_type() ## line 727 ##
['A', [1, 3], 1]
sage: ClusterQuiver(['C',2]).mutation_type() ## line 729 ##
['B', 2]
sage: ClusterQuiver(['B',4,1]).mutation_type() ## line 731 ##
['BD', 4, 1]
sage: Q = ClusterQuiver(['A',5]) ## line 736 ##
sage: Q._mutation_type = None ## line 737 ##
sage: Q.mutation_type() ## line 738 ##
['A', 5]
sage: Q = ClusterQuiver([(0,1),(1,2),(2,3),(3,4)]) ## line 741 ##
sage: Q.mutation_type() ## line 742 ##
['A', 5]
sage: Q = ClusterQuiver(['E',8,[1,1]]); Q ## line 747 ##
Quiver on 10 vertices of type ['E', 8, [1, 1]]
sage: Q._mutation_type = None; Q ## line 749 ##
Quiver on 10 vertices
sage: Q.mutation_type() # long time ## line 751 ##
['E', 8, [1, 1]]
sage: Q = ClusterQuiver(['D',4,1]) ## line 756 ##
sage: Q._mutation_type = None ## line 757 ##
sage: Q = ClusterQuiver(['X',6]) ## line 763 ##
sage: Q._mutation_type = None ## line 764 ##
sage: Q.mutation_type() # long time ## line 765 ##
['X', 6]
sage: dg = DiGraph(); dg.add_edges([(9,0),(9,4),(4,6),(6,7),(7,8),(8,3),(3,5),(5,6),(8,1),(2,3)]) ## line 771 ##
sage: ClusterQuiver( dg ).mutation_type() # long time ## line 772 ##
['E', 8, [1, 1]]
sage: dg = DiGraph( { 0:[3], 1:[0,4], 2:[0,6], 3:[1,2,7], 4:[3,8], 5:[2], 6:[3,5], 7:[4,6], 8:[7] } ) ## line 775 ##
sage: ClusterQuiver( dg ).mutation_type() # long time ## line 776 ##

**********************************************************************

Change History (5)

comment:1 follow-up: Changed 6 years ago by SimonKing

I have never seen it. Question: Is the code in src/sage/combinat/cluster_algebra/ using the code from src/sage/quivers/? If yes, then I wonder if #16453 improves the situation. If not, then I have no idea whatsoever on the timeout.

comment:2 follow-up: Changed 6 years ago by vbraun

  • Cc nthiery ncohen stumpc5 saliola added

Don't know...

How about somebody review #16938 and then I'll try #16453 with SAGE_DEBUG=yes. Not that I don't trust your memory management for bounded integer sequences ;-)

comment:3 in reply to: ↑ 1 Changed 6 years ago by stumpc5

  • Cc gmoose05 added

Replying to SimonKing:

Is the code in src/sage/combinat/cluster_algebra/ using the code from src/sage/quivers/?

src/sage/quivers/ wasn't even there when I originally wrote the code in src/sage/combinat/cluster_algebra/. I am also not aware of any changes to the code that made it relying on src/sage/quivers/ since then.

Needless to say: I don't have any idea where the timeout comes from either...

comment:4 in reply to: ↑ 2 Changed 6 years ago by SimonKing

Replying to vbraun:

How about somebody review #16938 and then I'll try #16453 with SAGE_DEBUG=yes. Not that I don't trust your memory management for bounded integer sequences ;-)

Well, mainly it is GMP's memory management. Although, in the latest version of the code, I do use pointers...

comment:5 Changed 3 years ago by chapoton

  • Keywords cluster added
Note: See TracTickets for help on using tickets.