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

Cannot use DifferentialEquations on Mac M2 - ARM chip #50382

Closed
tpresser570 opened this issue Jul 1, 2023 · 10 comments
Closed

Cannot use DifferentialEquations on Mac M2 - ARM chip #50382

tpresser570 opened this issue Jul 1, 2023 · 10 comments

Comments

@tpresser570
Copy link

tpresser570 commented Jul 1, 2023

Cannot precompile DifferentialEquations.jl on mac m2. Have never seen this error before when loading and looks like its a problem with array handling wthin Sundials. Maybe CpuID? since that does not compile either for ARM chips? Attached a screenshot of output below and versioninfo().

Calling:

julia> using DifferentialEquations

Returns:

[ Info: Precompiling DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa]
WARNING: Method definition adapt_storage(Type{var"#s1"} where var"#s1"<:(StaticArraysCore.SArray{S, T, N, L} where L where N where T), Array{T, N} where N where T) where {S} in module AdaptStaticArraysExt at /Users/.julia/packages/Adapt/xviDc/ext/AdaptStaticArraysExt.jl:6 overwritten in module ArrayInterfaceStaticArraysCore at /Users/.julia/packages/ArrayInterfaceStaticArraysCore/4vyfn/src/ArrayInterfaceStaticArraysCore.jl:31.
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition adapt_storage(Type{var"#s1"} where var"#s1"<:(StaticArraysCore.SArray{S, T, N, L} where L where N where T), Array{T, N} where N where T) where {S} in module AdaptStaticArraysExt at /Users/.julia/packages/Adapt/xviDc/ext/AdaptStaticArraysExt.jl:6 overwritten in module ArrayInterfaceStaticArraysCore at /Users/.julia/packages/ArrayInterfaceStaticArraysCore/4vyfn/src/ArrayInterfaceStaticArraysCore.jl:31.
  ** incremental compilation may be fatally broken for this module **

ERROR: LoadError: UndefVarError: `libsundials_cvode` not defined
Stacktrace:
 [1] top-level scope
   @ ~/.julia/packages/Sundials/4gP3E/src/Sundials.jl:50
 [2] include
   @ ./Base.jl:457 [inlined]
 [3] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String)
   @ Base ./loading.jl:2045
 [4] top-level scope
   @ stdin:3
in expression starting at /Users/tylerpresser/.julia/packages/Sundials/4gP3E/src/Sundials.jl:3
in expression starting at stdin:3
ERROR: LoadError: Failed to precompile Sundials [c3572dad-4567-51f8-b174-8c6c989267f4] to "/Users/tylerpresser/.julia/compiled/v1.9/Sundials/jl_S2Owcx".
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
    @ Base ./loading.jl:2296
  [3] compilecache
    @ ./loading.jl:2163 [inlined]
  [4] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:1805
  [5] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1660
  [6] macro expansion
    @ ./loading.jl:1648 [inlined]
  [7] macro expansion
    @ ./lock.jl:267 [inlined]
  [8] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1611
  [9] include
    @ ./Base.jl:457 [inlined]
 [10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
    @ Base ./loading.jl:2045
 [11] top-level scope
    @ stdin:3
in expression starting at /Users/tylerpresser/.julia/packages/DifferentialEquations/yS3VA/src/DifferentialEquations.jl:1
in expression starting at stdin:3
ERROR: Failed to precompile DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa] to "/Users/.julia/compiled/v1.9/DifferentialEquations/jl_sPD2Yv".
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
    @ Base ./loading.jl:2296
  [3] compilecache
    @ ./loading.jl:2163 [inlined]
  [4] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:1805
  [5] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1660
  [6] macro expansion
    @ ./loading.jl:1648 [inlined]
  [7] macro expansion
    @ ./lock.jl:267 [inlined]
  [8] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1611
  [9] eval
    @ ./boot.jl:370 [inlined]
 [10] eval
    @ ./Base.jl:68 [inlined]
 [11] repleval(m::Module, code::Expr, #unused#::String)
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.47.2/scripts/packages/VSCodeServer/src/repl.jl:222
 [12] (::VSCodeServer.var"#107#109"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.47.2/scripts/packages/VSCodeServer/src/repl.jl:186
 [13] with_logstate(f::Function, logstate::Any)
    @ Base.CoreLogging ./logging.jl:514
 [14] with_logger
    @ ./logging.jl:626 [inlined]
 [15] (::VSCodeServer.var"#106#108"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
    @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.47.2/scripts/packages/VSCodeServer/src/repl.jl:187
 [16] #invokelatest#2
    @ ./essentials.jl:816 [inlined]
 [17] invokelatest(::Any)
    @ Base ./essentials.jl:813
 [18] macro expansion
    @ ~/.vscode/extensions/julialang.language-julia-1.47.2/scripts/packages/VSCodeServer/src/eval.jl:34 [inlined]
 [19] (::VSCodeServer.var"#61#62")()
    @ VSCodeServer ./task.jl:514

calling versioninfo():

Julia> versioninfo()
Julia Version 1.9.1
Commit 147bdf428cd (2023-06-07 08:27 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin22.4.0)
  CPU: 10 × Apple M2 Pro
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, apple-m1)
  Threads: 1 on 6 virtual cores
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 









@oscardssmith
Copy link
Member

the screenshot seems but to be attached

@tpresser570
Copy link
Author

tpresser570 commented Jul 1, 2023

@oscardssmith screenshot attached now

@oscardssmith
Copy link
Member

can you paste the full stacktrace of the error you get on using? the screenshot appears to be cutting off what the actual error is

@tpresser570
Copy link
Author

can you paste the full stacktrace of the error you get on using? the screenshot appears to be cutting off what the actual error is

Sorry about that, @oscardssmith, full stacktrace included now

@oscardssmith
Copy link
Member

Thanks!

@giordano
Copy link
Contributor

giordano commented Jul 1, 2023

As a general remark it's much better to copy-and-paste error messages (and format them as code with triple backticks):

  • it's more readable than a screenshot anyway
  • screenshots aren't searchable, people having your same problem won't be able to find this page by googling the same error message.

@tpresser570

This comment was marked as duplicate.

@giordano
Copy link
Contributor

giordano commented Jul 1, 2023

That's much better, thanks.

This isn't a problem in Julia itself, but in third-party packages. Anyway, what's the output of

]st -m DifferentialEquations Sundials Sundials_jll

in your environment?

@tpresser570
Copy link
Author

calling: ]st -m DifferentialEquations Sundials Sundials_jll

returns:

Status `~/Documents/GitHub/LambAIrt/Manifest.toml`
⌃ [0c46a032] DifferentialEquations v7.6.0
⌃ [c3572dad] Sundials v4.15.1
⌃ [fb77eaff] Sundials_jll v5.2.0+1
Info Packages marked with ⌃ have new versions available and may be upgradable.

@giordano
Copy link
Contributor

giordano commented Jul 1, 2023

You're using an old version of Sundials_jll. Update it to v5.2.1.

@giordano giordano closed this as not planned Won't fix, can't repro, duplicate, stale Jul 1, 2023
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

3 participants