CUDA under julia 1.5.0

Hi,
this is ubuntu 20.04 fresh install, also Julia 1.5.0

add CUDA
[ Info: Resolving package identifier `CUDA` as a directory at `~/CUDA`.
ERROR: Did not find a git repository at `CUDA`

no CUDA whatsoever… what am I doing wrong?

Of course, other packages install well with the same procedure…

Best,

Ferran

1 Like

The problem here is that it tries to add the local folder called CUDA on your harddrive. You can do

using Pkg
Pkg.add(name="CUDA")

There has been a discussion about removing this ambiguity, and forcing writing add ./CUDA to add the local folder over the named package.

4 Likes

Interesting issue… thanks for the info.
In any case I guess this has to be fixed in future releases, right? I mean, it makes no sense to have to
install this package in a different way from the rest (I mean that the standard way add CUDA should work, to my understandings…)
Best,
Ferran.

It’s not specific to CUDA, it’s specific to you having a directory called CUDA in your home directory, but as @kristoffer.carlsson said, it can be a bit confusing and may get changed in the future.

5 Likes

…which makes essentially no difference because the installation methods should not depend on the names of the folders I have on my local drive.
Anyway it does not compile on my Julia 1.5.0 box under ubuntu 20.04 so I guess I’ll wait until the package gets a bit more stable, sticking to the old CuArrays etc packages for a while.
Thanks for the replies,
Ferran.

I’m a little confused by this. Are you running Julia out of your home directory specifically? That’s the only way Pkg would pick up on a subdirectory called “CUDA”. Even changing to a different directory and trying to install CUDA in the global environment works as expected…

In other words, this is not a problem with CUDA itself. I would run into the same problem right now if I cd’d to a random directory, created a CuArrays subdir, started Julia and ran ] add CuArrays. Are you able to just run Julia out of the same directory you have the rest of your project’s files/data in? I can only assume that would cut down on home directory clutter as well!

3 Likes

This issue has literally nothing to do with the CUDA.jl package, but with the coincidence that you have a folder named CUDA in your home directory. Waiting for the package to ‘stabilize’ won’t help, a more productive approach is to get rid or rename said folder. If you have other issues, please file an issue.

2 Likes

Hence

5 Likes

HI,
I renamed my CUDA folder (so to adapt my computer to Julia requests, very nice) and tried to install CUDA.jl on my ubuntu mate 20.04, julia 1.5.0 box. Still getting errors

   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.5.0 (2020-08-01)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using CUDA
[ Info: Precompiling CUDA [052768ef-5323-5732-b1bb-66c8b64840ba]
ERROR: LoadError: LoadError: LoadError: UndefVarError: AddrSpacePtr not defined
Stacktrace:
 [1] getproperty(::Module, ::Symbol) at ./Base.jl:26
 [2] top-level scope at /home/mazzanti/.julia/packages/CUDA/5t6R9/src/device/cuda/wmma.jl:52
 [3] include(::Function, ::Module, ::String) at ./Base.jl:380
 [4] include at ./Base.jl:368 [inlined]
 [5] include(::String) at /home/mazzanti/.julia/packages/CUDA/5t6R9/src/CUDA.jl:1
 [6] top-level scope at /home/mazzanti/.julia/packages/CUDA/5t6R9/src/device/cuda.jl:15
 [7] include(::Function, ::Module, ::String) at ./Base.jl:380
 [8] include at ./Base.jl:368 [inlined]
 [9] include(::String) at /home/mazzanti/.julia/packages/CUDA/5t6R9/src/CUDA.jl:1
 [10] top-level scope at /home/mazzanti/.julia/packages/CUDA/5t6R9/src/CUDA.jl:39
 [11] include(::Function, ::Module, ::String) at ./Base.jl:380
 [12] include(::Module, ::String) at ./Base.jl:368
 [13] top-level scope at none:2
 [14] eval at ./boot.jl:331 [inlined]
 [15] eval(::Expr) at ./client.jl:467
 [16] top-level scope at ./none:3
in expression starting at /home/mazzanti/.julia/packages/CUDA/5t6R9/src/device/cuda/wmma.jl:52
in expression starting at /home/mazzanti/.julia/packages/CUDA/5t6R9/src/device/cuda.jl:14
in expression starting at /home/mazzanti/.julia/packages/CUDA/5t6R9/src/CUDA.jl:39
ERROR: Failed to precompile CUDA [052768ef-5323-5732-b1bb-66c8b64840ba] to /home/mazzanti/.julia/compiled/v1.5/CUDA/oWw5k_JTdPc.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1290
 [3] _require(::Base.PkgId) at ./loading.jl:1030
 [4] require(::Base.PkgId) at ./loading.jl:928
 [5] require(::Module, ::Symbol) at ./loading.jl:923

…so there are still some issues here. Has anybody experienced anything similar?
Thanks…

1.5 is only supported by a sufficiently recent version of CUDA.jl; you’re probably still using v0.1

1 Like

A Pkg.status() would certainly help other people reproduce the problem.

I have no issues using CUDA.jl with Julia 1.5.

I too encountered the LoadError: UnderVarError: AddrSpacePtr error. Discussion here seems to be the correct explanation of what is happening. In my case, I had CuArrays installed, which might have been the culprit (of limiting CUDA to v0.1.0). I removed CuArrays, and installed the latest version of CUDA.jl using ]add CUDA@1.3.3 (latest at the time of writing), and now the precompiling doesn’t fail.

Note: CuArrays.jl is Deprecated, and CUDA.jl should be used instead.

Prior to fixing the problem, my ]st looked something like this. Hope this helps anyone else stumbling across this issue.

(@v1.5) pkg> st
Status `~/.julia/environments/v1.5/Project.toml`
  [c9ce4bd3] ArchGDAL v0.5.1
  [6e4b80f9] BenchmarkTools v0.5.0
  [052768ef] CUDA v0.1.0
  [3895d2a7] CUDAapi v4.0.0
  [3a865a2d] CuArrays v2.2.2
  [39dd38d3] Dierckx v0.5.0
  [0c46a032] DifferentialEquations v6.15.0
  [e30172f5] Documenter v0.25.2
  [587475ba] Flux v0.10.4
  [7073ff75] IJulia v1.21.3
  [c601a237] Interact v0.10.3
  [eb30cadb] MLDatasets v0.5.2
  [ee78f7c6] Makie v0.11.1
  [9b87118b] PackageCompiler v1.2.1
  [d96e819e] Parameters v0.12.1
  [91a5bcdd] Plots v1.6.6
  [c3e4b0f8] Pluto v0.11.14
  [d330b81b] PyPlot v2.9.0
  [0f1e0344] WebIO v0.8.14

Error Message:

[ Info: Precompiling CUDA [052768ef-5323-5732-b1bb-66c8b64840ba]
ERROR: LoadError: LoadError: LoadError: UndefVarError: AddrSpacePtr not defined
Stacktrace:
 [1] getproperty(::Module, ::Symbol) at ./Base.jl:26
 [2] top-level scope at /home/pritamd47/.julia/packages/CUDA/5t6R9/src/device/cuda/wmma.jl:52
 [3] include(::Function, ::Module, ::String) at ./Base.jl:380
 [4] include at ./Base.jl:368 [inlined]
 [5] include(::String) at /home/pritamd47/.julia/packages/CUDA/5t6R9/src/CUDA.jl:1
 [6] top-level scope at /home/pritamd47/.julia/packages/CUDA/5t6R9/src/device/cuda.jl:15
 [7] include(::Function, ::Module, ::String) at ./Base.jl:380
 [8] include at ./Base.jl:368 [inlined]
 [9] include(::String) at /home/pritamd47/.julia/packages/CUDA/5t6R9/src/CUDA.jl:1
 [10] top-level scope at /home/pritamd47/.julia/packages/CUDA/5t6R9/src/CUDA.jl:39
 [11] include(::Function, ::Module, ::String) at ./Base.jl:380
 [12] include(::Module, ::String) at ./Base.jl:368
 [13] top-level scope at none:2
 [14] eval at ./boot.jl:331 [inlined]
 [15] eval(::Expr) at ./client.jl:467
 [16] top-level scope at ./none:3
in expression starting at /home/pritamd47/.julia/packages/CUDA/5t6R9/src/device/cuda/wmma.jl:52
in expression starting at /home/pritamd47/.julia/packages/CUDA/5t6R9/src/device/cuda.jl:14
in expression starting at /home/pritamd47/.julia/packages/CUDA/5t6R9/src/CUDA.jl:39
1 Like

@pritamd47: I solved the error by doing the following method:

] rm CUDA
gc
add CUDA@v1.3.0

Problem solved :smiley:

1 Like

Hi, I followed @pritamd47 and your approach. Thank you guys! Wouldnt it be the case that if I uninstall the old CUDA related packages, then the installer would select the most recent version?