NVIDIA driver is not confirmed on Ubuntu 14.04

I have downloaded CUDA-SDK-samples, CUDA-Included-Driver,CUDA-toolkit from NVIDIA website. Also, the version of gcc is 4.8, and nvcc is already installed in ububtu.

Detailed Information of Ubunut is like this:

Linux cuda 3.13.0-24-generic #46-Ubuntu SMP 
Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

When I try to check the NVIDIA driver using ‘nvidia-smi’ command, error msg appears:

Unable to determine the device handle for GPU 0000:07:00.0: Unknown Error

So, I used ‘deviceQueryDrv’ and result of the query is:

./deviceQueryDrv Starting...

CUDA Device Query (Driver API) statically linked version
cuInit(0) returned 101
-> CUDA_ERROR_INVALID_DEVICE (device specified is not a valid CUDA device)
Result = FAIL

At first, I thought this msg means that CUDA is not supported on this GPU. However, it is in the list of NVIDIA-CUDA-SUPPORTED-PRODUCT. The informaition of this GPU is like this:

07:00.0 VGA compatible controller: NVIDIA Corporation Device 1001 (rev a1) (prog-if 00 [VGA controller])
        Subsystem: NVIDIA Corporation Device 1078
        Flags: bus master, fast devsel, latency 0, IRQ 40
        Memory at dc000000 (32-bit, non-prefetchable) 
        Memory at c8000000 (64-bit, prefetchable) 
        Memory at d0000000 (64-bit, prefetchable) 
        I/O ports at 4000 
        [virtual] Expansion ROM at dd000000 [disabled] 
        Capabilities: [60] Power Management version 3
        Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [78] Express Endpoint, MSI 00
        Capabilities: [100] Virtual Channel
        Capabilities: [128] Power Budgeting <?>
        Capabilities: [420] Advanced Error Reporting
        Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
        Capabilities: [900] #19
        Kernel driver in use: nvidia

NVIDIA Corporation Device 1001 is called ‘Titan Z’ and the driver installed in this computer is 331.xx.

I cannot figure out which part is wrong.

NIVDIA퍽킹

Oh, I forgot to upload screenshots of executing CUDA

./test.cu.cpp.ii: line 9: syntax error near unexpected token `('
./test.cu.cpp.ii: line 9: `static char __nv_inited_managed_rt = 0; static void **__nv_fatbinhandle_for_managed_rt; static void __nv_save_fatbinhandle_for_managed_rt(void **in){__nv_fatbinhandle_for_managed_rt = in;} static char __nv_init_managed_rt_with_module(void **); static inline void __nv_init_managed_rt(void) { __nv_inited_managed_rt = (__nv_inited_managed_rt ? __nv_inited_managed_rt : __nv_init_managed_rt_with_module(__nv_fatbinhandle_for_managed_rt));}'

Code of the test.cu:

#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <cuda_runtime.h>


__global__ void testKernel(int *value){
        *value=3;
}

int main(){
        int *gpuVal;
        int *cpuVal;
        cpuVal = (int*) malloc(sizeof(int));
        *cpuVal = 7;

        //allocate gpmemory
        cudaMalloc((void**) &gpuVal, sizeof(int));

        testKernel<<<1,1>>>(gpuVal);
        cudaMemcpy(cpuVal,gpuVal, sizeof(int),cudaMemcpyDeviceToHost);
        printf("value is = %d",*cpuVal);

        //free gpmemory
        cudaFree(gpuVal);
        return 0;
}

I think your install is just badly messed up and out of sync. You probably have mismatched pieces.

It will probably be easier if you use the runfile installer method:

[url]http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux/index.html#runfile[/url]

grab the necessary runfile installer from here:

[url]https://developer.nvidia.com/cuda-downloads[/url]

i.e. this:

[url]http://developer.download.nvidia.com/compute/cuda/6_5/rel/installers/cuda_6.5.14_linux_64.run[/url]

This is result of running CUDA_samples in SDK.

CUDA error at ../../common/inc/helper_cuda.h:1032 code=35(cudaErrorInsufficientDriver) "cudaGetDeviceCount(&device_count)"
cuda@cuda:~/NVIDIA_CUDA-6.5_Samples/0_Simple/simplePrintf$

According to NVIDIA CUDA Runtime api, ‘This indicates that the installed NVIDIA CUDA driver is older than the CUDA runtime library. This is not a supported configuration. Users should install an updated NVIDIA display driver to allow the application to run.’. See: http://developer.download.nvidia.com/compute/cuda/4_1/rel/toolkit/docs/online/group__CUDART__TYPES_g3f51e3575c2178246db0a94a430e0038.html

I think it is problem caused by NVIDIA driver. However, when I try to get information about NVIDIA driver, it always shows error; I wonder which one is correct reason: invalid(old) driver or non-successful driver installation.

An easy way to find out is to re-install the driver using the runfile method suggested by txbob. Have you had a chance to try this? I have installed the Linux driver using the runfile method many times and never had a problem.