Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade lrslib to fix total brokenness on 32-bit systems #21451

Closed
jdemeyer opened this issue Sep 8, 2016 · 17 comments
Closed

Upgrade lrslib to fix total brokenness on 32-bit systems #21451

jdemeyer opened this issue Sep 8, 2016 · 17 comments

Comments

@jdemeyer
Copy link

jdemeyer commented Sep 8, 2016

While compiling, there are some very suspicious warnings:

lrslong.h:76:14: warning: overflow in implicit constant conversion [-Woverflow]
 #define MAXD 9223372036854775807L
              ^
lrslib.c:1185:18: note: in expansion of macro 'MAXD'
   Q->subtreesize=MAXD;

(several more warnings of the same kind)

**********************************************************************
File "src/sage/game_theory/catalog_normal_form_games.py", line 132, in sage.game_theory.catalog_normal_form_games.PrisonersDilemma
Failed example:
    g.obtain_nash()
Expected:
    [[(0, 1), (0, 1)]]
Got:
    []
**********************************************************************
File "src/sage/game_theory/catalog_normal_form_games.py", line 205, in sage.game_theory.catalog_normal_form_games.CoordinationGame
Failed example:
    g.obtain_nash()
Expected:
    [[(0, 1), (0, 1)], [(2/3, 1/3), (1/3, 2/3)], [(1, 0), (1, 0)]]
Got:
    [[(2/3, 1/3), (1/3, 2/3)]]
**********************************************************************
File "src/sage/game_theory/catalog_normal_form_games.py", line 218, in sage.game_theory.catalog_normal_form_games.CoordinationGame
Failed example:
    g.obtain_nash()
Expected:
    [[(0, 1), (0, 1)], [(2/3, 1/3), (4/11, 7/11)], [(1, 0), (1, 0)]]
Got:
    [[(2/3, 1/3), (4/11, 7/11)]]
**********************************************************************
File "src/sage/game_theory/catalog_normal_form_games.py", line 281, in sage.game_theory.catalog_normal_form_games.BattleOfTheSexes
Failed example:
    g.obtain_nash()
Expected:
    [[(0, 1), (0, 1)], [(3/4, 1/4), (1/4, 3/4)], [(1, 0), (1, 0)]]
Got:
    [[(3/4, 1/4), (1/4, 3/4)]]
**********************************************************************
File "src/sage/game_theory/catalog_normal_form_games.py", line 332, in sage.game_theory.catalog_normal_form_games.StagHunt
Failed example:
    g.obtain_nash()
Expected:
    [[(0, 1), (0, 1)], [(2/3, 1/3), (2/3, 1/3)], [(1, 0), (1, 0)]]
Got:
    [[(2/3, 1/3), (2/3, 1/3)]]
**********************************************************************
File "src/sage/game_theory/catalog_normal_form_games.py", line 392, in sage.game_theory.catalog_normal_form_games.AntiCoordinationGame
Failed example:
    g.obtain_nash()
Expected:
    [[(0, 1), (1, 0)], [(1/3, 2/3), (1/3, 2/3)], [(1, 0), (0, 1)]]
Got:
    [[(1/3, 2/3), (1/3, 2/3)]]
**********************************************************************
File "src/sage/game_theory/catalog_normal_form_games.py", line 405, in sage.game_theory.catalog_normal_form_games.AntiCoordinationGame
Failed example:
    g.obtain_nash()
Expected:
    [[(0, 1), (1, 0)], [(2/7, 5/7), (1/3, 2/3)], [(1, 0), (0, 1)]]
Got:
    [[(2/7, 5/7), (1/3, 2/3)]]
**********************************************************************
File "src/sage/game_theory/catalog_normal_form_games.py", line 487, in sage.game_theory.catalog_normal_form_games.HawkDove
Failed example:
    g.obtain_nash()
Expected:
    [[(0, 1), (1, 0)], [(1/3, 2/3), (1/3, 2/3)], [(1, 0), (0, 1)]]
Got:
    [[(1/3, 2/3), (1/3, 2/3)]]
**********************************************************************
File "src/sage/game_theory/catalog_normal_form_games.py", line 498, in sage.game_theory.catalog_normal_form_games.HawkDove
Failed example:
    g.obtain_nash()
Expected:
    [[(0, 1), (1, 0)], [(1/6, 5/6), (1/6, 5/6)], [(1, 0), (0, 1)]]
Got:
    [[(1/6, 5/6), (1/6, 5/6)]]
**********************************************************************
File "src/sage/game_theory/catalog_normal_form_games.py", line 563, in sage.game_theory.catalog_normal_form_games.Pigs
Failed example:
    g.obtain_nash()
Expected:
    [[(1, 0), (0, 1)]]
Got:
    []
**********************************************************************
File "src/sage/game_theory/catalog_normal_form_games.py", line 786, in sage.game_theory.catalog_normal_form_games.Chicken
Failed example:
    g.obtain_nash()
Expected:
    [[(0, 1), (1, 0)], [(9/10, 1/10), (9/10, 1/10)], [(1, 0), (0, 1)]]
Got:
    [[(9/10, 1/10), (9/10, 1/10)]]
**********************************************************************
File "src/sage/game_theory/catalog_normal_form_games.py", line 800, in sage.game_theory.catalog_normal_form_games.Chicken
Failed example:
    g.obtain_nash()
Expected:
    [[(0, 1), (1, 0)], [(99/101, 2/101), (99/101, 2/101)],
     [(1, 0), (0, 1)]]
Got:
    [[(99/101, 2/101), (99/101, 2/101)]]
**********************************************************************
File "src/sage/game_theory/catalog_normal_form_games.py", line 910, in sage.game_theory.catalog_normal_form_games.TravellersDilemma
Failed example:
    g.obtain_nash() # optional - lrslib
Expected:
    [[(0, 0, 0, 0, 0, 0, 0, 0, 1), (0, 0, 0, 0, 0, 0, 0, 0, 1)]]
Got:
    []
**********************************************************************
File "src/sage/game_theory/catalog_normal_form_games.py", line 928, in sage.game_theory.catalog_normal_form_games.TravellersDilemma
Failed example:
    g.obtain_nash()
Expected:
    [[(0, 0, 0, 1), (0, 0, 0, 1)]]
Got:
    []
**********************************************************************
File "src/sage/geometry/polyhedron/base.py", line 3683, in sage.geometry.polyhedron.base.Polyhedron_base._volume_lrs
Failed example:
    polytopes.hypercube(3)._volume_lrs() #optional - lrslib
Expected:
    8.0
Got:
    1.3333333333333333
**********************************************************************
File "src/sage/geometry/polyhedron/base.py", line 3685, in sage.geometry.polyhedron.base.Polyhedron_base._volume_lrs
Failed example:
    (polytopes.hypercube(3)*2)._volume_lrs() #optional - lrslib
Expected:
    64.0
Got:
    10.666666666666666
**********************************************************************
File "src/sage/geometry/polyhedron/base.py", line 3687, in sage.geometry.polyhedron.base.Polyhedron_base._volume_lrs
Failed example:
    polytopes.twenty_four_cell()._volume_lrs() #optional - lrslib
Expected:
    2.0
Got:
    0.020833333333333332
**********************************************************************
File "src/sage/geometry/polyhedron/base.py", line 3758, in sage.geometry.polyhedron.base.Polyhedron_base.volume
Failed example:
    I3.volume(engine='lrs') #optional - lrslib
Expected:
    8.0
Got:
    1.3333333333333333
**********************************************************************
File "src/sage/geometry/polyhedron/base.py", line 3761, in sage.geometry.polyhedron.base.Polyhedron_base.volume
Failed example:
    C24.volume(engine='lrs') #optional - lrslib
Expected:
    2.0
Got:
    0.020833333333333332
**********************************************************************
File "src/sage/game_theory/normal_form_game.py", line 299, in sage.game_theory.normal_form_game
Failed example:
    f.obtain_nash()
Expected:
    [[(0, 0, 1), (0, 1)]]   
Got:
    []
**********************************************************************
File "src/sage/game_theory/normal_form_game.py", line 442, in sage.game_theory.normal_form_game
Failed example:
    g.obtain_nash(algorithm='lrs') # optional - lrslib
Expected:
    [[(0, 0, 0, 0, 0, 0, 0, 0, 1), (0, 0, 0, 0, 0, 0, 0, 0, 1)]]
Got:
    []
**********************************************************************
File "src/sage/game_theory/normal_form_game.py", line 530, in sage.game_theory.normal_form_game
Failed example:
    degenerate_game.obtain_nash(algorithm='lrs') # optional - lrslib
Expected:
    [[(0, 1/3, 2/3), (1/3, 2/3)], [(1, 0, 0), (1/2, 3)], [(1, 0, 0), (1, 3)]]
Got:
    []
**********************************************************************
File "src/sage/game_theory/normal_form_game.py", line 1215, in sage.game_theory.normal_form_game.NormalFormGame.obtain_nash
Failed example:
    g.obtain_nash(algorithm='lrs') # optional - lrslib
Expected:
    [[(0, 0, 0, 1), (0, 0, 1)]]
Got:
    []
**********************************************************************
File "src/sage/game_theory/normal_form_game.py", line 1217, in sage.game_theory.normal_form_game.NormalFormGame.obtain_nash
Failed example:
    g.obtain_nash(algorithm='lrs', maximization=False) # optional - lrslib
Expected:
    [[(2/3, 1/12, 1/4, 0), (6333/8045, 247/8045, 293/1609)], [(3/4, 0, 1/4, 0), (0, 11/307, 296/307)], [(5/6, 1/6, 0, 0), (98/99, 1/99, 0)]]
Got:
    [[(2/3, 1/12, 1/4, 0), (6333/8045, 247/8045, 293/1609)]]
**********************************************************************
File "src/sage/game_theory/normal_form_game.py", line 1245, in sage.game_theory.normal_form_game.NormalFormGame.obtain_nash
Failed example:
    g.obtain_nash(algorithm='lrs')  # optional - lrslib
Expected:
    [[(0, 0, 3/4, 1/4), (1/28, 27/28, 0)]]
Got:
    []
**********************************************************************
File "src/sage/game_theory/normal_form_game.py", line 1265, in sage.game_theory.normal_form_game.NormalFormGame.obtain_nash
Failed example:
    fivegame.obtain_nash(algorithm='lrs') # optional - lrslib
Expected:
    [[(1, 0, 0, 0, 0), (0, 1, 0, 0, 0)]]
Got:
    []
**********************************************************************
File "src/sage/game_theory/normal_form_game.py", line 1290, in sage.game_theory.normal_form_game.NormalFormGame.obtain_nash
Failed example:
    [[type(s) for s in eq] for eq in lrs_eqs]  # optional - lrslib
Expected:
    [[<type 'tuple'>, <type 'tuple'>], [<type 'tuple'>, <type 'tuple'>], [<type 'tuple'>, <type 'tuple'>]]
Got:
    [[<type 'tuple'>, <type 'tuple'>]]
**********************************************************************
File "src/sage/game_theory/normal_form_game.py", line 1301, in sage.game_theory.normal_form_game.NormalFormGame.obtain_nash
Failed example:
    lrs_eqs == enumeration_eqs  # optional - lrslib
Expected:
    True
Got:
    False
**********************************************************************
File "src/sage/game_theory/normal_form_game.py", line 1354, in sage.game_theory.normal_form_game.NormalFormGame._solve_lrs
Failed example:
    C._solve_lrs() # optional - lrslib
Expected:
    [[(0, 1), (0, 1)]]
Got:
    []
**********************************************************************
File "src/sage/game_theory/normal_form_game.py", line 1370, in sage.game_theory.normal_form_game.NormalFormGame._solve_lrs
Failed example:
    biggame._solve_lrs() # optional - lrslib
Expected:
    [[(0, 0, 0, 20/21, 1/21), (11/12, 0, 0, 1/12, 0)]]
Got:
    []
**********************************************************************
File "src/sage/game_theory/normal_form_game.py", line 1382, in sage.game_theory.normal_form_game.NormalFormGame._solve_lrs
Failed example:
    biggame._solve_lrs() # optional - lrslib
Expected:
    [[(0, 1, 0), (1, 0, 0)],
     [(1/3, 2/3, 0), (0, 1/6, 5/6)],
     [(1/3, 2/3, 0), (1/7, 0, 6/7)],
     [(1, 0, 0), (0, 0, 1)]]
Got:
    []
**********************************************************************
File "src/sage/game_theory/normal_form_game.py", line 1545, in sage.game_theory.normal_form_game.NormalFormGame._solve_enumeration
Failed example:
    N.obtain_nash(algorithm='lrs')  # optional - lrslib
Expected:
    [[(0, 1), (0, 1)], [(2/3, 1/3), (0, 1)], [(1, 0), (1, 0)]]
Got:
    [[(2/3, 1/3), (0, 1)]]  
**********************************************************************
File "src/sage/game_theory/normal_form_game.py", line 1957, in sage.game_theory.normal_form_game.NormalFormGame.is_degenerate
Failed example:
    d_game.obtain_nash(algorithm='lrs') # optional - lrslib
Expected:
    [[(0, 0, 1, 0), (0, 1, 0, 0)],
     [(17/29, 0, 0, 12/29), (0, 0, 42/73, 31/73)],
     [(122/145, 0, 23/145, 0), (0, 1, 0, 0)]]
Got:
    []
**********************************************************************
File "src/sage/game_theory/parser.py", line 157, in sage.game_theory.parser.Parser.format_lrs
Failed example:
    lrs_output[5:16]  # optional - lrslib
Expected:
    ['\n',
     '***** 4 4 rational\n',
     '2  0  1  2 \n',
     '1  1/2  1/2 -2 \n',   
     '\n',
     '2  0  1  2 \n',
     '1  0  1 -2 \n',
     '\n',
     '\n',
     '*Number of equilibria found: 2\n',
     '*Player 1: vertices=3 bases=3 pivots=5\n']
Got:
    ['\n',
     '***** 4 4 rational\n',
     '2  0  1  2 \n',
     '1  1/2  1/2 -2 \n',   
     '\n',
     '\n',
     'V#1 R#0 B#1 h=0 facets  3 4 I#2 det= 2  in_det= 2  z= 0 \n',
     '*Number of equilibria found: 1\n',
     '*Player 1: vertices=1 bases=1 pivots=4\n',
     '*Player 2: vertices=1 bases=1 pivots=3\n',
     '*nash:lrslib v.6.2 2016.3.28(64bit,lrsgmp.h)\n']
**********************************************************************
File "src/sage/game_theory/parser.py", line 174, in sage.game_theory.parser.Parser.format_lrs
Failed example:
    nasheq  # optional - lrslib
Expected:
    [[(1/2, 1/2), (0, 1)], [(0, 1), (0, 1)]]
Got:
    [[(1/2, 1/2), (0, 1)]]  
**********************************************************************
File "src/sage/game_theory/parser.py", line 197, in sage.game_theory.parser.Parser.format_lrs
Failed example:
    print(lrs_output[5:20])  # optional - lrslib
Expected:
    ['\n',
     '***** 5 5 rational\n',
     '2  1/7  0  6/7  23/7 \n',
     '2  0  1/6  5/6  10/3 \n',
     '1  1/3  2/3  0  1 \n',
     '\n',
     '2  0  0  1  5 \n',
     '1  1  0  0  9 \n',
     '\n',
     '2  1  0  0  5 \n',
     '1  0  1  0  6 \n',
     '\n',
     '\n',
     '*Number of equilibria found: 4\n',
     '*Player 1: vertices=6 bases=7 pivots=10\n']
Got:
    ['\n', '***** 5 5 rational\n', '2  1/7  0  6/7  23/7 \n', '\n', 'V#1 R#0 B#1 h=0 facets  6 I#1 det= 14  in_det= 14  z= 0 1  1/3  2/3  0  1 \n', '\n', '\n', 'V#1 R#0 B#1 h=0 facets  4 5 6 I#4 det= 414  in_det= 414  z= 0 \n', '*Number of equilibria found: 1\n', '*Player 1: vertices=1 bases=1 pivots=5\n', '*Player 2: vertices=1 bases=1 pivots=5\n', '*nash:lrslib v.6.2 2016.3.28(64bit,lrsgmp.h)\n']
**********************************************************************
File "src/sage/game_theory/parser.py", line 215, in sage.game_theory.parser.Parser.format_lrs
Failed example:
    sorted(nasheq)  # optional - lrslib
Expected:
    [[(0, 1, 0), (1, 0, 0)],
     [(1/3, 2/3, 0), (0, 1/6, 5/6)],
     [(1/3, 2/3, 0), (1/7, 0, 6/7)],
     [(1, 0, 0), (0, 0, 1)]]
Got:
    []
**********************************************************************

Fixed in new lrslib version:
https://github.com/mkoeppe/lrslib/releases/download/lrslib-062%2Bautotools-2016-09-08/lrslib-062.autotools-2016-09-08.tar.gz (download into upstream and rename to lrslib-062+autotools-2016-09-08.tar.gz)

CC: @mkoeppe

Component: packages: optional

Keywords: sdl

Author: Matthias Koeppe

Branch/Commit: 963c748

Reviewer: Jeroen Demeyer, Thierry Monteil

Issue created by migration from https://trac.sagemath.org/ticket/21451

@jdemeyer jdemeyer added this to the sage-7.4 milestone Sep 8, 2016
@jdemeyer

This comment has been minimized.

@sagetrac-tmonteil
Copy link
Mannequin

sagetrac-tmonteil mannequin commented Sep 8, 2016

comment:3

I can reproduce the problem too (while running the tests with almost all optional spkgs installed for SageDebianLive) !

@mkoeppe
Copy link
Member

mkoeppe commented Sep 8, 2016

comment:4

I can confirm that it's broken. I'm working on a fix.

@mkoeppe
Copy link
Member

mkoeppe commented Sep 8, 2016

@mkoeppe
Copy link
Member

mkoeppe commented Sep 11, 2016

Author: Matthias Koeppe

@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe changed the title lrslib totally broken on 32-bit systems Upgrade lrslib to fix total brokenness on 32-bit systems Sep 11, 2016
@mkoeppe
Copy link
Member

mkoeppe commented Sep 11, 2016

@mkoeppe
Copy link
Member

mkoeppe commented Sep 11, 2016

Commit: 963c748

@mkoeppe
Copy link
Member

mkoeppe commented Sep 11, 2016

New commits:

963c748Upgrade lrslib to 062+autotools-2016-09-08

@jdemeyer
Copy link
Author

Reviewer: Jeroen Demeyer

@jdemeyer
Copy link
Author

Replying to @jdemeyer:

rename to lrslib-062+autotools-2016-09-08.tar.gz

I doubt that this step will be acceptable. Better make the tarball with correct name in the first place, or change the version number in Sage to 062.autotools-2016-09-08

@jdemeyer
Copy link
Author

comment:10

It seems that this indeed works on 32-bit systems. I am going to set this to positive_review but you are still encouraged to do something about the naming of the tarball.

@sagetrac-tmonteil
Copy link
Mannequin

sagetrac-tmonteil mannequin commented Sep 13, 2016

comment:11

Note that i am also currently testing it (will take a few hours).

@sagetrac-tmonteil
Copy link
Mannequin

sagetrac-tmonteil mannequin commented Sep 14, 2016

Changed reviewer from Jeroen Demeyer to Jeroen Demeyer, Thierry Monteil

@sagetrac-tmonteil
Copy link
Mannequin

sagetrac-tmonteil mannequin commented Sep 14, 2016

comment:12

Works also for me (spkg-check + test long), both on 32 and 64 bits !

@vbraun
Copy link
Member

vbraun commented Sep 16, 2016

Changed branch from u/mkoeppe/lrslib_totally_broken_on_32_bit_systems to 963c748

@sagetrac-tmonteil
Copy link
Mannequin

sagetrac-tmonteil mannequin commented Aug 27, 2019

Changed keywords from none to sdl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants