On a new system, although I have installed cuda 9.2 on ubuntu 17.10, I am not able to run basic samples.
The compilation runs fine, but the matrixmul says
CUDA error at …/…/common/inc/helper_cuda.h:1147 code=30(cudaErrorUnknown) “cudaGetDeviceCount(&device_count)”
The bin/ and lib64/ are in the path.
No sign of broken installation
what is the output of:
dmesg |grep NVRM
lsmod |grep nouv
If you are on a laptop, you may need to figure out how to enable the dGPU, e.g. using nvidia-prime
Right. It turns out that nouveau was the bug.
root@orca2:~# lsmod |grep nouv
nouveau 1638400 13
mxm_wmi 16384 1 nouveau
video 40960 1 nouveau
i2c_algo_bit 16384 1 nouveau
ttm 94208 1 nouveau
drm_kms_helper 167936 1 nouveau
drm 356352 15 nouveau,ttm,drm_kms_helper
wmi 24576 3 wmi_bmof,mxm_wmi,nouveau
Before removing that, nvidia-smi said “NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.”
When I removed it using nomodeset in the kernel options, the nvidia-smi was fine and matrixmul was fine too.
Proper install instructions are contained in the linux install guide: