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

Precompile errors #2519

Closed
4 tasks done
huiyuxie opened this issue Oct 10, 2024 · 1 comment
Closed
4 tasks done

Precompile errors #2519

huiyuxie opened this issue Oct 10, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@huiyuxie
Copy link
Contributor

Sanity checks (read this first, then remove this section)

  • Make sure you're reporting a bug; for general questions, please use Discourse or
    Slack.

  • If you're dealing with a performance issue, make sure you disable scalar iteration
    (CUDA.allowscalar(false)). Only file an issue if that shows scalar iteration happening
    in CUDA.jl or Base Julia, as opposed to your own code.

  • If you're seeing an error message, follow the error message instructions, if any
    (e.g. inspect code with @device_code_warntype). If you can't solve the problem using
    that information, make sure to post it as part of the issue.

  • Always ensure you're using the latest version of CUDA.jl, and if possible, please
    check the master branch to see if your issue hasn't been resolved yet.

If your bug is still valid, please go ahead and fill out the template below.

Describe the bug

Using CUDA.jl as a dependency in my package results in precompilation errors.

To reproduce

Go package mode and run precompile

(TrixiCUDA) pkg> precompile
Precompiling project...
  ✗ CUDA
  ✗ CUDA  SpecialFunctionsExt
  ✗ MPI  CUDAExt
  ✗ ArrayInterface  ArrayInterfaceCUDAExt
  1 dependency successfully precompiled in 9 seconds. 272 already precompiled.

ERROR: The following 2 direct dependencies failed to precompile:

CUDA

Failed to precompile CUDA [052768ef-5323-5732-b1bb-66c8b64840ba] to "C:\\Users\\huiyu\\.julia\\compiled\\v1.11\\CUDA\\jl_6F04.tmp".
ERROR: LoadError: InitError: type Nothing has no field major
Stacktrace:
  [1] getproperty
    @ .\Base.jl:49 [inlined]
  [2] __init__()
    @ GPUCompiler C:\Users\huiyu\.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:1975
  [8] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:2435
  [9] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:2300
 [10] #invoke_in_world#3
    @ .\essentials.jl:1088 [inlined]
 [11] invoke_in_world
    @ .\essentials.jl:1085 [inlined]
 [12] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:2287
 [13] macro expansion
    @ .\loading.jl:2226 [inlined]
 [14] macro expansion
    @ .\lock.jl:273 [inlined]
 [15] __require(into::Module, mod::Symbol)
    @ Base .\loading.jl:2183
 [16] #invoke_in_world#3
    @ .\essentials.jl:1088 [inlined]
 [17] invoke_in_world
    @ .\essentials.jl:1085 [inlined]
 [18] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:2176
 [19] include
    @ .\Base.jl:557 [inlined]
 [20] 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:2806
 [21] top-level scope
    @ stdin:4
during initialization of module GPUCompiler
in expression starting at C:\Users\huiyu\.julia\packages\CUDA\rXson\src\CUDA.jl:1
in expression starting at stdin:4
SpecialFunctionsExt

Failed to precompile SpecialFunctionsExt [1285c0f1-ff9f-5867-b66e-0f359bcf09ba] to "C:\\Users\\huiyu\\.julia\\compiled\\v1.11\\SpecialFunctionsExt\\jl_73F9.tmp".      
ERROR: LoadError: InitError: type Nothing has no field major
Stacktrace:
  [1] getproperty
    @ .\Base.jl:49 [inlined]
  [2] __init__()
    @ GPUCompiler C:\Users\huiyu\.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:1975
  [8] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:2435
  [9] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:2300
 [10] #invoke_in_world#3
    @ .\essentials.jl:1088 [inlined]
 [11] invoke_in_world
    @ .\essentials.jl:1085 [inlined]
 [12] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:2287
 [13] macro expansion
    @ .\loading.jl:2226 [inlined]
 [14] macro expansion
    @ .\lock.jl:273 [inlined]
 [15] __require(into::Module, mod::Symbol)
    @ Base .\loading.jl:2183
 [16] #invoke_in_world#3
    @ .\essentials.jl:1088 [inlined]
 [17] invoke_in_world
    @ .\essentials.jl:1085 [inlined]
 [18] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:2176
 [19] include
    @ .\Base.jl:557 [inlined]
 [20] 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:2806
 [21] top-level scope
    @ stdin:4
