Skip to content

Trixi forcing downgrades when using Enzyme.jl, Zygote.jl, SciMLsensitivity.jl #2157

@erny123

Description

@erny123

Xpost: https://discourse.julialang.org/t/scimlsensitivity-jl-precompile-error-because-of-enzyme/122561/9

Trying to follow along this the SciMLSensitivity.jl tutorial:

Parameter Estimation of Ordinary Differential Equations · SciMLSensitivity.jl

If anyone has any idea what's going on, I'd appreciate it.

Julia version: Version 1.11.1 (2024-10-16)

When looking for Enzyme.jl version:

] status Enzyme

Status ~/TRIXI/Project.toml ⌅ [7da242da] Enzyme v0.11.20 Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use 'status --outdated'

and

status --outdated
Status `~/TRIXI/Project.toml`
⌅ [7da242da] Enzyme v0.11.20 (<v0.13.14): SciMLSensitivity
⌃ [7ed4a6bd] LinearSolve v2.22.1 (<v2.36.2)
⌅ [7f7a1694] Optimization v3.19.3 (<v4.0.5): OptimizationOptimJL, OptimizationOptimisers, OptimizationPolyalgorithms
⌃ [500b13db] OptimizationPolyalgorithms v0.1.2 (<v0.3.0)
⌃ [1dea7af3] OrdinaryDiffEq v6.66.0 (<v6.90.1)
⌃ [1ed8b502] SciMLSensitivity v7.51.0 (<v7.71.1)

When using Pkg.add:

Pkg.add("OrdinaryDiffEq")
Pkg.add("Trixi")
Pkg.add("Plots")
Pkg.add("LinearSolve")
Pkg.add("LaTeXStrings")
Pkg.add("LinearAlgebra")
Pkg.add("Enzyme")
Pkg.add("Optimization")
Pkg.add("OptimizationPolyalgorithms")
Pkg.add("SciMLSensitivity")
Pkg.add("Zygote")

I get many errors but most being due to Enzym.jl :

0 dependencies successfully precompiled in 25 seconds. 496 already precompiled. 7 dependencies errored. For a report of the errors see `julia> err`. To retry use `pkg> precompile` Resolving package versions... Updating `[~/TRIXI/Project.toml](http://127.0.0.1:8888/lab/tree/TRIXI/TRIXI/Project.toml)` [37e2e46d] + LinearAlgebra v1.11.0 No Changes to `[~/TRIXI/Manifest.toml](http://127.0.0.1:8888/lab/tree/TRIXI/TRIXI/Manifest.toml)` Precompiling project... ✗ Enzyme ✗ Enzyme → EnzymeSpecialFunctionsExt ✗ DiffEqBase → DiffEqBaseEnzymeExt ✗ Optimization → OptimizationEnzymeExt ✗ LinearSolve → LinearSolveEnzymeExt ✗ SparseDiffTools → SparseDiffToolsEnzymeExt ✗ SciMLSensitivity 0 dependencies successfully precompiled in 22 seconds. 496 already precompiled. 7 dependencies errored. For a report of the errors see `julia> err`. To retry use `pkg> precompile`

And then using :

using OrdinaryDiffEq
using Trixi
using Plots
using LaTeXStrings
using LinearSolve
using LinearAlgebra
using Optimization
using OptimizationPolyalgorithms 
using SciMLSensitivity
using Zygote
[ Info: Precompiling IJuliaExt [2f4121a4-3b3a-5ce6-9c5e-1f2673ce168a] 
[ Info: Precompiling SciMLSensitivity [1ed8b502-d754-442c-8d5d-10ac956f44a1] (cache misses: wrong dep version loaded (2))
ERROR: LoadError: InitError: type Nothing has no field major
Stacktrace:
  [1] getproperty
    @ ./Base.jl:49 [inlined]
  [2] __init__()
    @ GPUCompiler ~/.julia/packages/GPUCompiler/U36Ed/src/GPUCompiler.jl:64
  [3] run_module_init(mod::Module, i::Int64)
    @ Base ./loading.jl:1336
  [4] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1324
  [5] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any}, ignore_native::Nothing; register::Bool)
    @ Base ./loading.jl:1213
  [6] _include_from_serialized (repeats 2 times)
    @ ./loading.jl:1169 [inlined]
  [7] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128, stalecheck::Bool; reasons::Dict{String, Int64}, DEPOT_PATH::Vector{String})
    @ Base ./loading.jl:1985
  [8] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2450
  [9] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2315
 [10] #invoke_in_world#3
    @ ./essentials.jl:1089 [inlined]
 [11] invoke_in_world
    @ ./essentials.jl:1086 [inlined]
 [12] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2302
 [13] macro expansion
    @ ./loading.jl:2241 [inlined]
 [14] macro expansion
    @ ./lock.jl:273 [inlined]
 [15] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2198
 [16] #invoke_in_world#3
    @ ./essentials.jl:1089 [inlined]
 [17] invoke_in_world
    @ ./essentials.jl:1086 [inlined]
 [18] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2191
 [19] include(mod::Module, _path::String)
    @ Base ./Base.jl:557
 [20] include(x::String)
    @ Enzyme ~/.julia/packages/Enzyme/l4FS0/src/Enzyme.jl:1
 [21] top-level scope
    @ ~/.julia/packages/Enzyme/l4FS0/src/Enzyme.jl:43
 [22] include
    @ ./Base.jl:557 [inlined]
 [23] 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:2790
 [24] top-level scope
    @ stdin:5
during initialization of module GPUCompiler
in expression starting at /home/evaldez/.julia/packages/Enzyme/l4FS0/src/typetree.jl:6
in expression starting at /home/evaldez/.julia/packages/Enzyme/l4FS0/src/Enzyme.jl:1
in expression starting at stdin:5
ERROR: LoadError: Failed to precompile Enzyme [7da242da-08ed-463a-9acd-ee780be4f1d9] to "/home/evaldez/.julia/compiled/v1.11/Enzyme/jl_oI4hIh".

Additionally when removing Trixi.jl

] rm Trixi
] update

allows everything to update properly.

then:

] add Trixi

gives the previous downgrades.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions