I follow the official documentation carefully and It seems that I have successfully installed cudatoolkit 9.0. (Please see output of nvcc -version and nvidia-smi below). I am using Nvidia driver version 384.183, which satisfies the requirement for cuda-9.0 (version >=384).
But I can’t compile any samples, here is the example when I compile the samples in /home/Kong/NVIDIA_CUDA-9.0_Samples/1_Utilities/deviceQuery/, it comes out the errors:
"/usr/local/cuda-9.0"/bin/nvcc -ccbin g++ -I../../common/inc -m64 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_70,code=compute_70 -o deviceQuery.o -c deviceQuery.cpp</li>
In file included from deviceQuery.cpp:20:0:
../../common/inc/helper_cuda.h: In function 'const char* _cudaGetErrorEnum(cudaError_t)':
../../common/inc/helper_cuda.h:285:14: error: 'cudaErrorNvlinkUncorrectable' was not declared in this scope
case cudaErrorNvlinkUncorrectable :
^
../../common/inc/helper_cuda.h:289:14: error: 'cudaErrorJitCompilerNotFound' was not declared in this scope
case cudaErrorJitCompilerNotFound :
^
../../common/inc/helper_cuda.h:293:14: error: 'cudaErrorCooperativeLaunchTooLarge' was not declared in this scope
case cudaErrorCooperativeLaunchTooLarge :
^
deviceQuery.cpp: In function 'int main(int, char**)':
deviceQuery.cpp:172:84: error: 'struct cudaDeviceProp' has no member named 'cooperativeLaunch'
erative Kernel Launch: %s\n", deviceProp.cooperative
^
deviceQuery.cpp:173:84: error: 'struct cudaDeviceProp' has no member named 'cooperativeMultiDeviceLaunch'
iDevice Co-op Kernel Launch: %s\n", deviceProp.cooperative
^
Makefile:273: recipe for target 'deviceQuery.o' failed
make: *** [deviceQuery.o] Error 1
It seems all the samples I compile have the problem with helper_cuda.h.
Here is the device information
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Sep__1_21:08:03_CDT_2017
Cuda compilation tools, release 9.0, V9.0.176
$ nvidia-smi
Tue Oct 29 16:45:10 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.183 Driver Version: 384.183 CUDA Version: 9.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Tesla V100-DGXS... On | 00000000:07:00.0 On | 0 |
| N/A 35C P0 38W / 300W | 101MiB / 32496MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 1 Tesla V100-DGXS... On | 00000000:08:00.0 Off | 0 |
| N/A 35C P0 38W / 300W | 10MiB / 32499MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 2 Tesla V100-DGXS... On | 00000000:0E:00.0 Off | 0 |
| N/A 35C P0 38W / 300W | 10MiB / 32499MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 3 Tesla V100-DGXS... On | 00000000:0F:00.0 Off | 0 |
| N/A 36C P0 37W / 300W | 10MiB / 32499MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1603 G /usr/lib/xorg/Xorg 89MiB |
+-----------------------------------------------------------------------------+
I have already add the PATH to my .zshrc file by adding these two lines.
export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Here is the echo:
$ echo $PATH
/home/Kong/anaconda2/bin:/usr/local/cuda-9.0/bin:/home/Kong/anaconda2/bin:/usr/local/cuda-9.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
$ echo $LD_LIBRARY_PATH
/usr/local/cuda-9.0/lib64
I have no idea what’s wrong with it, please help me fix this problem.