aldenwalker / scallop

Stable commutator length computer
5 stars 1 forks source link

Cannot use gurobi #1

Open jibnew opened 9 months ago

jibnew commented 9 months ago

I get these errors:

 ~/.local/scallop-master > ./scallop -mGUROBI abcABC
Gurobi Linear programming error
No feasible solution found

and

 ~/.local/scallop-master > ./scallop -cyclic -mGUROBI abcABC
Gurobi Linear programming error
There was some linear programming error

Here is the verbose output for the last case:

 ~/.local/scallop-master > ./scallop -cyclic -mGUROBI -v3 abcABC
Group: <a>/<0a> * <b>/<0b> * <c>/<0c>
Chain: 1abcABC
Letters:
0: a (0,0,0)
1: b (0,1,0)
2: c (0,2,0)
3: A (0,3,0)
4: B (0,4,0)
5: C (0,5,0)
Group letters:
Group 0:
(0,0,a),(0,3,A),
Group 1:
(0,1,b),(0,4,B),
Group 2:
(0,2,c),(0,5,C),
Interface Edges:
0: 0, 3
1: 3, 0
2: 1, 4
3: 4, 1
4: 2, 5
5: 5, 2
Central Edge pairs:
0: (0, 0), (5, 1)
1: (0, 2), (1, 1)
2: (0, 3), (2, 1)
3: (0, 4), (3, 1)
4: (0, 5), (4, 1)
5: (1, 0), (5, 2)
6: (1, 3), (2, 2)
7: (1, 4), (3, 2)
8: (1, 5), (4, 2)
9: (2, 0), (5, 3)
10: (2, 4), (3, 3)
11: (2, 5), (4, 3)
12: (3, 0), (5, 4)
13: (3, 5), (4, 4)
14: (4, 0), (5, 5)
computed polys (32)
Central polygons: (32):
0: CP: (0, 3)i (4, 1)i (2, 5)i
1: CP: (1, 4)i (5, 2)i (3, 0)i
2: CP: (0, 3)i (4, 1)i (1, 0)c
3: CP: (1, 4)i (5, 2)i (2, 1)c
4: CP: (2, 5)i (0, 3)i (3, 2)c
5: CP: (3, 0)i (1, 4)i (4, 3)c
6: CP: (4, 1)i (2, 5)i (5, 4)c
7: CP: (5, 2)i (3, 0)i (0, 5)c
8: CP: (0, 3)i (3, 1)c (0, 0)c
9: CP: (0, 3)i (3, 2)c (1, 0)c
10: CP: (0, 3)i (3, 3)c (2, 0)c
11: CP: (0, 3)i (3, 5)c (4, 0)c
12: CP: (1, 4)i (4, 0)c (5, 1)c
13: CP: (1, 4)i (4, 2)c (1, 1)c
14: CP: (1, 4)i (4, 3)c (2, 1)c
15: CP: (1, 4)i (4, 4)c (3, 1)c
16: CP: (2, 5)i (5, 1)c (0, 2)c
17: CP: (2, 5)i (5, 3)c (2, 2)c
18: CP: (2, 5)i (5, 4)c (3, 2)c
19: CP: (2, 5)i (5, 5)c (4, 2)c
20: CP: (3, 0)i (0, 0)c (5, 3)c
21: CP: (3, 0)i (0, 2)c (1, 3)c
22: CP: (3, 0)i (0, 4)c (3, 3)c
23: CP: (3, 0)i (0, 5)c (4, 3)c
24: CP: (4, 1)i (1, 0)c (5, 4)c
25: CP: (4, 1)i (1, 1)c (0, 4)c
26: CP: (4, 1)i (1, 3)c (2, 4)c
27: CP: (4, 1)i (1, 5)c (4, 4)c
28: CP: (5, 2)i (2, 0)c (5, 5)c
29: CP: (5, 2)i (2, 1)c (0, 5)c
30: CP: (5, 2)i (2, 2)c (1, 5)c
31: CP: (5, 2)i (2, 4)c (3, 5)c
computed group teeth and rectangles
Group teeth: (0)
Group rectangles: (3)
0: GR: gp0 (0,3)
1: GR: gp1 (1,4)
2: GR: gp2 (2,5)
Num equality rows: 21Num rows: 22
Started linear programming setup
Set row 0 bounded to 0
Set row 1 bounded to 0
Set row 2 bounded to 0
Set row 3 bounded to 0
Set row 4 bounded to 0
Set row 5 bounded to 0
Set row 6 bounded to 0
Set row 7 bounded to 0
Set row 8 bounded to 0
Set row 9 bounded to 0
Set row 10 bounded to 0
Set row 11 bounded to 0
Set row 12 bounded to 0
Set row 13 bounded to 0
Set row 14 bounded to 0
Set row 15 bounded to 0
Set row 16 bounded to 0
Set row 17 bounded to 0
Set row 18 bounded to 0
Set row 19 bounded to 0
Set row 20 bounded to 0
Set row 21 bounded to 1
Set objective 0 to 1
Set objective 1 to 1
Set objective 2 to 1
Set objective 3 to 1
Set objective 4 to 1
Set objective 5 to 1
Set objective 6 to 1
Set objective 7 to 1
Set objective 8 to 1
Set objective 9 to 1
Set objective 10 to 1
Set objective 11 to 1
Set objective 12 to 1
Set objective 13 to 1
Set objective 14 to 1
Set objective 15 to 1
Set objective 16 to 1
Set objective 17 to 1
Set objective 18 to 1
Set objective 19 to 1
Set objective 20 to 1
Set objective 21 to 1
Set objective 22 to 1
Set objective 23 to 1
Set objective 24 to 1
Set objective 25 to 1
Set objective 26 to 1
Set objective 27 to 1
Set objective 28 to 1
Set objective 29 to 1
Set objective 30 to 1
Set objective 31 to 1
GR Set objective 32 to 0
GR Set objective 33 to 0
GR Set objective 34 to 0
CP number 0:
CP number 1:
CP number 2:
CP number 3:
CP number 4:
CP number 5:
CP number 6:
CP number 7:
CP number 8:
CP number 9:
CP number 10:
CP number 11:
CP number 12:
CP number 13:
CP number 14:
CP number 15:
CP number 16:
CP number 17:
CP number 18:
CP number 19:
CP number 20:
CP number 21:
CP number 22:
CP number 23:
CP number 24:
CP number 25:
CP number 26:
CP number 27:
CP number 28:
CP number 29:
CP number 30:
CP number 31:
Loaded central polygon edge constraints
GR: gp0 (0,3)
GR: gp1 (1,4)
GR: gp2 (2,5)
Loaded group constraints
word cons GR GR: gp0 (0,3)
word cons GR GR: gp1 (1,4)
word cons GR GR: gp2 (2,5)
Loaded word constraints
LP problem:
Cols: 35
Rows: 22
Objective: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0
RHS: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
Entries: (0,0,1), (3,0,1), (4,0,1), (2,1,1), (5,1,1), (1,1,1), (0,2,1), (3,2,1), (11,2,1), (2,3,1), (5,3,1), (8,3,-1), (4,4,1), (0,4,1), (13,4,-1), (1,5,1), (2,5,1), (17,5,-1), (3,6,1), (4,6,1), (18,6,-1), (5,7,1), (1,7,1), (10,7,1), (0,8,1), (9,8,-1), (6,8,1), (0,9,1), (13,9,-1), (11,9,1), (0,10,1), (16,10,-1), (15,10,1), (0,11,1), (19,11,1), (20,11,1), (2,12,1), (20,12,1), (6,12,-1), (2,13,1), (14,13,-1), (7,13,-1), (2,14,1), (17,14,-1), (8,14,-1), (2,15,1), (19,15,-1), (9,15,-1), (4,16,1), (6,16,-1), (7,16,1), (4,17,1), (15,17,-1), (12,17,-1), (4,18,1), (18,18,-1), (13,18,-1), (4,19,1), (20,19,-1), (14,19,-1), (1,20,1), (6,20,1), (15,20,-1), (1,21,1), (7,21,1), (12,21,1), (1,22,1), (9,22,1), (16,22,-1), (1,23,1), (10,23,1), (17,23,-1), (3,24,1), (11,24,1), (18,24,-1), (3,25,1), (7,25,-1), (9,25,1), (3,26,1), (12,26,1), (16,26,1), (3,27,1), (14,27,1), (19,27,-1), (5,28,1), (15,28,1), (20,28,-1), (5,29,1), (8,29,-1), (10,29,1), (5,30,1), (12,30,-1), (14,30,1), (5,31,1), (16,31,1), (19,31,1), (1,32,-1), (0,32,-1), (3,33,-1), (2,33,-1), (5,34,-1), (4,34,-1), (21,32,1),
Gurobi Linear programming error
There was some linear programming error
aldenwalker commented 8 months ago

If it works using glpk (the default) or another solver, then I would be suspicious of something in the interface to Gurobi. I wouldn't be surprised at all if the API has changed in the years since it was written. Unfortunately I no longer have access to Gurobi, so it's a bit tricky to debug. I don't think it should be too terrible to fix since it has an internal representation of the LP and when it comes time to solve it just translates it (i.e. it's all in one place as an abstracted problem -- see the section starting on line 712 of lp.cc). I'm happy to help if you want to try figuring it out.

aldenwalker commented 8 months ago

I see that the help text claims that you can write the LP to a file, but the function that it calls to do that just does nothing. ...whoops guess I never got around to that. That would also be useful to have for testing.