Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error -1001 in clGetPlatformIDs Call !

Tags:

nvidia

opencl

I am trying to start working with OpenCL. I have two NVidia graphics card, I installed "developer driver" as well as SDK from NVidia website. I compiled the demos but when I run

./oclDeviceQuery

I see:

OpenCL SW Info:

Error -1001 in clGetPlatformIDs Call !!!

How can I fix it? Does it mean my nvidia cards cannot be detected? I am running Ubuntu 10.10 and X server works properly with nvidia driver.

I am pretty sure the problem is not related to file permissions as it doesn't work with sudo either.

like image 989
tnorgd Avatar asked Feb 10 '11 16:02

tnorgd


3 Answers

In my case I have solved it by installing nvidia-modprobe package available in ubuntu (utopic/multiverse). And the driver itself (v346) was installed from
https://launchpad.net/~mamarley/+archive/ubuntu/nvidia

Concretely, I have installed nvidia-opencl-icd-346, nvidia-libopencl1-346, nvidia-346-uvm, nvidia-346 and libcuda1-346. Not sure if they are all needed for OpenCL.

like image 159
EvgenijM86 Avatar answered Oct 15 '22 10:10

EvgenijM86


This is a result of not installing the ICD portion of Nvidia's openCL runtime. The ICD profile will instruct your application of the different openCL implementations installed on the system as multiple implementations from different vendors can coexist. Whe your application does not find the ICD information it gives the Error -1001.

like image 6
joachimd Avatar answered Oct 15 '22 09:10

joachimd


Run your program as root. In case of success: you have trouble with cl_khr_icd- extension to load the vendor driver. If you not running X11, you have to create device files manually or by (boot-)script: ERROR: clGetPlatformIDs -1001 when running OpenCL code (Linux)

like image 3
Vlad Avatar answered Oct 15 '22 09:10

Vlad