CUDA GPU 计算包安装问题

  1. Julia 版本:
    Julia Version 1.0.2
    Commit d789231e99 (2018-11-08 20:11 UTC)
    Platform Info:
    OS: Windows (x86_64-w64-mingw32)
    CPU: Intel(R) Core™ i5-8300H CPU @ 2.30GHz
    WORD_SIZE: 64
    LIBM: libopenlibm
    LLVM: libLLVM-6.0.0 (ORCJIT, skylake)
  2. 当前包管理器的状态如下:
Pkg.status()
    Status `C:\Users\suiey\.juliapro\environments\JuliaPro\Project.toml`
  [c5f51814] CUDAdrv v0.8.6
  [be33ccc6] CUDAnative v0.9.1
  [3a865a2d] CuArrays v0.8.1
  [a93c6f00] DataFrames v0.14.1
  [5789e2e9] FileIO v1.0.4
  [0c68f7d7] GPUArrays v0.4.2

  1. using CuArrays 出错,显示如下:
julia> using CuArrays
[ Info: Precompiling CuArrays [3a865a2d-5b23-5a0f-bc46-62713ec82fae]
┌ Warning: On Windows, creating file symlinks requires Administrator privileges
└ @ Base.Filesystem file.jl:789
┌ Warning: On Windows, creating file symlinks requires Administrator privileges
└ @ Base.Filesystem file.jl:789
ERROR: LoadError: CUDAdrv.jl has not been built, please run Pkg.build("CUDAdrv").
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] top-level scope at none:0
 [3] include at .\boot.jl:317 [inlined]
 [4] include_relative(::Module, ::String) at .\loading.jl:1044
 [5] include(::Module, ::String) at .\sysimg.jl:29
 [6] top-level scope at none:2
 [7] eval at .\boot.jl:319 [inlined]
 [8] eval(::Expr) at .\client.jl:393
 [9] top-level scope at .\none:3
in expression starting at C:\Users\suiey\.juliapro\packages\CUDAdrv\LC5XS\src\CUDAdrv.jl:6
ERROR: LoadError: Failed to precompile CUDAdrv [c5f51814-7f29-56b8-a69c-e4d8f6be1fde] to C:\Users\su
iey\.juliapro\compiled\v1.0\CUDAdrv\HMhfu.ji.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] macro expansion at .\logging.jl:311 [inlined]
 [3] compilecache(::Base.PkgId, ::String) at .\loading.jl:1190
 [4] macro expansion at .\logging.jl:309 [inlined]
 [5] _require(::Base.PkgId) at .\loading.jl:947
 [6] require(::Base.PkgId) at .\loading.jl:858
 [7] macro expansion at .\logging.jl:309 [inlined]
 [8] require(::Module, ::Symbol) at .\loading.jl:840
 [9] include at .\boot.jl:317 [inlined]
 [10] include_relative(::Module, ::String) at .\loading.jl:1044
 [11] include(::Module, ::String) at .\sysimg.jl:29
 [12] top-level scope at none:2
 [13] eval at .\boot.jl:319 [inlined]
 [14] eval(::Expr) at .\client.jl:393
 [15] top-level scope at .\none:3
in expression starting at C:\Users\suiey\.juliapro\packages\CuArrays\f4Eke\src\CuArrays.jl:5
ERROR: Failed to precompile CuArrays [3a865a2d-5b23-5a0f-bc46-62713ec82fae] to C:\Users\suiey\.julia
pro\compiled\v1.0\CuArrays\7YFE0.ji.
Stacktrace:
 [1] macro expansion at .\logging.jl:311 [inlined]
 [2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1190
 [3] macro expansion at .\logging.jl:309 [inlined]
 [4] _require(::Base.PkgId) at .\loading.jl:947
 [5] require(::Base.PkgId) at .\loading.jl:858
 [6] macro expansion at .\logging.jl:309 [inlined]
 [7] require(::Module, ::Symbol) at .\loading.jl:840
  1. 运行 Pkg.build(“CUDAdrv”),报错:
julia> Pkg.build("CUDAdrv")
  Building CUDAdrv → `C:\Users\suiey\.juliapro\packages\CUDAdrv\LC5XS\deps\build.log`
┌ Error: Error building `CUDAdrv`:
│ fatal: error thrown and no exception handler available.
│ InitError(mod=:MbedTLS, error=MethodError(f=typeof(Base.Filesystem.joinpath)(), args=(nothing, "..
", "..", "deps", "usr", "lib"), world=0x00000000000067f0))
│ rec_backtrace at /home/Administrator/buildbot/worker/package_win64/build/src\stackwalk.c:94
│ record_backtrace at /home/Administrator/buildbot/worker/package_win64/build/src\task.c:246
│ jl_throw at /home/Administrator/buildbot/worker/package_win64/build/src\task.c:577
│ jl_method_error_bare at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:1616
│ jl_method_error at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:1634
│ jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2161
│ __init__ at C:\Users\julia\AppData\Local\Julia-1.0.2\share\julia\stdlib\v1.0\MbedTLS\src\MbedTLS.j
l:61
│ jfptr___init___14286 at C:\Users\suiey\AppData\Local\JuliaPro-1.0.2.1\Julia-1.0.2\lib\julia\sys.dl
l (unknown line)
│ jl_apply_generic at /home/Administrator/buildbot/worker/package_win64/build/src\gf.c:2184
│ jl_apply at /home/Administrator/buildbot/worker/package_win64/build/src\julia.h:1537 [inlined]
│ jl_module_run_initializer at /home/Administrator/buildbot/worker/package_win64/build/src\toplevel.
c:90
│ _julia_init at /home/Administrator/buildbot/worker/package_win64/build/src/home/Administrator/buil
dbot/worker/package_win64/build/src\init.c:813
│ julia_init__threading at /home/Administrator/buildbot/worker/package_win64/build/src\task.c:302
│ wmain at /home/Administrator/buildbot/worker/package_win64/build/ui\repl.c:227
│ __tmainCRTStartup at /usr/src/debug/mingw64-x86_64-runtime-5.0.3-1/crt\crtexe.c:329
│ mainCRTStartup at /usr/src/debug/mingw64-x86_64-runtime-5.0.3-1/crt\crtexe.c:212
│ BaseThreadInitThunk at C:\Windows\System32\KERNEL32.DLL (unknown line)
│ RtlUserThreadStart at C:\Windows\SYSTEM32\ntdll.dll (unknown line)
└ @ Pkg.Operations C:\Users\julia\AppData\Local\Julia-1.0.2\share\julia\stdlib\v1.0\Pkg\src\Operatio
ns.jl:1119

│ jl_module_run_initializer at /home/Administrator/buildbot/worker/package_win64/build/src\toplevel.c:90
│ _julia_init at /home/Administrator/buildbot/worker/package_win64/build/src/home/Administrator/buildbot/worker/package_win64/build/src\init.c:813
│ julia_init__threading at /home/Administrator/buildbot/worker/package_win64/build/src\task.c:302
│ wmain at /home/Administrator/buildbot/worker/package_win64/build/ui\repl.c:227
│ __tmainCRTStartup at /usr/src/debug/mingw64-x86_64-runtime-5.0.3-1/crt\crtexe.c:329
│ mainCRTStartup at /usr/src/debug/mingw64-x86_64-runtime-5.0.3-1/crt\crtexe.c:212
│ BaseThreadInitThunk at C:\Windows\System32\KERNEL32.DLL (unknown line)
│ RtlUserThreadStart at C:\Windows\SYSTEM32\ntdll.dll (unknown line)
└ @ Pkg.Operations C:\Users\julia\AppData\Local\Julia-1.0.2\share\julia\stdlib\v1.0\Pkg\src\Operations.jl:1119

别的包都可以正常使用,也安装了CUDA驱动,现在卡在这一步了…请问这个问题怎么解决啊?

感觉和这连个 warning 有关;

InitError 也很少见,搜一下只有下面这位情况差不多,他是删了个环境变量就好了。
你也可以看看有没有设奇怪的 JULIA 开头的环境变量。

或者更新一下版本,试了下 1.0.31.1.0 rc1 直接 ]add CUDAdrv 然后 using CUDAdrv 都没什么问题,至少没报错。

谢谢回复。
是用管理员权限打开的。
环境变量也只有下面这些。暂时还是没找到解决方案,我看到那个帖子里有人也是这个情况。

Environment:
  JULIA_EDITOR = "C:\Software\JuliaPro\app-1.32.2\atom.exe" -a  #这里路径变了,因为我重装了JuliaPro
  JULIA_NUM_THREADS = 4
  JULIA_PKG_SERVER = https://pkg.juliacomputing.com/
  JULIA_PKG_TOKEN_PATH = C:\Users\suiey\.juliapro\token.toml

试下最新的版本看下?

我在win下也是正常的,不过用的不是JuliaPro。

Julia 1.1.0 rc1 + CuArrays 0.9.0

Cuda 8 + cudnn (这个好久之前装的了)