Hi, when I am building “CUDAnative” package on a server, I get the following error:
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: https://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.6.2 (2017-12-13 18:08 UTC)
_/ |\__'_|_|_|\__'_| |
|__/ | x86_64-redhat-linux
julia> Pkg.build("CUDAnative")
INFO: Building LLVM
INFO: LLVM.jl has already been built for this toolchain, no need to rebuild
INFO: Building CUDAdrv
INFO: Building CUDAnative
=================================================================================[ ERROR: CUDAnative ]=================================================================================
LoadError: could not spawn `/sw/software/cuda/9.1/centos7.3_binary/nvcc --version`: no such file or directory (ENOENT)
while loading /d/home/xiaoqihu/.julia/v0.6/CUDAnative/deps/build.jl, in expression starting on line 155
I looked up nvcc, it is located at /sw/software/cuda/9.1/centos7.3_binary/bin/nvcc
, therefore it can’t spawn because it is spawning at the wrong location.
I also looked up where can I change this behavior. Correct me if I am wrong, I think it is the find_toolkit()
in CUDAapi package. In the documentation of this function, it says:
...
The behavior of this function can be overridden by defining the `CUDA_PATH`, `CUDA_HOME` or
`CUDA_ROOT` environment variables, which should point to the root of the CUDA toolkit.
I have tried to define CUDA_HOME as /sw/software/cuda/9.1/centos7.3_binary/bin/
but it still gives the above error.