Centos 7, NVIDIA CUDA 8.0, Kernel build compile error, TESLA K80

I was able to install CUDA 8 with NVIDIA Driver 375.26 on a GTX1080 system without issue
using cuda_8.0.61.2_linux.run cuda_8.0.61_375.26_linux.run.

Trying the same on TESLA K80 produces the following error with NVIDIA driver version
375.26 and 384.66. Is there

FILE: /var/log/messages
Oct 5 05:27:37 ped-gpu-server1 sh: (bad exit status: 2)
Oct 5 05:27:37 ped-gpu-server1 sh: Error! Bad return status for module build on kernel: 3.10.0-862.14.4.el7.x86_64 (x86_64)
Oct 5 05:27:37 ped-gpu-server1 sh: Consult /var/lib/dkms/nvidia/384.66/build/make.log for more information.

FILE: /var/lib/dkms/nvidia/384.66/build/make.log
In file included from /var/lib/dkms/nvidia/384.66/build/common/inc/nv-linux.h:21:0,
from /var/lib/dkms/nvidia/384.66/build/nvidia/nv.c:13:
/var/lib/dkms/nvidia/384.66/build/common/inc/nv-mm.h:70:13: error: too few arguments to function ‘get_user_pages’
return get_user_pages(start, nr_pages, flags, pages, vmas);

rpm -qa | grep kernel


You should use the rpm packages, not the .run installer. Better use a driver that possibly contains patches for the kernel in use from a repo like rpmfusion/elrepo, then don’t install cuda but cuda_toolkit_8_0
Alternatively, using kernel-alt and then installing cuda from the rpm should also work, though you should use a newer cuda then to get a more recent driver.
The system with the 1080 probably has an old kernel, so there cuda 8 installed fine.

Thank you for the response. I was using an older Centos 7 kernel for the GTX 1080.
This important tip (not using the .run files with recent kernels) may be worth getting into the installation notes. I tried the repo versions and also had the same type of error. CUDA 10 installed and worked in 4 minutes, however I’ll need to see if anything else breaks in the user application.

If needed, you can install cuda 8 side-by-side with cuda 10 so it ses the kernel driver from cuda 10 which obviously works by adding the cuda 8 rpm, then install like mentioned just cuda_toolkit_8_0