Skip to content

Precompiling Reactant errors in GPU-related symbol #526

@Todorbsc

Description

@Todorbsc

CC @mofeing

I got this error while trying to update the version of Reactant.jl to a branch:

pkg> add Reactant#ss/split-invoke-call-rewrite
    Updating git-repo `https://github.com/EnzymeAD/Reactant.jl.git`
   Resolving package versions...
    Updating `<project-path>/Project.toml`
  [3c362404] ~ Reactant v0.2.18 `https://github.com/EnzymeAD/Reactant.jl.git#main`  v0.2.18 `https://github.com/EnzymeAD/Reactant.jl.git#ss/split-invoke-call-rewrite`
    Updating `<project-path>/Manifest.toml`
  [3c362404] ~ Reactant v0.2.18 `https://github.com/EnzymeAD/Reactant.jl.git#main`  v0.2.18 `https://github.com/EnzymeAD/Reactant.jl.git#ss/split-invoke-call-rewrite`
Precompiling project...
  ✗ Reactant
  ✗ Reactant  ReactantStatisticsExt
  ✗ Reactant  ReactantPythonCallExt
  ✗ Reactant  ReactantSpecialFunctionsExt
  ✗ Reactant  ReactantAbstractFFTsExt
  ✗ Reactant  ReactantOffsetArraysExt
  ✗ Reactant  ReactantYaoBlocksExt
  ✗ Tenet  TenetReactantExt
  0 dependencies successfully precompiled in 32 seconds. 382 already precompiled.
  8 dependencies errored.
  For a report of the errors see `julia> err`. To retry use `pkg> precompile`

julia> err
PkgPrecompileError: The following 8 direct dependencies failed to precompile:

ReactantSpecialFunctionsExt 

Failed to precompile ReactantSpecialFunctionsExt [5981d66b-43ae-5ef9-a655-fb5bed72485b] to "~/.julia/compiled/v1.11/ReactantSpecialFunctionsExt/jl_29LleC".
ERROR: LoadError: InitError: could not load library "~/.julia/artifacts/bf5c832056d192639a75739fc1016591bc1c64c5/lib/libReactantExtra.so"
~/.julia/artifacts/bf5c832056d192639a75739fc1016591bc1c64c5/lib/libReactantExtra.so: undefined symbol: cuStreamBeginCaptureToGraph
Stacktrace:
  [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
    @ Base.Libc.Libdl ./libdl.jl:120
  [2] dlopen(s::String, flags::UInt32)
    @ Base.Libc.Libdl ./libdl.jl:119
  [3] macro expansion
    @ ~/.julia/packages/JLLWrappers/GfYNv/src/products/library_generators.jl:63 [inlined]
  [4] __init__()
    @ Reactant_jll ~/.julia/packages/Reactant_jll/k7Xgx/src/wrappers/x86_64-linux-gnu-cxx11-gpu+cuda-mode+opt.jl:30
  [5] run_module_init(mod::Module, i::Int64)
    @ Base ./loading.jl:1336
  [6] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1324
  [7] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any}, ignore_native::Nothing; register::Bool)
    @ Base ./loading.jl:1213
  [8] _include_from_serialized (repeats 2 times)
    @ ./loading.jl:1169 [inlined]
  [9] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128, stalecheck::Bool; reasons::Dict{String, Int64}, DEPOT_PATH::Vector{String})
...

It can be temporarily solved by adding this to LocalPreferences.toml:

[Reactant_jll]
gpu = "none"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions