But I get the following error:
Error calling clGetPlatformIDs. Error code: -1001
Any ideas on why this is happening?
nvidia-smi returns the GPU GTX 750 Ti that I have, nvcc -V returns Cuda compilation tools, release 7.5, V7.5.17, and the above program compiles as well with the OpenCL libraries, so i believe that i installed CUDA correctly as well.
So none of the above things worked. So I ran dmesg|grep NVRM, heres the output:
[ 10.206595] NVRM: The NVIDIA GPU 0000:01:00.0 (PCI ID: 10de:1380)
[ 10.206595] NVRM: installed in this system is not supported by the 304.131
[ 10.206595] NVRM: NVIDIA Linux driver release. Please see ‘Appendix
[ 10.206595] NVRM: A - Supported NVIDIA GPU Products’ in this release’s
[ 10.206595] NVRM: README, available on the Linux driver download page
[ 10.206595] NVRM: at www.nvidia.com.
[ 10.206744] NVRM: The NVIDIA probe routine failed for 1 device(s).
[ 10.206745] NVRM: None of the NVIDIA graphics adapters were initialized!
[ 18.076754] NVRM: The NVIDIA GPU 0000:01:00.0 (PCI ID: 10de:1380)
[ 18.076754] NVRM: installed in this system is not supported by the 304.131
[ 18.076754] NVRM: NVIDIA Linux driver release. Please see ‘Appendix
[ 18.076754] NVRM: A - Supported NVIDIA GPU Products’ in this release’s
[ 18.076754] NVRM: README, available on the Linux driver download page
[ 18.076754] NVRM: at www.nvidia.com.
[ 18.076960] NVRM: The NVIDIA probe routine failed for 1 device(s).
[ 18.076961] NVRM: None of the NVIDIA graphics adapters were initialized!
[ 18.130159] NVRM: The NVIDIA GPU 0000:01:00.0 (PCI ID: 10de:1380)
[ 18.130159] NVRM: installed in this system is not supported by the 304.131
[ 18.130159] NVRM: NVIDIA Linux driver release. Please see ‘Appendix
[ 18.130159] NVRM: A - Supported NVIDIA GPU Products’ in this release’s
[ 18.130159] NVRM: README, available on the Linux driver download page
[ 18.130159] NVRM: at www.nvidia.com.
[ 18.130394] NVRM: The NVIDIA probe routine failed for 1 device(s).
[ 18.130395] NVRM: None of the NVIDIA graphics adapters were initialized!
[2599693.694878] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 352.63 Sat Nov 7 21:25:42 PST 2015
[2601583.725270] NVRM: API mismatch: the client has the version 352.39, but
[2601583.725270] NVRM: this kernel module has the version 352.63. Please
[2601583.725270] NVRM: make sure that this kernel module and all NVIDIA driver
[2601583.725270] NVRM: components have the same version.
So you have a history of several drivers installed on this system (304.131, 352.39, 352.63), and the driver installation now is not correct.
In order to unravel this, it would be necessary to review the exact history of the type of install that was used for each driver as well as the type of install that was done to install the CUDA toolkit.
It may be simpler to start over with a clean install of the OS. If that’s not possible, then I suggest reviewing section 2.7 of the installation guide:
also familiarize yourself with the general difference between “package manager” and “runfile” installer methods as described in the guide. Then follow the steps in section 2.7 to remove all traces of each and every driver. Then pick one method and use that to install the driver of your choice.