Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Cannot use radau #183

Closed
ktitimbo opened this issue Jan 23, 2024 · 2 comments
Closed

Cannot use radau #183

ktitimbo opened this issue Jan 23, 2024 · 2 comments
Labels

Comments

@ktitimbo
Copy link

ktitimbo commented Jan 23, 2024

I keep getting the following error every time I tried to use radau() in my Mac. The code runs smoothly on windows, but no in mac (silicon)

ERROR: Cannot find method(s) for radau! I've tried to loadODESolvers(), but it didn't work. Please check ODEInterface.help_solversupport() and call loadODESolvers and check also this output. For further information see also ODEInterface.help_install.


Stacktrace:
  [1] getAllMethodPtrs(dlname::String)
    @ ODEInterface ~/.julia/packages/ODEInterface/RwRLn/src/DLSolvers.jl:245
  [2] radau_impl(rhs::Function, t0::Float64, T::Float64, x0::Vector{…}, opt::ODEInterface.OptionsODE, args::ODEInterface.RadauArguments{…})
    @ ODEInterface ~/.julia/packages/ODEInterface/RwRLn/src/Radau.jl:770
  [3] radau(rhs::Function, t0::Float64, T::Float64, x0::Vector{Float64}, opt::ODEInterface.OptionsODE)
    @ ODEInterface ~/.julia/packages/ODEInterface/RwRLn/src/Radau.jl:744
  [4] __solve(prob::ODEProblem{…}, alg::radau{…}, timeseries::Vector{…}, ts::Vector{…}, ks::Vector{…}; saveat::Float64, verbose::Bool, save_everystep::Bool, save_on::Bool, save_start::Bool, timeseries_errors::Bool, dense_errors::Bool, callback::Nothing, alias_u0::Bool, kwargs::@Kwargs{…})
    @ ODEInterfaceDiffEq ~/.julia/packages/ODEInterfaceDiffEq/EIV4j/src/solve.jl:144
  [5] __solve (repeats 2 times)
    @ ~/.julia/packages/ODEInterfaceDiffEq/EIV4j/src/solve.jl:1 [inlined]
  [6] solve_call(_prob::ODEProblem{…}, args::radau{…}; merge_callbacks::Bool, kwargshandle::Nothing, kwargs::@Kwargs{…})
    @ DiffEqBase ~/.julia/packages/DiffEqBase/eLhx9/src/solve.jl:609
  [7] solve_call
    @ DiffEqBase ~/.julia/packages/DiffEqBase/eLhx9/src/solve.jl:567 [inlined]
  [8] #solve_up#42
    @ DiffEqBase ~/.julia/packages/DiffEqBase/eLhx9/src/solve.jl:1058 [inlined]
  [9] solve_up
    @ DiffEqBase ~/.julia/packages/DiffEqBase/eLhx9/src/solve.jl:1044 [inlined]
 [10] #solve#40
    @ DiffEqBase ~/.julia/packages/DiffEqBase/eLhx9/src/solve.jl:981 [inlined]
 [11] batch_func(i::Int64, prob::EnsembleProblem{…}, alg::radau{…}; kwargs::@Kwargs{…})
    @ SciMLBase ~/.julia/packages/SciMLBase/slQep/src/ensemble/basic_ensemble_solve.jl:186
 [12] batch_func
    @ ~/.julia/packages/SciMLBase/slQep/src/ensemble/basic_ensemble_solve.jl:173 [inlined]
 [13] #583
    @ ~/.julia/packages/SciMLBase/slQep/src/ensemble/basic_ensemble_solve.jl:240 [inlined]
 [14] responsible_map
    @ ~/.julia/packages/SciMLBase/slQep/src/ensemble/basic_ensemble_solve.jl:233 [inlined]
 [15] solve_batch(prob::EnsembleProblem{…}, alg::radau{…}, ::EnsembleSerial, II::UnitRange{…}, pmap_batch_size::Int64; kwargs::@Kwargs{…})
    @ SciMLBase ~/.julia/packages/SciMLBase/slQep/src/ensemble/basic_ensemble_solve.jl:239
 [16] solve_batch
    @ ~/.julia/packages/SciMLBase/slQep/src/ensemble/basic_ensemble_solve.jl:238 [inlined]
 [17] solve_batch(prob::EnsembleProblem{…}, alg::radau{…}, ensemblealg::EnsembleThreads, II::UnitRange{…}, pmap_batch_size::Int64; kwargs::@Kwargs{…})
    @ SciMLBase ~/.julia/packages/SciMLBase/slQep/src/ensemble/basic_ensemble_solve.jl:249
 [18] solve_batch
    @ ~/.julia/packages/SciMLBase/slQep/src/ensemble/basic_ensemble_solve.jl:245 [inlined]
 [19] macro expansion
    @ ./timing.jl:395 [inlined]
 [20] (::SciMLBase.var"#576#577"{Int64, Int64, Int64, @Kwargs{…}, EnsembleProblem{…}, radau{…}, EnsembleThreads})()
    @ SciMLBase ~/.julia/packages/SciMLBase/slQep/src/ensemble/basic_ensemble_solve.jl:140
 [21] with_logstate(f::Function, logstate::Any)
    @ Base.CoreLogging ./logging.jl:515
 [22] with_logger
    @ ./logging.jl:627 [inlined]
 [23] __solve(prob::EnsembleProblem{…}, alg::radau{…}, ensemblealg::EnsembleThreads; trajectories::Int64, batch_size::Int64, progress_aggregate::Bool, pmap_batch_size::Int64, kwargs::@Kwargs{…})
    @ SciMLBase ~/.julia/packages/SciMLBase/slQep/src/ensemble/basic_ensemble_solve.jl:124
 [24] #solve#44
    @ DiffEqBase ~/.julia/packages/DiffEqBase/eLhx9/src/solve.jl:1074 [inlined]
 [25] macro expansion
    @ ./timing.jl:279 [inlined]
 [26] top-level scope

caused by: AssertionError: (dlSolversInfo[dlname]).error === nothing
Stacktrace:
  [1] getAllMethodPtrs(dlname::String)
    @ ODEInterface ~/.julia/packages/ODEInterface/RwRLn/src/DLSolvers.jl:237
  [2] radau_impl(rhs::Function, t0::Float64, T::Float64, x0::Vector{…}, opt::ODEInterface.OptionsODE, args::ODEInterface.RadauArguments{…})
    @ ODEInterface ~/.julia/packages/ODEInterface/RwRLn/src/Radau.jl:770
  [3] radau(rhs::Function, t0::Float64, T::Float64, x0::Vector{Float64}, opt::ODEInterface.OptionsODE)
    @ ODEInterface ~/.julia/packages/ODEInterface/RwRLn/src/Radau.jl:744
  [4] __solve(prob::ODEProblem{…}, alg::radau{…}, timeseries::Vector{…}, ts::Vector{…}, ks::Vector{…}; saveat::Float64, verbose::Bool, save_everystep::Bool, save_on::Bool, save_start::Bool, timeseries_errors::Bool, dense_errors::Bool, callback::Nothing, alias_u0::Bool, kwargs::@Kwargs{…})
    @ ODEInterfaceDiffEq ~/.julia/packages/ODEInterfaceDiffEq/EIV4j/src/solve.jl:144
  [5] __solve (repeats 2 times)
    @ ~/.julia/packages/ODEInterfaceDiffEq/EIV4j/src/solve.jl:1 [inlined]
  [6] solve_call(_prob::ODEProblem{…}, args::radau{…}; merge_callbacks::Bool, kwargshandle::Nothing, kwargs::@Kwargs{…})
    @ DiffEqBase ~/.julia/packages/DiffEqBase/eLhx9/src/solve.jl:609
  [7] solve_call
    @ DiffEqBase ~/.julia/packages/DiffEqBase/eLhx9/src/solve.jl:567 [inlined]
  [8] #solve_up#42
    @ DiffEqBase ~/.julia/packages/DiffEqBase/eLhx9/src/solve.jl:1058 [inlined]
  [9] solve_up
    @ DiffEqBase ~/.julia/packages/DiffEqBase/eLhx9/src/solve.jl:1044 [inlined]
 [10] #solve#40
    @ DiffEqBase ~/.julia/packages/DiffEqBase/eLhx9/src/solve.jl:981 [inlined]
 [11] batch_func(i::Int64, prob::EnsembleProblem{…}, alg::radau{…}; kwargs::@Kwargs{…})
    @ SciMLBase ~/.julia/packages/SciMLBase/slQep/src/ensemble/basic_ensemble_solve.jl:186
 [12] batch_func
    @ ~/.julia/packages/SciMLBase/slQep/src/ensemble/basic_ensemble_solve.jl:173 [inlined]
 [13] #583
    @ ~/.julia/packages/SciMLBase/slQep/src/ensemble/basic_ensemble_solve.jl:240 [inlined]
 [14] responsible_map
    @ ~/.julia/packages/SciMLBase/slQep/src/ensemble/basic_ensemble_solve.jl:233 [inlined]
 [15] solve_batch(prob::EnsembleProblem{…}, alg::radau{…}, ::EnsembleSerial, II::UnitRange{…}, pmap_batch_size::Int64; kwargs::@Kwargs{…})
    @ SciMLBase ~/.julia/packages/SciMLBase/slQep/src/ensemble/basic_ensemble_solve.jl:239
 [16] solve_batch
    @ ~/.julia/packages/SciMLBase/slQep/src/ensemble/basic_ensemble_solve.jl:238 [inlined]
 [17] solve_batch(prob::EnsembleProblem{…}, alg::radau{…}, ensemblealg::EnsembleThreads, II::UnitRange{…}, pmap_batch_size::Int64; kwargs::@Kwargs{…})
    @ SciMLBase ~/.julia/packages/SciMLBase/slQep/src/ensemble/basic_ensemble_solve.jl:249
 [18] solve_batch
    @ ~/.julia/packages/SciMLBase/slQep/src/ensemble/basic_ensemble_solve.jl:245 [inlined]
 [19] macro expansion
    @ ./timing.jl:395 [inlined]
 [20] (::SciMLBase.var"#576#577"{Int64, Int64, Int64, @Kwargs{…}, EnsembleProblem{…}, radau{…}, EnsembleThreads})()
    @ SciMLBase ~/.julia/packages/SciMLBase/slQep/src/ensemble/basic_ensemble_solve.jl:140
 [21] with_logstate(f::Function, logstate::Any)
    @ Base.CoreLogging ./logging.jl:515
 [22] with_logger
    @ ./logging.jl:627 [inlined]
 [23] __solve(prob::EnsembleProblem{…}, alg::radau{…}, ensemblealg::EnsembleThreads; trajectories::Int64, batch_size::Int64, progress_aggregate::Bool, pmap_batch_size::Int64, kwargs::@Kwargs{…})
    @ SciMLBase ~/.julia/packages/SciMLBase/slQep/src/ensemble/basic_ensemble_solve.jl:124
 [24] #solve#44
    @ DiffEqBase ~/.julia/packages/DiffEqBase/eLhx9/src/solve.jl:1074 [inlined]
 [25] macro expansion
    @ ./timing.jl:279 [inlined]
 [26] top-level scope

Ideally i want to solve
solve(ensemblevNE, radau(), EnsembleThreads(), trajectories=nI)

when I run ODEInterface.loadODESolvers() I obtained (see below) which make me think could be a compatibility issue due to all the i32.

Dict{AbstractString, ODEInterface.SolverDLinfo} with 23 entries:
  "colnew_i32"  => SolverDLinfo("colnew_i32", "", Ptr{Nothing} @0x0000000000000000, (), UndefVarError(:libcolnew_i32_handle))
  "radau_i32"   => SolverDLinfo("radau_i32", "", Ptr{Nothing} @0x0000000000000000, (), UndefVarError(:libradau_i32_handle))
  "bvpsol"      => SolverDLinfo("bvpsol", "", Ptr{Nothing} @0x0000000000000000, (), UndefVarError(:libbvpsol_handle))
  "seulex"      => SolverDLinfo("seulex", "", Ptr{Nothing} @0x0000000000000000, (), UndefVarError(:libseulex_handle))
  "odex_i32"    => SolverDLinfo("odex_i32", "", Ptr{Nothing} @0x0000000000000000, (), UndefVarError(:libodex_i32_handle))
  "seulex_i32"  => SolverDLinfo("seulex_i32", "", Ptr{Nothing} @0x0000000000000000, (), UndefVarError(:libseulex_i32_handle))
  "bvp_m_proxy" => SolverDLinfo("bvp_m_proxy", "", Ptr{Nothing} @0x0000000000000000, (), UndefVarError(:libbvp_m_proxy_handle))
  "dopri5_i32"  => SolverDLinfo("dopri5_i32", "", Ptr{Nothing} @0x0000000000000000, (), UndefVarError(:libdopri5_i32_handle))
  "radau5_i32"  => SolverDLinfo("radau5_i32", "", Ptr{Nothing} @0x0000000000000000, (), UndefVarError(:libradau5_i32_handle))
  "ddeabm_i32"  => SolverDLinfo("ddeabm_i32", "", Ptr{Nothing} @0x0000000000000000, (), UndefVarError(:libddeabm_i32_handle))
  "colnew"      => SolverDLinfo("colnew", "", Ptr{Nothing} @0x0000000000000000, (), UndefVarError(:libcolnew_handle))
  "rodas_i32"   => SolverDLinfo("rodas_i32", "", Ptr{Nothing} @0x0000000000000000, (), UndefVarError(:librodas_i32_handle))
  "ddebdf_i32"  => SolverDLinfo("ddebdf_i32", "", Ptr{Nothing} @0x0000000000000000, (), UndefVarError(:libddebdf_i32_handle))
  "radau"       => SolverDLinfo("radau", "", Ptr{Nothing} @0x0000000000000000, (), UndefVarError(:libradau_handle))
  "dop853_i32"  => SolverDLinfo("dop853_i32", "", Ptr{Nothing} @0x0000000000000000, (), UndefVarError(:libdop853_i32_handle))
  "rodas"       => SolverDLinfo("rodas", "", Ptr{Nothing} @0x0000000000000000, (), UndefVarError(:librodas_handle))

Any workaround for this issue?

@ktitimbo ktitimbo added the bug label Jan 23, 2024
@ktitimbo
Copy link
Author

additional info:

julia> versioninfo()
Julia Version 1.10.0
Commit 3120989f39b (2023-12-25 18:01 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin22.4.0)
  CPU: 12 × Apple M2 Pro
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
  Threads: 1 on 8 virtual cores
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 

@ChrisRackauckas
Copy link
Member

This is a duplicate issue and on the wrong repository. Let's keep the discussion to ODEInterfaceDiffEq.jl.

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

No branches or pull requests

2 participants