nV News Forums


nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   Problems with OpenCL (http://www.nvnews.net/vbulletin/showthread.php?t=144781)

Archaon 02-11-10 02:56 PM

Problems with OpenCL
1 Attachment(s)

i want to test OpenCL on my Notebook with an NVIDIA 8600M GT GPU. I installed the NVIDIA Toolkit and SDK 3.0_beta1. All compiled fine but when I try to run the OpenCL samples I get an error the CUDA samples run without errors. The Driver versions I tried were 195.36.03 and 190.53.

The Error:

/opt/cuda/sdk/OpenCL/bin/linux/release/oclDeviceQueryoclDeviceQuery.exe Starting...

OpenCL SW Info:

 Error -1001 in clGetPlatformIDs Call !!!

Segmentation fault

Bug report is attached.

Stephen Warren 02-11-10 09:13 PM

Re: Problems with OpenCL
You'll probably find more people familiar with CUDA and OpenCL issues at http://forums.nvidia.com/

tswe 09-09-10 06:02 PM

Re: Problems with OpenCL
same problem here.

I am on opensuse 11.1 and use the prepackaged drivers from ftp://download.nvidia.com/opensuse and the package is missing some files, like lobOpenCL.so, which I extracted from the .run file and put manually in the /usr/lib64 directory together with creating some symlinks (see the .manifest file in the extracted .run nvidia driver). I can compile my opencl programs fine (http://pastebin.com/3BF2vDzc, http://www.thebigblob.com/getting-st...gpu-computing/), but when I run, the first opencl-related function clGetPlatformIDs returns an error code (-1001).

Again, I try to figure out what the prepackaged driver is missing since I suspect the error there (but open to other suggestions, too). If I would use the nvidia .run script driver, the problem probably does not exist. CUDA executables run fine (compiled on an other opensuse machine without nvidia card)

If anyone has hints, I would appreciate it, and I would love to see the prepackaged driver work very well, due to it's ease of use for probably many newcomers to opensuse.

opensuse 11.1 64bit, nvidia quadrofx3700 driver version 256.53

jcornwall 09-10-10 05:19 AM

Re: Problems with OpenCL
To support multiple OpenCL implementations on a single system, Khronos introduced an ICD architecture into /etc/OpenCL/vendors. e.g.

[jay@deimos ~]$ cat /etc/OpenCL/vendors/nvidia.icd

You probably just need to package that.

tswe 09-14-10 01:08 AM

Re: Problems with OpenCL
the nvidia.icd file with only contents "libcuda.so" has always been at that location (/etc/OpenCL/vendors)

what else do I need? the packager did not create a complete package so that it creates an installation equivalent to the NVIDIA-Linux-x86_64-256.53.run

VLJ 09-14-10 03:36 AM

Re: Problems with OpenCL
libOpenCL.so is shipped with Nvidia drivers on their website, not with the GPU computing toolkit/sdk.
This is the right way to do : people wanting to use your application won't have to download some developpement package, as the driver provide this library.

Please note that I mentionned the Nvidia drivers on their website, not the nvidia driver available in Nvidia repository for Opensuse. The packaged drivers for Opensuse strangely lacks libOpenCL.so (but ships libcuda.so ), so the solution is to extract libOpenCL.so from nvidia installer :
sh NVIDIA-*.run -x && OCLLIB=`find . -iname 'libOpenCL.so*'` && sudo cp $OCLLIB /usr/lib64

tswe 09-14-10 11:48 AM

Re: Problems with OpenCL
I did extract the libOpenCL.so from the NVIDIA-Linux-xxxxxx.run file and placed in /usr/lib64, as well as created symlinks, as well as placing the icd file. In fact, I took my notebook w/ nvidia chip, and installed opensuse 11.1 fresh, and installed the driver from the NVIDIA-Linux-xxxxx.run file, just to compare to my driver installation from opensuse package on my work PC, and extract additional missing files.
Still, I have the same problem (which is that when clGetPlatformIDs is called [the first cl-related function in my program] I get (-1001).
What else is missing? I can't identify it.

conky 09-14-10 12:12 PM

Re: Problems with OpenCL
Did you run ldconfig to rebuild the library cache after copying the libraries?

tswe 09-14-10 12:21 PM

Re: Problems with OpenCL
yes, I issued ldconfig after copying .so files.

hl_ 09-15-10 09:51 AM

Re: Problems with OpenCL
For OpenCL to work on NVidia hardware, as far as I know you need

a) libOpenCL
b) nvidia.icd file in /etc/OpenCL/vendors
c) libcuda
d) libnvidia-compiler (that's the OpenCL compiler)

All times are GMT -5. The time now is 08:43 PM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.