where is opencl.so?

I’m trying to compile the example in http://developer.download.nvidia.com/compu…_2.3a_linux.run but it keeps saying

/usr/bin/ld: cannot find -lOpenCL

Where or how could I get this libOpenCL.so? Does this come with the driver? Because from the 2.3 SDK page there is no OpenGL at all, and with the above 2.3a_linux.run, no OpenCL.so is generated either.

The release notes points to gpucomputingsdk_2.3_linux.run, but cuda sdk page only has a file name http://developer.download.nvidia.com/compu…k_2.3_linux.run, so which is which?


It comes with a kernel driver package which has OpenCL support in the same way that the CUDA driver API library ships with the driver. So it probably means you don’t have a driver version with OpenCL installed.

our IT administrator insists it’s in the SDK. Now I’m very confused…

He/she is wrong. This is the contents of an OpenCL driver package:

avid@cuda:~$ ls -l NVIDIA-Linux-x86_64-190.29-pkg2/usr/lib

total 40644

-rwxr-xr-x 1 avid avid  3619136 2009-08-25 07:42 libcuda.so.190.29

-rwxr-xr-x 1 avid avid 20159416 2009-08-25 07:42 libGLcore.so.190.29

-rwxr-xr-x 1 avid avid	  652 2009-08-25 07:42 libGL.la

-rwxr-xr-x 1 avid avid   907392 2009-08-25 07:42 libGL.so.190.29

-rwxr-xr-x 1 avid avid 11475368 2009-08-25 07:42 libnvcompiler.so.190.29

-rwxr-xr-x 1 avid avid   136200 2009-08-25 07:42 libnvidia-cfg.so.190.29

-rwxr-xr-x 1 avid avid	 6360 2009-08-25 07:42 libnvidia-tls.so.190.29

-rwxr-xr-x 1 avid avid  3709248 2009-08-25 07:42 libOpenCL.so.1.0.0

-rwxr-xr-x 1 avid avid  1457968 2009-08-25 07:42 libvdpau_nvidia.so.190.29

-rwxr-xr-x 1 avid avid	 5016 2009-08-25 07:42 libvdpau.so.190.29

-rwxr-xr-x 1 avid avid	49896 2009-08-25 07:42 libvdpau_trace.so.190.29

drwxr-xr-x 2 avid avid	 4096 2009-08-25 07:42 tls

You can see both libcuda and libOpenCL.

Is libOpenCL.so not available in other recent versions of the driver? I recently installed cuda-2.3. It came with driver version 190.53. The CUDA download page mentions the following

Since it says “since 190.29” I assumed that OpenCL support should be present in 190.53 too. So when I went to download OpenCL stuff in Nvidia’s website I did not get the 190.29 driver that it recommends.

I am getting the same error that dgetrf is getting.

If libOpenCL.so is available only in driver version 190.29, I wonder why they say it is available “since 190.29”. Am I missing something simple here?

  • Can I just copy the libOpenCL.so from the 190.29 package to /usr/lib (without installing version

    190.29 and retaining version 190.53)?

  • Will cuda-2.3 work with 190.29?


I believe that message on the download site is incorrect. 190.29 is the most recent 190 series driver for linux released that contains OpenCL support. The current 190.53 definitely does not. The current 195.30 beta driver also includes OpenCL.

I very much doubt it. There is a whole lot of other stuff (the complete JIT compiler for example) which is required to make OpenCL work. Just copying the client library won’t fix that.

Yes it will. The cuda 3.0 beta will not, however.

I got a “API mismatch” error when I tried to just copy libOpenCL.so and libnvcompiler.so from 190.29.

I uninstalled 190.53 and installed 190.29 and was able to compile the SDK samples. Ran an couple of them and found no issues. Also tried a couple of CUDA sample programs. No issues so far.

avidday, thanks for the help.