Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8368243

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:20:25+00:00 2026-06-09T13:20:25+00:00

I have been playing around with OpenCL recently on my Ubuntu 12.04 machine. When

  • 0

I have been playing around with OpenCL recently on my Ubuntu 12.04 machine. When I call cl::Platform::get, I get an error code of -1001. After some research, I have found that this happens when the c call getPlatformIDs fails to find a valid platform, and that this can happen when there are no .icd files in your /etc/OpenCL/vendors/ directory, or when the implementation(s) referenced by the file(s) cannot be opened with a call to dlopen.
I, however have tested all of these possibilities. In /etc/OpenCL/vendors/, I found nvidia.icd, which contains the line ‘libcuda.so’. I then tried to call dlopen on this filename, and succeeded. Yet, my program still returns an error code of -1001! My nvidia drivers work well in all other respects, and I am able to compile the program. What could possibly be wrong?

Zistack

EDIT: Extra info: I am using the nvidia-current-dev drivers. I am running an nvidia GeForce GT 540M.

EDIT: I found something interesting just recently: Here is the spec from Khronos on the icd loader. It says:

Upon successfully loading a Vendor ICD’s library, the
ICD Loader queries the following functions from the library:
clIcdGetPlatformIDsKHR, clGetPlatformInfo, and
clGetExtensionFunctionAddress. If any of these functions
are not present then the ICD Loader will close and ignore
the library.

And here is a post from someone implementing an icd loader trying to load the nvidia platform. It says:

I can get clGetExtensionFunctionAddress and clGetPlatformInfo
from libcuda.so using dlsym(), and I can then use
clGetExtensionFunctionAddress to retrieve clIcdGetPlatformIDsKHR.

In my experementation, I was able to query only 2 out of 3 functions successfully – clGetPlatformInfo, and clGetExtensionFunctionAddress. The other one failed, as the forum post suggests it should: the author goes on to say that they use clGetExtensionFunctionAddress to retrieve clIcdGetPlatformIDsKHR. If the ICD loader implemented by Khronos follows the spec word for word, then it would make sense that it would fail, as the query for clIcdGetPlatformIDsKHR would fail, and the library would be ignored. Given that, it seems that the nvidia implementation does not seem to fully implement the spec, unless there is another, newer version that I am unaware of. Yet other people manage to get OpenCL working just fine on their nvidia platforms. Am I missing something?

  • 0 0 Answers
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T13:20:26+00:00Added an answer on June 9, 2026 at 1:20 pm

    I figured it out, the output of this command says it all:

    lspci | grep VGA
    00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
    01:00.0 VGA compatible controller: NVIDIA Corporation GF108 [GeForce GT 540M] (rev ff)
    

    I have optimus technology, and therefore my system uses the Intel VGA controller by default. As such, the nvidia platform is invalid because there is no hardware attached to the software from my program’s point of view. Unfortunately there is no easy way to just tell the operating system to ignore the Intel chip and just use the nvidia one, and nvidia doesn’t feel like supporting optimus under linux, so there are no drivers for this setup. However, installing bumblebee and running my program with optirun works like a charm.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been playing around with php-gtk recently and in the past I have
I have been playing around with the stack on a Ubuntu 9.04 system running
I have been playing around with this and wanted to get a second opinion.
I have been playing around with some debugging and wrote some C code that
I've been playing around with OpenCV and with alot of trial and error have
I have been playing around quite a lot with EF4 Code First and I
I have been playing around with jqgrid, and have the following question. To get
I have been playing around with some Python now and start to get a
I have been playing around in expect recently and I for the life of
I have been playing around with git on my local machine and everything makes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.