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

BigFloat precision issue on nightly #1687

Closed
lgoettgens opened this issue Nov 19, 2024 · 1 comment
Closed

BigFloat precision issue on nightly #1687

lgoettgens opened this issue Nov 19, 2024 · 1 comment

Comments

@lgoettgens
Copy link
Contributor

lgoettgens commented Nov 19, 2024

See https://github.com/oscar-system/Oscar.jl/actions/runs/11905577520/job/33176301244#step:10:538.

This error first showed up in Oscar's CI with Julia 1.12.0-DEV.1652, Commit c5899c2d54f and was not present with 1.12.0-DEV.1647, Commit fa880a730e3. Diff: JuliaLang/julia@fa880a7...c5899c2 (educated guess: JuliaLang/julia#55907)

However, the changes in nightly are probably unrelated. Instead, I assume that somewhere in the Hecke callstack is some wrong usage of setprecision that just came to the surface because of the nightly changes.

Enumeration of lattices with finite isometries: Error During Test at /home/runner/work/Oscar.jl/Oscar.jl/experimental/QuadFormAndIsom/test/runtests.jl:270
  Test threw exception
  Expression: length(enumerate_classes_of_lattices_with_isometry(E6, 9)) == 1
  TypeError: in typeassert, expected Union{Nothing, Base.ScopedValues.Scope}, got a value of type ZZRingElem
  Stacktrace:
    [1] get
      @ ./scopedvalues.jl:152 [inlined]
    [2] _precision_with_base_2
      @ ./mpfr.jl:1041 [inlined]
    [3] BigFloat
      @ ./mpfr.jl:150 [inlined]
    [4] _arf_get_mpfr(t::Nemo.arf_struct, ::RoundingMode{:Nearest})
      @ Nemo ~/.julia/packages/Nemo/0TzOv/src/arb/arb.jl:129
    [5] BigFloat
      @ ~/.julia/packages/Nemo/0TzOv/src/arb/arb.jl:91 [inlined]
    [6] BigFloat
      @ ~/.julia/packages/Nemo/0TzOv/src/arb/arb.jl:90 [inlined]
    [7] BigComplex(r::AcbFieldElem)
      @ Hecke ~/.julia/packages/Hecke/fQ8H5/src/HeckeTypes.jl:1285
    [8] conjugates_init(f_in::QQPolyRingElem)
      @ Hecke ~/.julia/packages/Hecke/fQ8H5/src/conjugates.jl:22
    [9] class_group_init(FB::Hecke.NfFactorBase, T::DataType; add_rels::Bool, use_aut::Bool)
      @ Hecke ~/.julia/packages/Hecke/fQ8H5/src/NumFieldOrd/NfOrd/Clgp/Ctx.jl:67
   [10] class_group_init
      @ ~/.julia/packages/Hecke/fQ8H5/src/NumFieldOrd/NfOrd/Clgp/Ctx.jl:52 [inlined]
   [11] class_group_init(O::AbsSimpleNumFieldOrder, B::Int64; min_size::Int64, add_rels::Bool, use_aut::Bool, complete::Bool, degree_limit::Int64, T::DataType)
      @ Hecke ~/.julia/packages/Hecke/fQ8H5/src/NumFieldOrd/NfOrd/Clgp/Ctx.jl:134
   [12] class_group_init
      @ ~/.julia/packages/Hecke/fQ8H5/src/NumFieldOrd/NfOrd/Clgp/Ctx.jl:117 [inlined]
   [13] class_group_ctx(O::AbsSimpleNumFieldOrder; bound::Int64, method::Int64, large::Int64, redo::Bool, use_aut::Bool)
      @ Hecke ~/.julia/packages/Hecke/fQ8H5/src/NumFieldOrd/NfOrd/Clgp.jl:103
   [14] class_group_ctx
      @ ~/.julia/packages/Hecke/fQ8H5/src/NumFieldOrd/NfOrd/Clgp.jl:89 [inlined]
   [15] _class_unit_group(O::AbsSimpleNumFieldOrder; saturate_at_2::Bool, bound::Int64, method::Int64, large::Int64, redo::Bool, unit_method::Int64, use_aut::Bool, GRH::Bool)
      @ Hecke ~/.julia/packages/Hecke/fQ8H5/src/NumFieldOrd/NfOrd/Clgp.jl:212
   [16] _class_unit_group
      @ ~/.julia/packages/Hecke/fQ8H5/src/NumFieldOrd/NfOrd/Clgp.jl:207 [inlined]
   [17] _unit_group_maximal(O::AbsSimpleNumFieldOrder; method::Int64, unit_method::Int64, use_aut::Bool, GRH::Bool)
      @ Hecke ~/.julia/packages/Hecke/fQ8H5/src/NumFieldOrd/NfOrd/Clgp.jl:454
   [18] _unit_group_maximal
      @ ~/.julia/packages/Hecke/fQ8H5/src/NumFieldOrd/NfOrd/Clgp.jl:453 [inlined]
   [19] unit_group(O::AbsSimpleNumFieldOrder; method::Int64, unit_method::Int64, use_aut::Bool, GRH::Bool)
      @ Hecke ~/.julia/packages/Hecke/fQ8H5/src/NumFieldOrd/NfOrd/Clgp.jl:470
   [20] unit_group
      @ ~/.julia/packages/Hecke/fQ8H5/src/NumFieldOrd/NfOrd/Clgp.jl:468 [inlined]
   [21] _non_norm_rep(E::Hecke.RelSimpleNumField{AbsSimpleNumFieldElem}, K::AbsSimpleNumField, p::AbsSimpleNumFieldOrderIdeal)
      @ Hecke ~/.julia/packages/Hecke/fQ8H5/src/QuadForm/Misc.jl:1062
   [22] _non_norm_rep
      @ ~/.julia/packages/Hecke/fQ8H5/src/QuadForm/Herm/Genus.jl:351 [inlined]
   [23] det_representative(G::HermLocalGenus{Hecke.RelSimpleNumField{AbsSimpleNumFieldElem}, AbsSimpleNumFieldOrderIdeal}, i::Int64)
      @ Hecke ~/.julia/packages/Hecke/fQ8H5/src/QuadForm/Herm/Genus.jl:464
   [24] gram_matrix(G::HermLocalGenus{Hecke.RelSimpleNumField{AbsSimpleNumFieldElem}, AbsSimpleNumFieldOrderIdeal}, l::Int64)
      @ Hecke ~/.julia/packages/Hecke/fQ8H5/src/QuadForm/Herm/Genus.jl:525
   [25] gram_matrix(G::HermLocalGenus{Hecke.RelSimpleNumField{AbsSimpleNumFieldElem}, AbsSimpleNumFieldOrderIdeal})
      @ Hecke ~/.julia/packages/Hecke/fQ8H5/src/QuadForm/Herm/Genus.jl:487
   [26] representative(G::HermLocalGenus{Hecke.RelSimpleNumField{AbsSimpleNumFieldElem}, AbsSimpleNumFieldOrderIdeal})
      @ Hecke ~/.julia/packages/Hecke/fQ8H5/src/QuadForm/Herm/Genus.jl:598
   [27] rescale
      @ ~/.julia/packages/Hecke/fQ8H5/src/QuadForm/Herm/Genus.jl:1896 [inlined]
   [28] rescale(G::HermGenus{Hecke.RelSimpleNumField{AbsSimpleNumFieldElem}, AbsSimpleNumFieldOrderIdeal, HermLocalGenus{Hecke.RelSimpleNumField{AbsSimpleNumFieldElem}, AbsSimpleNumFieldOrderIdeal}, Dict{InfPlc{AbsSimpleNumField, AbsSimpleNumFieldEmbedding}, Int64}}, a::ZZRingElem)
      @ Hecke ~/.julia/packages/Hecke/fQ8H5/src/QuadForm/Herm/Genus.jl:1915
   [29] representative(G::HermGenus{Hecke.RelSimpleNumField{AbsSimpleNumFieldElem}, AbsSimpleNumFieldOrderIdeal, HermLocalGenus{Hecke.RelSimpleNumField{AbsSimpleNumFieldElem}, AbsSimpleNumFieldOrderIdeal}, Dict{InfPlc{AbsSimpleNumField, AbsSimpleNumFieldEmbedding}, Int64}})
      @ Hecke ~/.julia/packages/Hecke/fQ8H5/src/QuadForm/Herm/Genus.jl:1646
   [30] representatives_of_hermitian_type(G::ZZGenus, chi::ZZPolyRingElem, fix_root::Bool; first::Bool)
      @ Oscar ~/work/Oscar.jl/Oscar.jl/experimental/QuadFormAndIsom/src/enumeration.jl:648
   [31] representatives_of_hermitian_type
      @ ~/work/Oscar.jl/Oscar.jl/experimental/QuadFormAndIsom/src/enumeration.jl:555 [inlined]
   [32] representatives_of_hermitian_type
      @ ~/work/Oscar.jl/Oscar.jl/experimental/QuadFormAndIsom/src/enumeration.jl:[534](https://github.com/oscar-system/Oscar.jl/actions/runs/11905577520/job/33176301244#step:10:537) [inlined]
   [33] splitting_of_hermitian_prime_power(Lf::ZZLatWithIsom, p::Int64; b::Int64, pA::Int64, nA::Int64, pB::Int64, nB::Int64, fix_root::Bool)
      @ Oscar ~/work/Oscar.jl/Oscar.jl/experimental/QuadFormAndIsom/src/enumeration.jl:730
   [34] splitting_of_hermitian_prime_power
      @ ~/work/Oscar.jl/Oscar.jl/experimental/QuadFormAndIsom/src/enumeration.jl:703 [inlined]
   [35] splitting_of_prime_power(Lf::ZZLatWithIsom, p::Int64, b::Int64; p_inv::Int64, n_inv::Int64, pB::Int64, nB::Int64, fix_root::Bool)
      @ Oscar ~/work/Oscar.jl/Oscar.jl/experimental/QuadFormAndIsom/src/enumeration.jl:800
   [36] splitting_of_prime_power
      @ ~/work/Oscar.jl/Oscar.jl/experimental/QuadFormAndIsom/src/enumeration.jl:774 [inlined]
   [37] enumerate_prime_power_isometries(L::ZZLat, q::Int64, vq::Int64)
      @ Oscar ~/work/Oscar.jl/Oscar.jl/experimental/QuadFormAndIsom/src/enumeration.jl:1045
   [38] enumerate_classes_of_lattices_with_isometry(L::ZZLat, order::Int64)
      @ Oscar ~/work/Oscar.jl/Oscar.jl/experimental/QuadFormAndIsom/src/enumeration.jl:1013
   [39] top-level scope
      @ ~/work/Oscar.jl/Oscar.jl/experimental/QuadFormAndIsom/test/runtests.jl:242
   [40] macro expansion
      @ /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.12/Test/src/Test.jl:1700 [inlined]
   [41] macro expansion
      @ ~/work/Oscar.jl/Oscar.jl/experimental/QuadFormAndIsom/test/runtests.jl:270 [inlined]
   [42] macro expansion
      @ /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.12/Test/src/Test.jl:676 [inlined]

A similar error can be observed in the Hecke CI as well, e.g. in https://github.com/thofma/Hecke.jl/actions/runs/11911761420/job/33199919246?pr=1685#step:6:167

isometry classes of spaces: Error During Test at /home/runner/work/Hecke.jl/Hecke.jl/test/QuadForm/Quad/Spaces.jl:385
  Test threw exception
  Expression: (Hecke._isisotropic_with_vector(gram_matrix(h)))[1]
  TypeError: in typeassert, expected Union{Nothing, Base.ScopedValues.Scope}, got a value of type Core.Const
  Stacktrace:
    [1] get
      @ ./scopedvalues.jl:152 [inlined]
    [2] rounding_raw
      @ ./mpfr.jl:241 [inlined]
    [3] BigFloat
      @ ./mpfr.jl:369 [inlined]
    [4] BigFloat(n::ZZRingElem)
      @ Nemo ~/.julia/packages/Nemo/0TzOv/src/flint/fmpz.jl:3028
    [5] _lifting_expo(p::Int64, deg_p::Int64, K::AbsSimpleNumField, bnd::Vector{ArbFieldElem})
      @ Hecke ~/work/Hecke.jl/Hecke.jl/src/NumFieldOrd/NfOrd/Hensel.jl:740
    [6] _roots_hensel(f::AbstractAlgebra.Generic.Poly{AbsSimpleNumFieldElem}; max_roots::Int64, ispure::Bool, is_normal::Bool, root_bound::Vector{ZZRingElem})
      @ Hecke ~/work/Hecke.jl/Hecke.jl/src/NumFieldOrd/NfOrd/Hensel.jl:258
    [7] _roots_hensel
      @ ~/work/Hecke.jl/Hecke.jl/src/NumFieldOrd/NfOrd/Hensel.jl:85 [inlined]
    [8] roots(f::AbstractAlgebra.Generic.Poly{AbsSimpleNumFieldElem}; max_roots::Int64, ispure::Bool, is_squarefree::Bool, is_normal::Bool)
      @ Hecke ~/work/Hecke.jl/Hecke.jl/src/NumField/NfAbs/Elem.jl:620
    [9] is_power(a::AbsSimpleNumFieldElem, n::Int64; with_roots_unity::Bool, is_integral::Bool, trager::Bool)
      @ Hecke ~/work/Hecke.jl/Hecke.jl/src/NumField/NfAbs/Elem.jl:696
   [10] is_power
      @ ~/work/Hecke.jl/Hecke.jl/src/NumField/NfAbs/Elem.jl:668 [inlined]
   [11] is_square_with_sqrt
      @ ~/work/Hecke.jl/Hecke.jl/src/NumField/NfAbs/Elem.jl:757 [inlined]
   [12] _isisotropic_with_vector(F::AbstractAlgebra.Generic.MatSpaceElem{AbsSimpleNumFieldElem})
      @ Hecke ~/work/Hecke.jl/Hecke.jl/src/QuadForm/Quad/Spaces.jl:1407
   [13] top-level scope
      @ ~/work/Hecke.jl/Hecke.jl/test/QuadForm/Quad/Spaces.jl:2
   [14] macro expansion
      @ /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.12/Test/src/Test.jl:[170](https://github.com/thofma/Hecke.jl/actions/runs/11911761420/job/33199919246?pr=1685#step:6:173)0 [inlined]
   [15] macro expansion
      @ ~/work/Hecke.jl/Hecke.jl/test/QuadForm/Quad/Spaces.jl:334 [inlined]
   [16] macro expansion
      @ /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.12/Test/src/Test.jl:1700 [inlined]
   [17] macro expansion
      @ ~/work/Hecke.jl/Hecke.jl/test/QuadForm/Quad/Spaces.jl:385 [inlined]
   [18] macro expansion
      @ /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.12/Test/src/Test.jl:676 [inlined]
   [19] macro expansion
      @ ~/work/Hecke.jl/Hecke.jl/test/QuadForm/Quad/Spaces.jl:385 [inlined]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant