Error installing CuArrays

I’m facing the following errors when I try to install CuArrays. I use Julia 1.0.1 on a Windows 10 machine. The graphics card installed is the GeForce GTX 980. Any help is appreciated.

julia> using CuArrays
[ Info: Precompiling CuArrays [3a865a2d-5b23-5a0f-bc46-62713ec82fae]
┌ Warning: CUDAnative.jl has not been successfully built, and will not work properly.
│ Please run Pkg.build("CUDAnative") and restart Julia.
└ @ CUDAnative C:\Users\Seif\.julia\packages\CUDAnative\AGfq2\src\init.jl:98
ERROR: LoadError: LoadError: UndefVarError: CUBLAS not defined
Stacktrace:
 [1] top-level scope at none:0 (repeats 2 times)
 [2] include at .\boot.jl:317 [inlined]
 [3] include_relative(::Module, ::String) at .\loading.jl:1041
 [4] include at .\sysimg.jl:29 [inlined]
 [5] include(::String) at C:\Users\Seif\.julia\packages\CuArrays\f4Eke\src\CuArrays.jl:3
 [6] top-level scope at none:0
 [7] include at .\boot.jl:317 [inlined]
 [8] include_relative(::Module, ::String) at .\loading.jl:1041
 [9] include(::Module, ::String) at .\sysimg.jl:29
 [10] top-level scope at none:2
 [11] eval at .\boot.jl:319 [inlined]
 [12] eval(::Expr) at .\client.jl:389
 [13] top-level scope at .\none:3
in expression starting at C:\Users\Seif\.julia\packages\CuArrays\f4Eke\src\deprecated.jl:5
in expression starting at C:\Users\Seif\.julia\packages\CuArrays\f4Eke\src\CuArrays.jl:42
ERROR: Failed to precompile CuArrays [3a865a2d-5b23-5a0f-bc46-62713ec82fae] to C:\Users\Seif\.julia\compiled\v1.0\CuArrays\7YFE0.ji.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] macro expansion at .\logging.jl:313 [inlined]
 [3] compilecache(::Base.PkgId, ::String) at .\loading.jl:1187
 [4] _require(::Base.PkgId) at .\logging.jl:311
 [5] require(::Base.PkgId) at .\loading.jl:855
 [6] macro expansion at .\logging.jl:311 [inlined]
 [7] require(::Module, ::Symbol) at .\loading.jl:837

And this happens when trying to build CUDAnative:

julia> Pkg.build("CUDAnative")
  Building LLVM ──────→ `C:\Users\Seif\.julia\packages\LLVM\mcS4Y\deps\build.log`
  Building CUDAdrv ───→ `C:\Users\Seif\.julia\packages\CUDAdrv\LC5XS\deps\build.log`
  Building CUDAnative → `C:\Users\Seif\.julia\packages\CUDAnative\AGfq2\deps\build.log`
┌ Error: Error building `CUDAnative`:
│ ERROR: LoadError: CUDA toolkit at  doesn't contain nvcc
│ Stacktrace:
│  [1] error(::String) at .\error.jl:33
│  [2] find_toolkit_version(::Array{String,1}) at C:\Users\Seif\.julia\packages\CUDAapi\tF455\src\discovery.jl:268
│  [3] main() at C:\Users\Seif\.julia\packages\CUDAnative\AGfq2\deps\build.jl:114
│  [4] top-level scope at none:0
│  [5] include at .\boot.jl:317 [inlined]
│  [6] include_relative(::Module, ::String) at .\loading.jl:1041
│  [7] include(::Module, ::String) at .\sysimg.jl:29
│  [8] include(::String) at .\client.jl:388
│  [9] top-level scope at none:0
│ in expression starting at C:\Users\Seif\.julia\packages\CUDAnative\AGfq2\deps\build.jl:156
└ @ Pkg.Operations C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\Operations.jl:1069

I will try an install on Windows 10. You do have the CUDA toolkit installed? You might have to set some environment variables such that nvcc is found n the path.

1 Like

Thank you John for the quick response. How can I know that CUDA toolkit is installed, if I remember correctly I think I installed it a year ago.

Thanks again John, reinstalling CUDA Toolkit fixed the issue.

No problems! Let us know on here what problem you are working on?

Hello All, I am facing a problem like the original poster: when trying to eg. ‘test CuArrays’ in Pkg mode, it fails with a ‘LoadError: UndefVarError: CUBLAS not defined’ message.
NVidia drivers are up to date (10.1), nvcc is working. I also tried it with both Juila 1.1 and 1.0.3, OS is Windows 10 x64.

Any help is greatly appreciated!

What is the output of Pkg.build("CuArrays") run with JULIA_DEBUG="CUDAapi" set in your environment? Also post the contents of CuArrays/deps/ext.jl (wherever CuArrays is, use Base.find_package("CuArrays")).