Opened 5 years ago

Closed 5 years ago

Last modified 2 years ago

#21451 closed defect (fixed)

Upgrade lrslib to fix total brokenness on 32-bit systems

Reported by: jdemeyer Owned by:
Priority: blocker Milestone: sage-7.4
Component: packages: optional Keywords: sdl
Cc: mkoeppe Merged in:
Authors: Matthias Koeppe Reviewers: Jeroen Demeyer, Thierry Monteil
Report Upstream: N/A Work issues:
Branch: 963c748 (Commits, GitHub, GitLab) Commit: 963c74805b819024adfd1446c89f5769e2bebb50
Dependencies: Stopgaps:

Status badges

Description (last modified by mkoeppe)

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)

Change History (14)

comment:1 Changed 5 years ago by jdemeyer

  • Description modified (diff)

comment:2 Changed 5 years ago by jdemeyer

  • Cc mkoeppe added

comment:3 Changed 5 years ago by tmonteil

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

comment:4 Changed 5 years ago by mkoeppe

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

comment:6 Changed 5 years ago by mkoeppe

  • Authors set to Matthias Koeppe
  • Description modified (diff)
  • Summary changed from lrslib totally broken on 32-bit systems to Upgrade lrslib to fix total brokenness on 32-bit systems

comment:7 Changed 5 years ago by mkoeppe

  • Branch set to u/mkoeppe/lrslib_totally_broken_on_32_bit_systems

comment:8 Changed 5 years ago by mkoeppe

  • Commit set to 963c74805b819024adfd1446c89f5769e2bebb50
  • Status changed from new to needs_review

New commits:

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

comment:9 in reply to: ↑ description Changed 5 years ago by jdemeyer

  • Reviewers set to Jeroen Demeyer
  • Status changed from needs_review to needs_work

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

Last edited 5 years ago by jdemeyer (previous) (diff)

comment:10 Changed 5 years ago by jdemeyer

  • Status changed from needs_work to positive_review

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.

comment:11 Changed 5 years ago by tmonteil

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

comment:12 Changed 5 years ago by tmonteil

  • Reviewers changed from Jeroen Demeyer to Jeroen Demeyer, Thierry Monteil

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

comment:13 Changed 5 years ago by vbraun

  • Branch changed from u/mkoeppe/lrslib_totally_broken_on_32_bit_systems to 963c74805b819024adfd1446c89f5769e2bebb50
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:14 Changed 2 years ago by tmonteil

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