You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running a script using CUDA.jl, I called the function CUDA.set_runtime_version!(11.4), mistakenly supplying the argument 11.4 as a float instead of a string. Afterwords, when I tried to run any file that uses CUDA.jl (or add CUDA.jl on an interactive session of Julia), the following error message pops up:
It appears calling CUDA.set_runtime_version!(11.4) changed the dictionary in Base.get_preferences(Base.UUID("76a88914-d11a-5bdc-97e0-2f5a05c973a2")) so that the key "version" now points to the float 11.4 instead of a string, causing this error. Removing and re-adding CUDA.jl did not fix it, in fact the error message now appears when I try to add CUDA.jl back so I cannot add the package. Manually changing the Base.get_preferences value to a string in an interactive Julia session does not work either.
To reproduce
Write a file called file.jl with these lines:
using CUDA
CUDA.set_runtime_version!(11.4)
Then run it using: julia file.jl
Now try to use the CUDA.jl package in another file or interactive session, and optionally try removing and adding back CUDA.jl
Version
I downloaded the most recent version of CUDA.jl when this error occurred. I do not know the exact specifics of its version and its dependencies because I tried removing and adding back CUDA.jl and can no longer add it. I was not using any other packages.
Expected behavior
I would expect calling CUDA.set_runtime_version!() with the wrong argument data type to return an error, and not permanently change a dict in Julia Base / CUDA_Runtime_jll that makes it incapable to subsequently use or add CUDA.jl.
When running a script using CUDA.jl, I called the function CUDA.set_runtime_version!(11.4), mistakenly supplying the argument 11.4 as a float instead of a string. Afterwords, when I tried to run any file that uses CUDA.jl (or add CUDA.jl on an interactive session of Julia), the following error message pops up:
ERROR: LoadError: MethodError: no method matching tryparse(::Type{VersionNumber}, ::Float64)
Closest candidates are:
tryparse(::Type{VersionNumber}, !Matched::AbstractString) at version.jl:122
Stacktrace:
[1] cuda_toolkit_tag()
@ Main ~/.julia/packages/CUDA_Runtime_jll/ZrwuA/.pkg/platform_augmentation.jl:29
[2] augment_platform!(platform::Platform)
@ Main ~/.julia/packages/CUDA_Runtime_jll/ZrwuA/.pkg/platform_augmentation.jl:137
[3] top-level scope
@ ~/.julia/packages/CUDA_Runtime_jll/ZrwuA/.pkg/select_artifacts.jl:11
[4] include(fname::String)
@ Base.MainInclude ./client.jl:476
[5] top-level scope
@ none:5
in expression starting at /home1/08955/jlk3675/.julia/packages/CUDA_Runtime_jll/ZrwuA/.pkg/select_artifacts.jl:11
ERROR: failed process: Process(`/home1/08955/jlk3675/julia-1.8.5/bin/julia -Cnative -J/home1/08955/jlk3675/julia-1.8.5/lib/julia/sys.so -g1 -O0 --color=no --history-file=no --startup-file=no --compiled-modules=yes --project=/home1/08955/jlk3675/.julia/environments/v1.8/Project.toml --eval 'append!(empty!(Base.DEPOT_PATH), ["/home1/08955/jlk3675/.julia", "/home1/08955/jlk3675/julia-1.8.5/local/share/julia", "/home1/08955/jlk3675/julia-1.8.5/share/julia"])
append!(empty!(Base.DL_LOAD_PATH), String[])
cd("/home1/08955/jlk3675/.julia/packages/CUDA_Runtime_jll/ZrwuA/.pkg")
include("/home1/08955/jlk3675/.julia/packages/CUDA_Runtime_jll/ZrwuA/.pkg/select_artifacts.jl")
' --startup-file=no x86_64-linux-gnu-libgfortran5-cxx11-libstdcxx30-julia_version+1.8.5`, ProcessExited(1)) [1]
Stacktrace:
[1] pipeline_error
@ ./process.jl:565 [inlined]
[2] read(cmd::Cmd)
@ Base ./process.jl:449
[3] collect_artifacts(pkg_root::String; platform::Base.BinaryPlatforms.Platform)
@ Pkg.Operations ~/julia-1.8.5/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:630
[4] download_artifacts(env::Pkg.Types.EnvCache; platform::Base.BinaryPlatforms.Platform, julia_version::VersionNumber, verbose::Bool, io::Base.TTY)
@ Pkg.Operations ~/julia-1.8.5/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:662
[5] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, new_git::Set{Base.UUID}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform)
@ Pkg.Operations ~/julia-1.8.5/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:1282
[6] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::Base.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
@ Pkg.API ~/julia-1.8.5/share/julia/stdlib/v1.8/Pkg/src/API.jl:275
[7] add(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API ~/julia-1.8.5/share/julia/stdlib/v1.8/Pkg/src/API.jl:156
[8] add(pkgs::Vector{Pkg.Types.PackageSpec})
@ Pkg.API ~/julia-1.8.5/share/julia/stdlib/v1.8/Pkg/src/API.jl:145
[9] #add#27
@ ~/julia-1.8.5/share/julia/stdlib/v1.8/Pkg/src/API.jl:144 [inlined]
[10] add
@ ~/julia-1.8.5/share/julia/stdlib/v1.8/Pkg/src/API.jl:144 [inlined]
[11] try_prompt_pkg_add(pkgs::Vector{Symbol})
@ Pkg.REPLMode ~/julia-1.8.5/share/julia/stdlib/v1.8/Pkg/src/REPLMode/REPLMode.jl:717
[12] #invokelatest#2
@ ./essentials.jl:729 [inlined]
[13] invokelatest
@ ./essentials.jl:726 [inlined]
[14] check_for_missing_packages_and_run_hooks(ast::Any)
@ REPL ~/julia-1.8.5/share/julia/stdlib/v1.8/REPL/src/REPL.jl:176
[15] eval_user_input(ast::Any, backend::REPL.REPLBackend)
@ REPL ~/julia-1.8.5/share/julia/stdlib/v1.8/REPL/src/REPL.jl:146
[16] repl_backend_loop(backend::REPL.REPLBackend)
@ REPL ~/julia-1.8.5/share/julia/stdlib/v1.8/REPL/src/REPL.jl:247
[17] start_repl_backend(backend::REPL.REPLBackend, consumer::Any)
@ REPL ~/julia-1.8.5/share/julia/stdlib/v1.8/REPL/src/REPL.jl:232
[18] run_repl(repl::REPL.AbstractREPL, consumer::Any; backend_on_current_task::Bool)
@ REPL ~/julia-1.8.5/share/julia/stdlib/v1.8/REPL/src/REPL.jl:369
[19] run_repl(repl::REPL.AbstractREPL, consumer::Any)
@ REPL ~/julia-1.8.5/share/julia/stdlib/v1.8/REPL/src/REPL.jl:355
[20] (::Base.var"#967#969"{Bool, Bool, Bool})(REPL::Module)
@ Base ./client.jl:419
[21] #invokelatest#2
@ ./essentials.jl:729 [inlined]
[22] invokelatest
@ ./essentials.jl:726 [inlined]
[23] run_main_repl(interactive::Bool, quiet::Bool, banner::Bool, history_file::Bool, color_set::Bool)
@ Base ./client.jl:404
[24] exec_options(opts::Base.JLOptions)
@ Base ./client.jl:318
[25] _start()
@ Base ./client.jl:522
It appears calling CUDA.set_runtime_version!(11.4) changed the dictionary in Base.get_preferences(Base.UUID("76a88914-d11a-5bdc-97e0-2f5a05c973a2")) so that the key "version" now points to the float 11.4 instead of a string, causing this error. Removing and re-adding CUDA.jl did not fix it, in fact the error message now appears when I try to add CUDA.jl back so I cannot add the package. Manually changing the Base.get_preferences value to a string in an interactive Julia session does not work either.
To reproduce
Write a file called file.jl with these lines:
Then run it using: julia file.jl
Now try to use the CUDA.jl package in another file or interactive session, and optionally try removing and adding back CUDA.jl
Version
I downloaded the most recent version of CUDA.jl when this error occurred. I do not know the exact specifics of its version and its dependencies because I tried removing and adding back CUDA.jl and can no longer add it. I was not using any other packages.
Expected behavior
I would expect calling CUDA.set_runtime_version!() with the wrong argument data type to return an error, and not permanently change a dict in Julia Base / CUDA_Runtime_jll that makes it incapable to subsequently use or add CUDA.jl.
Version info
Details on Julia:
Details on CUDA:
I cannot post the output of CUDA.versioninfo() since I cannot add or use CUDA.jl.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: