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

Precompilation Warnings: Method overwriting is not permitted during Module precompile #13

Closed
prbzrg opened this issue Aug 27, 2023 · 1 comment · Fixed by #15
Closed
Labels

Comments

@prbzrg
Copy link

prbzrg commented Aug 27, 2023

│  WARNING: Method definition adapt_structure(Any, ComponentArrays.ComponentArray{T, N, A, Axes} where Axes<:Tuple{Vararg{ComponentArrays.AbstractAxis{IdxMap} where IdxMap}} where A<:AbstractArray{T, N} where N where T) in module LuxDeviceUtilsComponentArraysExt at /home/runner/.julia/packages/LuxDeviceUtils/JXQCg/ext/LuxDeviceUtilsComponentArraysExt.jl:6 overwritten in module ComponentArraysGPUArraysExt at /home/runner/.julia/packages/ComponentArrays/ehUwN/ext/ComponentArraysGPUArraysExt.jl:14.
│  ┌ Error: Error during loading of extension ComponentArraysGPUArraysExt of ComponentArrays, use `Base.retry_load_extensions()` to retry.
│  │   exception =
│  │    1-element ExceptionStack:
│  │    Method overwriting is not permitted during Module precompile.
│  │    Stacktrace:
│  │      [1] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::Nothing, depmods::Vector{Any})
│  │        @ Base ./loading.jl:1055
│  │      [2] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
│  │        @ Base ./loading.jl:1575
│  │      [3] _require(pkg::Base.PkgId, env::Nothing)
│  │        @ Base ./loading.jl:1932
│  │      [4] __require_prelocked(uuidkey::Base.PkgId, env::Nothing)
│  │        @ Base ./loading.jl:1806
│  │      [5] #invoke_in_world#3
│  │        @ Base ./essentials.jl:926 [inlined]
│  │      [6] invoke_in_world
│  │        @ Base ./essentials.jl:923 [inlined]
│  │      [7] _require_prelocked
│  │        @ Base ./loading.jl:1797 [inlined]
│  │      [8] _require_prelocked
│  │        @ Base ./loading.jl:1796 [inlined]
│  │      [9] run_extension_callbacks(extid::Base.ExtensionId)
│  │        @ Base ./loading.jl:1289
│  │     [10] run_extension_callbacks(pkgid::Base.PkgId)
│  │        @ Base ./loading.jl:1324
│  │     [11] run_package_callbacks(modkey::Base.PkgId)
│  │        @ Base ./loading.jl:1158
│  │     [12] _tryrequire_from_serialized(modkey::Base.PkgId, path::String, ocachepath::Nothing, sourcepath::String, depmods::Vector{Any})
│  │        @ Base ./loading.jl:1481
│  │     [13] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
│  │        @ Base ./loading.jl:1568
│  │     [14] _require(pkg::Base.PkgId, env::String)
│  │        @ Base ./loading.jl:1932
│  │     [15] __require_prelocked(uuidkey::Base.PkgId, env::String)
│  │        @ Base ./loading.jl:1806
│  │     [16] #invoke_in_world#3
│  │        @ Base ./essentials.jl:926 [inlined]
│  │     [17] invoke_in_world
│  │        @ Base ./essentials.jl:923 [inlined]
│  │     [18] _require_prelocked(uuidkey::Base.PkgId, env::String)
│  │        @ Base ./loading.jl:1797
│  │     [19] macro expansion
│  │        @ Base ./loading.jl:1[784](https://github.com/impICNF/ContinuousNormalizingFlows.jl/actions/runs/5989170796/job/16245077663?pr=277#step:6:788) [inlined]
│  │     [20] macro expansion
│  │        @ Base ./lock.jl:267 [inlined]
│  │     [21] __require(into::Module, mod::Symbol)
│  │        @ Base ./loading.jl:1747
│  │     [22] #invoke_in_world#3
│  │        @ Base ./essentials.jl:926 [inlined]
│  │     [23] invoke_in_world
│  │        @ Base ./essentials.jl:923 [inlined]
│  │     [24] require(into::Module, mod::Symbol)
│  │        @ Base ./loading.jl:1740
│  │     [25] include
│  │        @ Base ./Base.jl:494 [inlined]
│  │     [26] 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:2216
│  │     [27] top-level scope
│  │        @ stdin:3
│  │     [28] eval
│  │        @ Core ./boot.jl:383 [inlined]
│  │     [29] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
│  │        @ Base ./loading.jl:2070
│  │     [30] include_string
│  │        @ Base ./loading.jl:2080 [inlined]
│  │     [31] exec_options(opts::Base.JLOptions)
│  │        @ Base ./client.jl:315
│  │     [32] _start()
│  │        @ Base ./client.jl:552
│  └ @ Base loading.jl:1295
@avik-pal
Copy link
Member

avik-pal commented Sep 6, 2023

Thanks for pointing out, I noticed this as well. I will push an upstream fix for this. The main issue is CA.jl uses Adapt via GPUArrays so I had to push a quick patch in this repository but when GPUArrays is loaded then it leads to a method overwrite.

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

Successfully merging a pull request may close this issue.

2 participants