during initialization of module GPUCompiler
in expression starting at C:\Users\huiyu\.julia\packages\CUDA\rXson\src\CUDA.jl:1
in expression starting at stdin:4
ERROR: LoadError: Failed to precompile CUDA [052768ef-5323-5732-b1bb-66c8b64840ba] to "C:\\Users\\huiyu\\.julia\\compiled\\v1.11\\CUDA\\jl_74CE.tmp".
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; flags::Cmd, cacheflags::Base.CacheFlags, reasons::Dict{String, Int64})
    @ Base .\loading.jl:3089
  [3] (::Base.var"#1081#1082"{Base.PkgId})()
    @ Base .\loading.jl:2477
  [4] mkpidlock(f::Base.var"#1081#1082"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile C:\Users\huiyu\.julia\juliaup\julia-1.11.0+0.x64.w64.mingw32\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:95
  [5] #mkpidlock#6
    @ C:\Users\huiyu\.julia\juliaup\julia-1.11.0+0.x64.w64.mingw32\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:90 [inlined]
  [6] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile C:\Users\huiyu\.julia\juliaup\julia-1.11.0+0.x64.w64.mingw32\share\julia\stdlib\v1.11\FileWatching\src\pidfile.jl:116
  [7] #invokelatest#2
    @ .\essentials.jl:1056 [inlined]
  [8] invokelatest
    @ .\essentials.jl:1051 [inlined]
  [9] maybe_cachefile_lock(f::Base.var"#1081#1082"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base .\loading.jl:3613
 [10] maybe_cachefile_lock
    @ .\loading.jl:3610 [inlined]
 [11] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:2473
 [12] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:2300
 [13] #invoke_in_world#3
    @ .\essentials.jl:1088 [inlined]
 [14] invoke_in_world
    @ .\essentials.jl:1085 [inlined]
 [15] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:2287
 [16] macro expansion
    @ .\loading.jl:2226 [inlined]
 [17] macro expansion
    @ .\lock.jl:273 [inlined]
 [18] __require(into::Module, mod::Symbol)
    @ Base .\loading.jl:2183
 [19] #invoke_in_world#3
    @ .\essentials.jl:1088 [inlined]
 [20] invoke_in_world
    @ .\essentials.jl:1085 [inlined]
 [21] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:2176
 [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::Nothing)
    @ Base .\loading.jl:2806
 [24] top-level scope
    @ stdin:4
in expression starting at C:\Users\huiyu\.julia\packages\CUDA\rXson\ext\SpecialFunctionsExt.jl:3
in expression starting at stdin:4
Manifest.toml

too long - run out of space

Expected behavior

Last week I tried to precompile with no errors but after updating something it shows errors now

Version info

Details on Julia:

julia> versioninfo()
Julia Version 1.11.0
Commit 501a4f25c2 (2024-10-07 11:40 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 20 × 13th Gen Intel(R) Core(TM) i9-13900H
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, goldmont)
Threads: 1 default, 0 interactive, 1 GC (on 20 virtual cores)

Details on CUDA:

julia> CUDA.versioninfo()
ERROR: UndefVarError: `CUDA` not defined in `Main`
Suggestion: check for spelling errors or missing imports.
Stacktrace:
 [1] top-level scope
   @ REPL[10]:1

julia> using CUDA
Precompiling CUDA...
Info Given CUDA was explicitly requested, output will be shown live
ERROR: LoadError: InitError: type Nothing has no field major
Stacktrace:
  [1] getproperty
    @ .\Base.jl:49 [inlined]
  [2] __init__()
    @ GPUCompiler C:\Users\huiyu\.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:1975
  [8] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:2435
  [9] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:2300
 [10] #invoke_in_world#3
    @ .\essentials.jl:1088 [inlined]
 [11] invoke_in_world
    @ .\essentials.jl:1085 [inlined]
 [12] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:2287
 [13] macro expansion
    @ .\loading.jl:2226 [inlined]
 [14] macro expansion
    @ .\lock.jl:273 [inlined]
 [15] __require(into::Module, mod::Symbol)
    @ Base .\loading.jl:2183
 [16] #invoke_in_world#3
    @ .\essentials.jl:1088 [inlined]
 [17] invoke_in_world
    @ .\essentials.jl:1085 [inlined]
 [18] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:2176
 [19] include
    @ .\Base.jl:557 [inlined]
 [20] 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:2806
 [21] top-level scope
    @ stdin:4
during initialization of module GPUCompiler
in expression starting at C:\Users\huiyu\.julia\packages\CUDA\rXson\src\CUDA.jl:1
in expression starting at stdin:4
  ✗ CUDA
  0 dependencies successfully precompiled in 2 seconds. 97 already precompiled.

ERROR: The following 1 direct dependency failed to precompile:

CUDA

Failed to precompile CUDA [052768ef-5323-5732-b1bb-66c8b64840ba] to "C:\\Users\\huiyu\\.julia\\compiled\\v1.11\\CUDA\\jl_694A.tmp".
ERROR: LoadError: InitError: type Nothing has no field major
Stacktrace:
  [1] getproperty
    @ .\Base.jl:49 [inlined]
  [2] __init__()
    @ GPUCompiler C:\Users\huiyu\.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:1975
  [8] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:2435
  [9] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:2300
 [10] #invoke_in_world#3
    @ .\essentials.jl:1088 [inlined]
 [11] invoke_in_world
    @ .\essentials.jl:1085 [inlined]
 [12] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:2287
 [13] macro expansion
    @ .\loading.jl:2226 [inlined]
 [14] macro expansion
    @ .\lock.jl:273 [inlined]
 [15] __require(into::Module, mod::Symbol)
    @ Base .\loading.jl:2183
 [16] #invoke_in_world#3
    @ .\essentials.jl:1088 [inlined]
 [17] invoke_in_world
    @ .\essentials.jl:1085 [inlined]
 [18] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:2176
 [19] include
    @ .\Base.jl:557 [inlined]
 [20] 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:2806
 [21] top-level scope
    @ stdin:4
during initialization of module GPUCompiler
in expression starting at C:\Users\huiyu\.julia\packages\CUDA\rXson\src\CUDA.jl:1
in expression starting at stdin:

Additional context

Add any other context about the problem here.

@huiyuxie huiyuxie added the bug Something isn't working label Oct 10, 2024
@huiyuxie
Copy link
Contributor Author

Duplicate - same as #2520

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant