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

Unstable doctests in equivariant Ehrhart methods #33850

Closed
mkoeppe opened this issue May 13, 2022 · 17 comments
Closed

Unstable doctests in equivariant Ehrhart methods #33850

mkoeppe opened this issue May 13, 2022 · 17 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented May 13, 2022

From https://groups.google.com/g/sage-release/c/GOGWk66zaCQ/m/ToJcX-bxAAAJ:

On Ubuntu with a bunch of optional packages installed, I am getting the following failures due to pynormaliz:

Using --optional=bliss,coxeter3,database_knotinfo,debian,dot2tex,e_antic,fricas,gap_packages,kenzo,libsemigroups,lidia,meataxe,normaliz,pip,pynormaliz,sage,sage_spkg,sirocco,tides
Features to be detected: 4ti2,benzene,bliss,buckygen,conway_polynomials,csdp,database_cremona_ellcurve,database_cremona_mini_ellcurve,database_jones_numfield,database_knotinfo,dvipng,gfan,graphviz,imagemagick,jupymake,kenzo,latte_int,lrslib,mcqd,meataxe,nauty,palp,pandoc,pdf2svg,pdftocairo,plantri,polytopes_db,polytopes_db_4d,pynormaliz,python_igraph,rubiks,sage.combinat,sage.geometry.polyhedron,sage.graphs,sage.groups,sage.plot,sage.rings.number_field,sage.rings.padics,sage.rings.real_double,sage.symbolic,sage_numerical_backends_coin,sagemath_doc_html,sphinx,tdlib

sage -t --warn-long 40.4 --random-seed=39360907713219164614940484824980321981 src/sage/geometry/polyhedron/base_QQ.py  # 8 doctests failed
sage -t --warn-long 40.4 --random-seed=39360907713219164614940484824980321981 src/sage/geometry/polyhedron/backend_normaliz.py  # 7 doctests failed

CC: @tscrim @braunmath @sophiasage @jplab @yuan-zhou

Component: geometry

Author: Sophia Elia

Branch/Commit: 938a6b4

Reviewer: Matthias Koeppe

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

@mkoeppe mkoeppe added this to the sage-9.7 milestone May 13, 2022
@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 13, 2022

comment:1

I also see these failures on macOS with homebrew

@sophiasage
Copy link
Mannequin

sophiasage mannequin commented May 13, 2022

comment:2

I am seeing if I can get the doctest failures - building develop on macOS.

@sophiasage
Copy link
Mannequin

sophiasage mannequin commented May 20, 2022

Branch: public/33850

@sophiasage
Copy link
Mannequin

sophiasage mannequin commented May 20, 2022

New commits:

39cf556first changes. simplified rational example in fixed_subpolytopes.

@sophiasage
Copy link
Mannequin

sophiasage mannequin commented May 20, 2022

Commit: 39cf556

@sophiasage
Copy link
Mannequin

sophiasage mannequin commented May 20, 2022

comment:4

I'm beginning to work on fixing these failures. My major mistake is that a polytope's restricted_automorphism_group doesn't have a consistent generators or order of elements.

@sagetrac-tmonteil
Copy link
Mannequin

sagetrac-tmonteil mannequin commented May 24, 2022

comment:5

If it can help, i got such failure on Debian GNU/Linux too, with Sage 9.6, here is the whole log:

$ ./sage -t --long --random-seed=306453312432639962747126026414206033489 src/sage/geometry/polyhedron/backend_normaliz.py
Running doctests with ID 2022-05-24-04-51-23-f308a720.
Git branch: develop
Using --optional=4ti2,barvinok,benzene,bliss,buckygen,cbc,ccache,coxeter3,cryptominisat,csdp,cunningham_tables,cylp,d3js,debian,debugpy,dot2tex,e_antic,fricas,frobby,gap_jupyter,gap_packages,glucose,igraph,info,isl,kenzo,latte_int,libogg,libsemigroups,lidia,lrslib,mathics,mathics_scanner,mcqd,meataxe,mpfrcx,ninja_build,normaliz,notedown,palettable,pandoc_attributes,pari_elldata,pari_galpol,pari_jupyter,pari_nftables,pari_seadata,perl_term_readline_gnu,pint,pip,plantri,polylib,pycosat,pycryptosat,pynormaliz,pysingular,python_igraph,rubiks,saclib,sage,sage_numerical_backends_coin,sage_spkg,singular_jupyter,sip,sirocco,symengine,symengine_py,tdlib,texttable,tides,topcom
Features to be detected: 4ti2,benzene,bliss,buckygen,conway_polynomials,csdp,database_cremona_ellcurve,database_cremona_mini_ellcurve,database_jones_numfield,database_knotinfo,dvipng,gfan,graphviz,imagemagick,jupymake,kenzo,latte_int,lrslib,mcqd,meataxe,nauty,palp,pandoc,pdf2svg,pdftocairo,phitigra,plantri,polytopes_db,polytopes_db_4d,pynormaliz,python_igraph,rubiks,sage.combinat,sage.geometry.polyhedron,sage.graphs,sage.groups,sage.plot,sage.rings.number_field,sage.rings.padics,sage.rings.real_double,sage.symbolic,sage_numerical_backends_coin,sagemath_doc_html,sphinx,tdlib
Doctesting 1 file.
sage -t --long --warn-long 57.8 --random-seed=306453312432639962747126026414206033489 src/sage/geometry/polyhedron/backend_normaliz.py
**********************************************************************
File "src/sage/geometry/polyhedron/backend_normaliz.py", line 2299, in sage.geometry.polyhedron.backend_normaliz.Polyhedron_QQ_normaliz._Hstar_function_normaliz
Failed example:
    G = K.subgroup(gens = [K[6]]); G                                      # optional - pynormaliz
Expected:
    Subgroup generated by [(0,2)(1,3)(4,6)(5,7)] of (Permutation Group with generators [(2,4)(3,5), (1,2)(5,6), (0,1)(2,3)(4,5)(6,7), (0,7)(1,3)(2,5)(4,6)])
Got:
    Subgroup generated by [(0,4)(1,5)(2,6)(3,7)] of (Permutation Group with generators [(2,4)(3,5), (1,2)(5,6), (0,1)(2,3)(4,5)(6,7)])
**********************************************************************
File "src/sage/geometry/polyhedron/backend_normaliz.py", line 2303, in sage.geometry.polyhedron.backend_normaliz.Polyhedron_QQ_normaliz._Hstar_function_normaliz
Failed example:
    list(Dict.keys())[0]                                                  # optional - pynormaliz
Expected:
    (0,2)(1,3)(4,6)(5,7)
Got:
    (0,4)(1,5)(2,6)(3,7)
**********************************************************************
File "src/sage/geometry/polyhedron/backend_normaliz.py", line 2305, in sage.geometry.polyhedron.backend_normaliz.Polyhedron_QQ_normaliz._Hstar_function_normaliz
Failed example:
    list(Dict.values())[0]                                                # optional - pynormaliz
Expected:
    [-1  0  1  0]
    [ 0  1  0  0]
    [ 0  0  1  0]
    [ 0  0  0  1]
Got:
    [ 1  0 -1  0]
    [ 0  1 -1  0]
    [ 0  0 -1  0]
    [ 0  0  0  1]
**********************************************************************
File "src/sage/geometry/polyhedron/backend_normaliz.py", line 2508, in sage.geometry.polyhedron.backend_normaliz.Polyhedron_QQ_normaliz._is_effective_normaliz
Failed example:
    H = G.subgroup(gens=[G.gens()[1],G.gens()[2]])             # optional - pynormaliz
Exception raised:
    Traceback (most recent call last):
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/doctest/forker.py", line 695, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/doctest/forker.py", line 1093, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.geometry.polyhedron.backend_normaliz.Polyhedron_QQ_normaliz._is_effective_normaliz[2]>", line 1, in <module>
        H = G.subgroup(gens=[G.gens()[Integer(1)],G.gens()[Integer(2)]])             # optional - pynormaliz
    IndexError: list index out of range
**********************************************************************
File "src/sage/geometry/polyhedron/backend_normaliz.py", line 2509, in sage.geometry.polyhedron.backend_normaliz.Polyhedron_QQ_normaliz._is_effective_normaliz
Failed example:
    H.order()                                                  # optional - pynormaliz
Exception raised:
    Traceback (most recent call last):
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/doctest/forker.py", line 695, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/doctest/forker.py", line 1093, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.geometry.polyhedron.backend_normaliz.Polyhedron_QQ_normaliz._is_effective_normaliz[3]>", line 1, in <module>
        H.order()                                                  # optional - pynormaliz
    NameError: name 'H' is not defined
**********************************************************************
File "src/sage/geometry/polyhedron/backend_normaliz.py", line 2511, in sage.geometry.polyhedron.backend_normaliz.Polyhedron_QQ_normaliz._is_effective_normaliz
Failed example:
    [Hstar, Hlin] = [p2.Hstar_function(H), p2.Hstar_function(H, output = 'Hstar_as_lin_comb')] # optional - pynormaliz
Exception raised:
    Traceback (most recent call last):
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/doctest/forker.py", line 695, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/doctest/forker.py", line 1093, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.geometry.polyhedron.backend_normaliz.Polyhedron_QQ_normaliz._is_effective_normaliz[4]>", line 1, in <module>
        [Hstar, Hlin] = [p2.Hstar_function(H), p2.Hstar_function(H, output = 'Hstar_as_lin_comb')] # optional - pynormaliz
    NameError: name 'H' is not defined
**********************************************************************
File "src/sage/geometry/polyhedron/backend_normaliz.py", line 2512, in sage.geometry.polyhedron.backend_normaliz.Polyhedron_QQ_normaliz._is_effective_normaliz
Failed example:
    p2._is_effective_normaliz(Hstar,Hlin)                # optional - pynormaliz
Exception raised:
    Traceback (most recent call last):
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/doctest/forker.py", line 695, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/doctest/forker.py", line 1093, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.geometry.polyhedron.backend_normaliz.Polyhedron_QQ_normaliz._is_effective_normaliz[5]>", line 1, in <module>
        p2._is_effective_normaliz(Hstar,Hlin)                # optional - pynormaliz
    NameError: name 'Hstar' is not defined
**********************************************************************
2 items had failures:
   3 of  17 in sage.geometry.polyhedron.backend_normaliz.Polyhedron_QQ_normaliz._Hstar_function_normaliz
   4 of  13 in sage.geometry.polyhedron.backend_normaliz.Polyhedron_QQ_normaliz._is_effective_normaliz
    [405 tests, 7 failures, 8.58 s]
----------------------------------------------------------------------
sage -t --long --warn-long 57.8 --random-seed=306453312432639962747126026414206033489 src/sage/geometry/polyhedron/backend_normaliz.py  # 7 doctests failed
----------------------------------------------------------------------
Total time for all tests: 8.8 seconds
    cpu time: 9.9 seconds
    cumulative wall time: 8.6 seconds
Features detected for doctesting: palp,sage.plot,sage.rings.number_field

and

$ ./pynormaliz sage -t --long --random-seed=306453312432639962747126026414206033489 src/sage/geometry/polyhedron/base_QQ.py
bash: ./pynormaliz: No such file or directory
sagemath@debian:/opt/sagemath/sage-9.6$ ./sage -t --long --random-seed=306453312432639962747126026414206033489 src/sage/geometry/polyhedron/base_QQ.py
Running doctests with ID 2022-05-24-05-19-07-df42a70d.
Git branch: develop
Using --optional=4ti2,barvinok,benzene,bliss,buckygen,cbc,ccache,coxeter3,cryptominisat,csdp,cunningham_tables,cylp,d3js,debian,debugpy,dot2tex,e_antic,fricas,frobby,gap_jupyter,gap_packages,glucose,igraph,info,isl,kenzo,latte_int,libogg,libsemigroups,lidia,lrslib,mathics,mathics_scanner,mcqd,meataxe,mpfrcx,ninja_build,normaliz,notedown,palettable,pandoc_attributes,pari_elldata,pari_galpol,pari_jupyter,pari_nftables,pari_seadata,perl_term_readline_gnu,pint,pip,plantri,polylib,pycosat,pycryptosat,pynormaliz,pysingular,python_igraph,rubiks,saclib,sage,sage_numerical_backends_coin,sage_spkg,singular_jupyter,sip,sirocco,symengine,symengine_py,tdlib,texttable,tides,topcom
Features to be detected: 4ti2,benzene,bliss,buckygen,conway_polynomials,csdp,database_cremona_ellcurve,database_cremona_mini_ellcurve,database_jones_numfield,database_knotinfo,dvipng,gfan,graphviz,imagemagick,jupymake,kenzo,latte_int,lrslib,mcqd,meataxe,nauty,palp,pandoc,pdf2svg,pdftocairo,phitigra,plantri,polytopes_db,polytopes_db_4d,pynormaliz,python_igraph,rubiks,sage.combinat,sage.geometry.polyhedron,sage.graphs,sage.groups,sage.plot,sage.rings.number_field,sage.rings.padics,sage.rings.real_double,sage.symbolic,sage_numerical_backends_coin,sagemath_doc_html,sphinx,tdlib
Doctesting 1 file.
sage -t --long --warn-long 57.8 --random-seed=306453312432639962747126026414206033489 src/sage/geometry/polyhedron/base_QQ.py
**********************************************************************
File "src/sage/geometry/polyhedron/base_QQ.py", line 869, in sage.geometry.polyhedron.base_QQ.Polyhedron_QQ.fixed_subpolytope
Failed example:
    G = P.restricted_automorphism_group(output = 'permutation');G  # optional - pynormaliz
Expected:
    Permutation Group with generators [(1,2), (0,1)(2,3), (0,3)]
Got:
    Permutation Group with generators [(1,2), (0,1)(2,3)]
**********************************************************************
File "src/sage/geometry/polyhedron/base_QQ.py", line 1049, in sage.geometry.polyhedron.base_QQ.Polyhedron_QQ.Hstar_function
Failed example:
    G = K.subgroup(gens = [K[6]]); G                                       # optional - pynormaliz
Expected:
    Subgroup generated by [(0,2)(1,3)(4,6)(5,7)] of (Permutation Group with generators [(2,4)(3,5), (1,2)(5,6), (0,1)(2,3)(4,5)(6,7), (0,7)(1,3)(2,5)(4,6)])
Got:
    Subgroup generated by [(0,4)(1,5)(2,6)(3,7)] of (Permutation Group with generators [(2,4)(3,5), (1,2)(5,6), (0,1)(2,3)(4,5)(6,7)])
**********************************************************************
File "src/sage/geometry/polyhedron/base_QQ.py", line 1053, in sage.geometry.polyhedron.base_QQ.Polyhedron_QQ.Hstar_function
Failed example:
    list(Dict.keys())[0]                                                   # optional - pynormaliz
Expected:
    (0,2)(1,3)(4,6)(5,7)
Got:
    (0,4)(1,5)(2,6)(3,7)
**********************************************************************
File "src/sage/geometry/polyhedron/base_QQ.py", line 1055, in sage.geometry.polyhedron.base_QQ.Polyhedron_QQ.Hstar_function
Failed example:
    list(Dict.values())[0]                                                 # optional - pynormaliz
Expected:
    [-1  0  1  0]
    [ 0  1  0  0]
    [ 0  0  1  0]
    [ 0  0  0  1]
Got:
    [ 1  0 -1  0]
    [ 0  1 -1  0]
    [ 0  0 -1  0]
    [ 0  0  0  1]
**********************************************************************
File "src/sage/geometry/polyhedron/base_QQ.py", line 1171, in sage.geometry.polyhedron.base_QQ.Polyhedron_QQ.is_effective
Failed example:
    H = G.subgroup(gens=[G.gens()[1],G.gens()[2]])             # optional - pynormaliz
Exception raised:
    Traceback (most recent call last):
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/doctest/forker.py", line 695, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/doctest/forker.py", line 1093, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.geometry.polyhedron.base_QQ.Polyhedron_QQ.is_effective[2]>", line 1, in <module>
        H = G.subgroup(gens=[G.gens()[Integer(1)],G.gens()[Integer(2)]])             # optional - pynormaliz
    IndexError: list index out of range
**********************************************************************
File "src/sage/geometry/polyhedron/base_QQ.py", line 1172, in sage.geometry.polyhedron.base_QQ.Polyhedron_QQ.is_effective
Failed example:
    H.order()                                                  # optional - pynormaliz
Exception raised:
    Traceback (most recent call last):
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/doctest/forker.py", line 695, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/doctest/forker.py", line 1093, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.geometry.polyhedron.base_QQ.Polyhedron_QQ.is_effective[3]>", line 1, in <module>
        H.order()                                                  # optional - pynormaliz
    NameError: name 'H' is not defined
**********************************************************************
File "src/sage/geometry/polyhedron/base_QQ.py", line 1174, in sage.geometry.polyhedron.base_QQ.Polyhedron_QQ.is_effective
Failed example:
    [Hstar, Hlin] = [p2.Hstar_function(H), p2.Hstar_function(H, output = 'Hstar_as_lin_comb')] # optional - pynormaliz
Exception raised:
    Traceback (most recent call last):
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/doctest/forker.py", line 695, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/doctest/forker.py", line 1093, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.geometry.polyhedron.base_QQ.Polyhedron_QQ.is_effective[4]>", line 1, in <module>
        [Hstar, Hlin] = [p2.Hstar_function(H), p2.Hstar_function(H, output = 'Hstar_as_lin_comb')] # optional - pynormaliz
    NameError: name 'H' is not defined
**********************************************************************
File "src/sage/geometry/polyhedron/base_QQ.py", line 1175, in sage.geometry.polyhedron.base_QQ.Polyhedron_QQ.is_effective
Failed example:
    p2.is_effective(Hstar,Hlin)   # optional - pynormaliz
Exception raised:
    Traceback (most recent call last):
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/doctest/forker.py", line 695, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/opt/sagemath/sage-9.6/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/sage/doctest/forker.py", line 1093, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.geometry.polyhedron.base_QQ.Polyhedron_QQ.is_effective[5]>", line 1, in <module>
        p2.is_effective(Hstar,Hlin)   # optional - pynormaliz
    NameError: name 'Hstar' is not defined
**********************************************************************
3 items had failures:
   3 of  17 in sage.geometry.polyhedron.base_QQ.Polyhedron_QQ.Hstar_function
   1 of  18 in sage.geometry.polyhedron.base_QQ.Polyhedron_QQ.fixed_subpolytope
   4 of  13 in sage.geometry.polyhedron.base_QQ.Polyhedron_QQ.is_effective
    [181 tests, 8 failures, 2.34 s]
----------------------------------------------------------------------
sage -t --long --warn-long 57.8 --random-seed=306453312432639962747126026414206033489 src/sage/geometry/polyhedron/base_QQ.py  # 8 doctests failed
----------------------------------------------------------------------
Total time for all tests: 2.5 seconds
    cpu time: 2.2 seconds
    cumulative wall time: 2.3 seconds
Features detected for doctesting: 

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 30, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

e2b9b0ffixing doctests in baseQQ and backendnormaliz

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 30, 2022

Changed commit from 39cf556 to e2b9b0f

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 30, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

938a6b4rewrote tests that were dependent on ording of conjugacy classes representatives

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 30, 2022

Changed commit from e2b9b0f to 938a6b4

@sophiasage
Copy link
Mannequin

sophiasage mannequin commented May 30, 2022

comment:8

I think that I've addressed the failures now. To test, I have been running
sage -t --optional=all the_file.py. Is there anything else I should do to test?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 30, 2022

comment:9

Tests also pass here, on macOS with python3.8

@mkoeppe mkoeppe modified the milestones: sage-9.7, sage-9.8 Sep 19, 2022
@sophiasage sophiasage mannequin added the s: needs review label Sep 27, 2022
@tscrim
Copy link
Collaborator

tscrim commented Sep 28, 2022

comment:12

Since tests pass and this is now in needs review, should this be positive review?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 28, 2022

Reviewer: Matthias Koeppe

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 28, 2022

Author: Sophia Elia

@vbraun
Copy link
Member

vbraun commented Sep 29, 2022

Changed branch from public/33850 to 938a6b4

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