Install Nvidia driver for Tesla K40c

I upgraded my OS to ubuntu 16.04. With that my GCC version got upgraded to 5.4. I initially had CUDA 7.5 installed in my system prior to the OS upgrade. My actual intention was to install OPencv with CUDA enabled. So while i was installing OpenCV i got error in compiling CUDA files of OpenCV saying CUDA 7.5 doest support gcc 4.9 and later. So I had to go for CUDA 8.0. Now when I run
$ modinfo nv
modinfo: ERROR: Module nv not found.

AND

$ nvidia-smi
Failed to initialize NVML: Driver/library version mismatch

which made me think that I have to install Nvidia driver for Tesla K40c which i found out as nvidia-361.93.02( since my OS -Ubuntu 64 bit). Do I have to install the driver. My machine has got another Nvidia display card. My display Nvidia cards are

sudo lshw -numeric -C display
*-display
description: 3D controller
product: GK110BGL [Tesla K40c] [10DE:1024]
vendor: NVIDIA Corporation [10DE]
physical id: 0
bus info: pci@0000:05:00.0
version: a1
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list
configuration: driver=nvidia latency=0
resources: irq:42 memory:ee000000-eeffffff memory:b0000000-bfffffff memory:c0000000-c1ffffff
*-display
description: VGA compatible controller
product: GK107GL [Quadro K600] [10DE:FFA]
vendor: NVIDIA Corporation [10DE]
physical id: 0
bus info: pci@0000:04:00.0
version: a1
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
configuration: driver=nvidia latency=0
resources: irq:41 memory:ec000000-ecffffff memory:d0000000-dfffffff memory:e0000000-e1ffffff ioport:c000(size=128) memory:ed000000-ed07ffff

can someone guide me in this. Do i have to install the nvidia driver

I installed “sudo apt-get install nvidia-361.93.02”

I get result for $ nvidia-smi

±-----------------------------------------------------+
| NVIDIA-SMI 361.42 Driver Version: 361.42 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Quadro K600 Off | 0000:04:00.0 On | N/A |
| 25% 46C P8 N/A / N/A | 49MiB / 1023MiB | 0% Default |
±------------------------------±---------------------±---------------------+
| 1 Tesla K40c Off | 0000:05:00.0 Off | 0 |
| 23% 43C P8 21W / 235W | 23MiB / 11519MiB | 0% Default |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1029 G /usr/lib/xorg/Xorg 0MiB |
| 0 20576 G /usr/lib/xorg/Xorg 39MiB |
±----------------------------------------------------------------------------+

Result for $ modinfo nv
modinfo: ERROR: Module nv not found.

No change

http://unix.stackexchange.com/questions/70990/why-does-modinfo-say-could-not-find-module-yet-lsmod-claims-the-module-is-loa http://askubuntu.com/questions/251754/why-would-modinfo-say-a-module-is-not-found-when-it-appears-with-lsmod Found the following link which speak about modinfo and Nvidia driver
and

It says run depmod -a and modprobe --resolve-alias nvidia, from the result get the alias name and run "$ modinfo

You’ve not installed the driver correctly.

Follow the instructions in the linux install guide for CUDA 8.0 carefully.