I have correctly set device number and cuda paths for different devices on different systems. However, I don’t know what is wrong with the following error:
CUDA error at euler3d.cu:433 code=35(cudaErrorInsufficientDriver) “cudaSetDevice(0)”
The build command is
$ make
nvcc -O2 -Xptxas -v --gpu-architecture=compute_61 --gpu-code=compute_61 euler3d.cu -o euler3d -I/usr/local/cuda-10.0/samples/common/inc -L/usr/local/cuda-10.0/samples/lib
nvcc -Xptxas -v -O3 --gpu-architecture=compute_61 --gpu-code=compute_61 euler3d_double.cu -o euler3d_double -I/usr/local/cuda-10.0/samples/common/inc -L/usr/local/cuda-10.0/samples/lib
nvcc -Xptxas -v -O3 --gpu-architecture=compute_61 --gpu-code=compute_61 pre_euler3d.cu -o pre_euler3d -I/usr/local/cuda-10.0/samples/common/inc -L/usr/local/cuda-10.0/samples/lib
pre_euler3d.cu:36:2: warning: #warning "the kernels may fail too launch on some systems if the block length is too large" [-Wcpp]
#warning "the kernels may fail too launch on some systems if the block length is too large"
^
pre_euler3d.cu:36:2: warning: #warning "the kernels may fail too launch on some systems if the block length is too large" [-Wcpp]
#warning "the kernels may fail too launch on some systems if the block length is too large"
^
nvcc -Xptxas -v -O3 --gpu-architecture=compute_61 --gpu-code=compute_61 pre_euler3d_double.cu -o pre_euler3d_double -I/usr/local/cuda-10.0/samples/common/inc -L/usr/local/cuda-10.0/samples/lib
nvidia-smi and CUDA_VISIBLE_DEVICES are also fine.
$ echo $CUDA_VISIBLE_DEVICES
0
$ nvidia-smi
Sat Nov 30 18:26:30 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 410.48 Driver Version: 410.48 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 108... Off | 00000000:02:00.0 Off | N/A |
| 0% 42C P8 14W / 250W | 0MiB / 11178MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 1 GeForce GTX 980 Ti Off | 00000000:81:00.0 Off | N/A |
| 44% 41C P8 15W / 250W | 0MiB / 6083MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
So, I don’t know who is causing the problem that the program may think there is another driver or so!
Any comment?