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

Error with hashnextindex(::UInt32, ::Int64, ::UInt32) #39

Closed
iliailmer opened this issue Jul 30, 2022 · 3 comments
Closed

Error with hashnextindex(::UInt32, ::Int64, ::UInt32) #39

iliailmer opened this issue Jul 30, 2022 · 3 comments

Comments

@iliailmer
Copy link

Getting an error during a run of SIAN.jl, here is the full message:

ERROR: MethodError: no method matching hashnextindex(::UInt32, ::Int64, ::UInt32)
Closest candidates are:
  hashnextindex(::UInt32, ::UInt32, ::UInt32) at ~/.julia/packages/Groebner/XcPUi/src/f4/structs.jl:79
Stacktrace:
 [1] insert_plcms_in_basis_hash_table!(pairset::Groebner.Pairset, off::Int64, ht::Groebner.MonomialHashtable, update_ht::Groebner.MonomialHashtable, basis::Groebner.Basis{UInt64}, plcm::Vector{Int64}, ifirst::Int64, ilast::Int64)
   @ Groebner ~/.julia/packages/Groebner/XcPUi/src/f4/hash.jl:485
 [2] update_pairset!(pairset::Groebner.Pairset, basis::Groebner.Basis{UInt64}, ht::Groebner.MonomialHashtable, update_ht::Groebner.MonomialHashtable, idx::Int64, plcm::Vector{Int64})
   @ Groebner ~/.julia/packages/Groebner/XcPUi/src/f4/symbolic.jl:563
 [3] update!(pairset::Groebner.Pairset, basis::Groebner.Basis{UInt64}, ht::Groebner.MonomialHashtable, update_ht::Groebner.MonomialHashtable, plcm::Vector{Int64})
   @ Groebner ~/.julia/packages/Groebner/XcPUi/src/f4/symbolic.jl:697
 [4] f4!(ring::Groebner.PolyRing, basis::Groebner.Basis{UInt64}, ht::Groebner.MonomialHashtable, reduced::Bool, linalg::Symbol, rng::Random.MersenneTwister)
   @ Groebner ~/.julia/packages/Groebner/XcPUi/src/f4/f4.jl:634
 [5] groebner_ff(ring::Groebner.PolyRing, exps::Vector{Vector{Vector{UInt16}}}, coeffs::Vector{Vector{UInt64}}, reduced::Bool, meta::Groebner.GroebnerMetainfo{Random.MersenneTwister})
   @ Groebner ~/.julia/packages/Groebner/XcPUi/src/f4/groebner.jl:65
 [6] groebner(polynomials::Vector{Nemo.gfp_mpoly}; reduced::Bool, ordering::Symbol, certify::Bool, forsolve::Bool, linalg::Symbol, rng::Random.MersenneTwister, loglevel::Base.CoreLogging.LogLevel)
   @ Groebner ~/.julia/packages/Groebner/XcPUi/src/interface.jl:82
 [7] identifiability_ode(ode::ODE{fmpq_mpoly}, params_to_assess::Vector{fmpq_mpoly}; p::Float64, p_mod::Int64, nthrds::Int64, infolevel::Int64, weighted_ordering::Bool, local_only::Bool)
   @ SIAN ~/cuny/research/SIAN-Julia/SIAN/src/SIAN.jl:245
 [8] top-level scope
   @ REPL[9]:1

Here is the code to reproduce the error:

>using SIAN
>ode = @ODEmodel(
           s'(t) = mu - bi * s(t) * i(t) - bw * s(t) * w(t) - mu * s(t) + al * r(t),
           i'(t) = bw * s(t) * w(t) + bi * s(t) * i(t) - g * i(t) - mu * i(t),
           w'(t) = dz * (i(t) - w(t)),
           r'(t) = g * i(t) - mu * r(t) - al * r(t),
           y1(t) = k * i(t),
           y2(t) = i(t) + r(t) + s(t)
       )
>res = identifiability_ode(ode, get_parameters(ode); p=0.99, p_mod=2^29 - 3, weighted_ordering=true)

It seems that another version of hashnextindex(::UInt32, ::Int64, ::UInt32) is required?

@sumiya11
Copy link
Owner

sumiya11 commented Jul 30, 2022

Hi @iliailmer , for some reason I've ran identifiability_ode a couple of times and cannot reproduce the bug. I've hopefully fixed the issue in #40 though

I'll publish the new Groebner version now (v0.2.9); once it's online (I think it will happen in a couple of hours) could you please update Groebner and see if the issue is still there? Thanks !

@iliailmer
Copy link
Author

@sumiya11 Thanks, I will check it out when 0.2.9 is out.

@iliailmer
Copy link
Author

@sumiya11 Thank you, the update did fix the issue!

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

2 participants