Error adding CUDA on Windows 11 and Julia 1.10. It works with Julia 1.9

Hi,

I use juliaup to have 1.10 and 1.9 version. I have an application working with 1.9, CUDA (ML with Flux). When I switch to Julia 1.10 I’m unable to add CUDA. (I have the last NVIDIA driver installed). This is the error :

(@v1.10) pkg> add CUDA
   Resolving package versions...
ERROR: LoadError: failed process: Process(setenv(`'C:\Users\belle\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\libexec\julia\lld.exe' -flavor gnu -m i386pep -Bdynamic --enable-auto-image-base --allow-multiple-d


Stacktrace:
  [1] pipeline_error
    @ Base .\process.jl:565 [inlined]
  [2] run(::Cmd, ::Base.DevNull, ::Vararg{Any}; wait::Bool)
    @ Base .\process.jl:480
  [3] run
    @ Base .\process.jl:477 [inlined]
  [4] link_image (repeats 2 times)
    @ Base.Linking .\linking.jl:166 [inlined]
  [5] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
    @ Base .\loading.jl:2373
  [6] compilecache
    @ Base .\loading.jl:2334 [inlined]
  [7] (::Base.var"#968#969"{Base.PkgId})()
    @ Base .\loading.jl:1968
  [8] mkpidlock(f::Base.var"#968#969"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile C:\Users\belle\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\FileWatching\src\pidfile.jl:93
  [9] #mkpidlock#6
    @ FileWatching.Pidfile C:\Users\belle\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\FileWatching\src\pidfile.jl:88 [inlined]
 [10] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile C:\Users\belle\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\FileWatching\src\pidfile.jl:111
 [11] #invokelatest#2
    @ Base .\essentials.jl:889 [inlined]
 [12] invokelatest
    @ Base .\essentials.jl:884 [inlined]
 [13] maybe_cachefile_lock(f::Base.var"#968#969"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base .\loading.jl:2977
 [14] maybe_cachefile_lock
    @ Base .\loading.jl:2974 [inlined]
 [15] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1964
 [16] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1806
 [17] #invoke_in_world#3
    @ Base .\essentials.jl:921 [inlined]
 [18] invoke_in_world
    @ Base .\essentials.jl:918 [inlined]
 [19] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1797
 [20] macro expansion
    @ Base .\loading.jl:1784 [inlined]
 [21] macro expansion
    @ Base .\lock.jl:267 [inlined]
 [22] __require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1747
 [23] #invoke_in_world#3
    @ Base .\essentials.jl:921 [inlined]
 [24] invoke_in_world
    @ Base .\essentials.jl:918 [inlined]
 [25] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1740
 [26] top-level scope
    @ C:\Users\belle\.julia\packages\JLLWrappers\pG9bm\src\JLLWrappers.jl:8
 [27] include
    @ Base .\Base.jl:495 [inlined]
 [28] 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:2216
 [29] top-level scope
    @ stdin:3
in expression starting at C:\Users\belle\.julia\packages\JLLWrappers\pG9bm\src\JLLWrappers.jl:1
in expression starting at stdin:3
ERROR: LoadError: Failed to precompile JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] to "C:\\Users\\belle\\.julia\\compiled\\v1.10\\JLLWrappers\\jl_2166.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)
    @ Base .\loading.jl:2462
  [3] compilecache
    @ Base .\loading.jl:2334 [inlined]
  [4] (::Base.var"#968#969"{Base.PkgId})()
    @ Base .\loading.jl:1968
  [5] mkpidlock(f::Base.var"#968#969"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile C:\Users\belle\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\FileWatching\src\pidfile.jl:93
  [6] #mkpidlock#6
    @ FileWatching.Pidfile C:\Users\belle\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\FileWatching\src\pidfile.jl:88 [inlined]
  [7] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile C:\Users\belle\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\FileWatching\src\pidfile.jl:111
  [8] #invokelatest#2
    @ Base .\essentials.jl:889 [inlined]
  [9] invokelatest
    @ Base .\essentials.jl:884 [inlined]
 [10] maybe_cachefile_lock(f::Base.var"#968#969"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base .\loading.jl:2977
 [11] maybe_cachefile_lock
    @ Base .\loading.jl:2974 [inlined]
 [12] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1964
 [13] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1806
 [14] #invoke_in_world#3
    @ Base .\essentials.jl:921 [inlined]
 [15] invoke_in_world
    @ Base .\essentials.jl:918 [inlined]
 [16] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1797
 [17] macro expansion
    @ Base .\loading.jl:1784 [inlined]
 [18] macro expansion
    @ Base .\lock.jl:267 [inlined]
 [19] __require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1747
 [20] #invoke_in_world#3
    @ Base .\essentials.jl:921 [inlined]
 [21] invoke_in_world
    @ Base .\essentials.jl:918 [inlined]
 [22] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1740
 [23] include
    @ Base .\Base.jl:495 [inlined]
 [24] 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:2216
 [25] top-level scope
    @ stdin:3
in expression starting at C:\Users\belle\.julia\packages\CUDA_Driver_jll\e86kc\src\CUDA_Driver_jll.jl:2
in expression starting at stdin:3
ERROR: failed to parse TOML output from running "C:\\Users\\belle\\.julia\\packages\\CUDA_Runtime_jll\\rcOoh\\.pkg\\select_artifacts.jl", got:
TOML Parser error:
none:1:5 error: expected equal sign after key
  LLVM ERROR: out of memory
      ^

it works with Julia 1.9… I have tested many things but I run out of ideas.
Thanks for your help

This looks like a failure to generate a package image; probably unrelated to CUDA.jl. The actual error is at the bottom: LLVM ERROR: out of memory. Try again after freeing up some memory.

2 Likes

Hi,
thanks for the reply. I have 32g of RAM and only julia is running… I think it’s a bad error not showing the reality.
It’s the same cuda.jl as for the 1.9, and for this version cuda is up. I restarted from scratch, removing the .julia folder and downloaded the last version for 1.9 and 1.10 with juliaup.

Could you elaborate? I just copied the out of memory line from the bottom of your error.

1 Like

I just reproduce the problem, remove CUDA, start the performance memory on my windows et restart add CUDA. No change for the memory, on 32g the memory was 10g flat. So I think the error displayed is not real. Just before there is a comment about the toml…but it’s a generative file…
So I’m getting confuse.

That’s curious. Can you try running the ./packages/CUDA_Runtime_jll/rcOoh/.pkg/select_artifacts.jl script manually and posting the output? It should be located in your depot (probably ~/.julia), and the script expects to be executed by Julia.

Thanks again for your help, this is the log :


Stacktrace:
  [1] pipeline_error
    @ Base .\process.jl:565 [inlined]
  [2] run(::Cmd, ::Base.DevNull, ::Vararg{Any}; wait::Bool)
    @ Base .\process.jl:480
  [3] run
    @ Base .\process.jl:477 [inlined]
  [4] link_image (repeats 2 times)
    @ Base.Linking .\linking.jl:166 [inlined]
  [5] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
    @ Base .\loading.jl:2373
  [6] compilecache
    @ Base .\loading.jl:2334 [inlined]
  [7] (::Base.var"#968#969"{Base.PkgId})()
    @ Base .\loading.jl:1968
  [8] mkpidlock(f::Base.var"#968#969"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile C:\Users\belle\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\FileWatching\src\pidfile.jl:93
  [9] #mkpidlock#6
    @ FileWatching.Pidfile C:\Users\belle\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\FileWatching\src\pidfile.jl:88 [inlined]
 [10] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile C:\Users\belle\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\FileWatching\src\pidfile.jl:111
 [11] #invokelatest#2
    @ Base .\essentials.jl:889 [inlined]
 [12] invokelatest
    @ Base .\essentials.jl:884 [inlined]
 [13] maybe_cachefile_lock(f::Base.var"#968#969"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base .\loading.jl:2977
 [14] maybe_cachefile_lock
    @ Base .\loading.jl:2974 [inlined]
 [15] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1964
 [16] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1806
 [17] #invoke_in_world#3
    @ Base .\essentials.jl:921 [inlined]
 [18] invoke_in_world
    @ Base .\essentials.jl:918 [inlined]
 [19] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1797
 [20] macro expansion
    @ Base .\loading.jl:1784 [inlined]
 [21] macro expansion
    @ Base .\lock.jl:267 [inlined]
 [22] __require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1747
 [23] #invoke_in_world#3
    @ Base .\essentials.jl:921 [inlined]
 [24] invoke_in_world
    @ Base .\essentials.jl:918 [inlined]
 [25] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1740
 [26] top-level scope
    @ C:\Users\belle\.julia\packages\JLLWrappers\pG9bm\src\JLLWrappers.jl:8
 [27] include
    @ Base .\Base.jl:495 [inlined]
 [28] 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:2216
 [29] top-level scope
    @ stdin:3
in expression starting at C:\Users\belle\.julia\packages\JLLWrappers\pG9bm\src\JLLWrappers.jl:1
in expression starting at stdin:3
ERROR: LoadError: Failed to precompile JLLWrappers [692b3bcd-3c85-4b1f-b108-f13ce0eb3210] to "C:\\Users\\belle\\.julia\\compiled\\v1.10\\JLLWrappers\\jl_8A96.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)
    @ Base .\loading.jl:2462
  [3] compilecache
    @ Base .\loading.jl:2334 [inlined]
  [4] (::Base.var"#968#969"{Base.PkgId})()
    @ Base .\loading.jl:1968
  [5] mkpidlock(f::Base.var"#968#969"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile C:\Users\belle\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\FileWatching\src\pidfile.jl:93
  [6] #mkpidlock#6
    @ FileWatching.Pidfile C:\Users\belle\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\FileWatching\src\pidfile.jl:88 [inlined]
  [7] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile C:\Users\belle\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\FileWatching\src\pidfile.jl:111
  [8] #invokelatest#2
    @ Base .\essentials.jl:889 [inlined]
  [9] invokelatest
    @ Base .\essentials.jl:884 [inlined]
 [10] maybe_cachefile_lock(f::Base.var"#968#969"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base .\loading.jl:2977
 [11] maybe_cachefile_lock
    @ Base .\loading.jl:2974 [inlined]
 [12] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1964
 [13] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1806
 [14] #invoke_in_world#3
    @ Base .\essentials.jl:921 [inlined]
 [15] invoke_in_world
    @ Base .\essentials.jl:918 [inlined]
 [16] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1797
 [17] macro expansion
    @ Base .\loading.jl:1784 [inlined]
 [18] macro expansion
    @ Base .\lock.jl:267 [inlined]
 [19] __require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1747
 [20] #invoke_in_world#3
    @ Base .\essentials.jl:921 [inlined]
 [21] invoke_in_world
    @ Base .\essentials.jl:918 [inlined]
 [22] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1740
 [23] include
    @ Base .\Base.jl:495 [inlined]
 [24] 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:2216
 [25] top-level scope
    @ stdin:3
in expression starting at C:\Users\belle\.julia\packages\CUDA_Driver_jll\e86kc\src\CUDA_Driver_jll.jl:2
in expression starting at stdin:3

and this one when I redirect the output to a file :

LLVM ERROR: out of memory
Allocation failed
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: C:\\Users\\belle\\.julia\\juliaup\\julia-1.10.0+0.x64.w64.mingw32\\libexec\\julia\\lld.exe -flavor gnu -m i386pep -Bdynamic --enable-auto-image-base --allow-multiple-definition  -shared -o C:\\Users\\belle\\.julia\\compiled\\v1.10\\Preferences\\jl_8C4D.tmp --whole-archive C:\\Users\\belle\\.julia\\compiled\\v1.10\\Preferences\\jl_8C4C.tmp --no-whole-archive -LC:\\Users\\belle\\.julia\\juliaup\\julia-1.10.0+0.x64.w64.mingw32\\lib -LC:\\Users\\belle\\.julia\\juliaup\\julia-1.10.0+0.x64.w64.mingw32\\lib\\julia -LC:\\Users\\belle\\.julia\\juliaup\\julia-1.10.0+0.x64.w64.mingw32\\bin -ljulia -ljulia-internal -lopenlibm -lssp -lgcc_s -lgcc -lmsvcrt
Exception Code: 0xC000001D
0x0000000004A8BF56, C:\Users\belle\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\bin\libLLVM-15jl.dll(0x0000000004A70000) + 0x1BF56 byte(s), HandleAbort() + 0x6 byte(s)
0x00007FFEBA7CE0AC, C:\WINDOWS\System32\msvcrt.dll(0x00007FFEBA7A0000) + 0x2E0AC byte(s), raise() + 0x22C byte(s)
0x00007FFEBA7D255B, C:\WINDOWS\System32\msvcrt.dll(0x00007FFEBA7A0000) + 0x3255B byte(s), abort() + 0x1B byte(s)
0x000000000643C519, C:\Users\belle\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\bin\libLLVM-15jl.dll(0x0000000004A70000) + 0x19CC519 byte(s), _ZN4llvm22report_bad_alloc_errorEPKcb() + 0x99 byte(s)
0x0000000005E0BFC8, C:\Users\belle\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\bin\libLLVM-15jl.dll(0x0000000004A70000) + 0x139BFC8 byte(s), _ZN4llvm15SmallVectorBaseIyE8grow_podEPvyy() + 0x88 byte(s)
0x000000000655A781, C:\Users\belle\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\bin\libLLVM-15jl.dll(0x0000000004A70000) + 0x1AEA781 byte(s), _ZN4llvm26findVCToolChainViaRegistryERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS_13ToolsetLayoutE() + 0x271 byte(s)
0x000000000059728B, C:\Users\belle\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\libexec\julia\lld.exe(0x0000000000400000) + 0x19728B byte(s)
0x000000000058B781, C:\Users\belle\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\libexec\julia\lld.exe(0x0000000000400000) + 0x18B781 byte(s)
0x00000000005B73CC, C:\Users\belle\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\libexec\julia\lld.exe(0x0000000000400000) + 0x1B73CC byte(s)
0x00000000006500BC, C:\Users\belle\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\libexec\julia\lld.exe(0x0000000000400000) + 0x2500BC byte(s)
0x0000000000442AC1, C:\Users\belle\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\libexec\julia\lld.exe(0x0000000000400000) + 0x42AC1 byte(s)
0x0000000000779C11, C:\Users\belle\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\libexec\julia\lld.exe(0x0000000000400000) + 0x379C11 byte(s)
0x00000000004012FB, C:\Users\belle\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\libexec\julia\lld.exe(0x0000000000400000) + 0x12FB byte(s)
0x00000000004013F6, C:\Users\belle\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\libexec\julia\lld.exe(0x0000000000400000) + 0x13F6 byte(s)
0x00007FFEB98F257D, C:\WINDOWS\System32\KERNEL32.DLL(0x00007FFEB98E0000) + 0x1257D byte(s), BaseThreadInitThunk() + 0x1D byte(s)
0x00007FFEBB36AA58, C:\WINDOWS\SYSTEM32\ntdll.dll(0x00007FFEBB310000) + 0x5AA58 byte(s), RtlUserThreadStart() + 0x28 byte(s)

Those are failures precompiling JLLWrappers.jl and Preferences.jl, both probably unrelated to the package code itself, but having something to do with the package image generation. I don’t think any of this is related to CUDA.jl, and probably warrants an issue being filed on the Julia repository.

yes.
I have tested with the nighty build, v1.11 and it works ! I’m waiting for v1.10.1 now.
Thanks for your help