Graphics
Intel® graphics drivers and software, compatibility, troubleshooting, performance, and optimization
20598 Discussions

clGetPlatformIDs returns error (no OpenCL platform)

Mahmoodn
Beginner
1,323 Views

I have an Intel HD 530 with a Core-i5 6600 CPU as you can see below and according to Intel document page, this model supports OpenCL.

 

$ lscpu | grep "Model name"
Model name:                      Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz
$ sudo lshw -numeric -C display
  *-display                 
       description: VGA compatible controller
       product: HD Graphics 530 [8086:1912]
       vendor: Intel Corporation [8086]
       physical id: 2

 

Trying to run an OpenCL code, there is a section that first discovers available platforms and that is

 

// Discover and populate the platforms
status = clGetPlatformIDs(0, NULL, &numPlatforms);
cl_errChk(status, "Getting platform IDs", true);
if (numPlatforms > 0) {
  // Get all the platforms
  platforms = (cl_platform_id*)alloc(numPlatforms *
  sizeof(cl_platform_id));

  status = clGetPlatformIDs(numPlatforms, platforms, NULL);
  cl_errChk(status, "Getting platform IDs", true);
} else {
  // If no platforms are available, we shouldn't continue
  printf("No OpenCL platforms found\n");
  exit(-1);
}

 

 

As the program starts, it goes to the "else" part that shows the message that no OpenCL platform found.

How can I fix the problem?

0 Kudos
4 Replies
DeividA_Intel
Employee
1,299 Views

Hello Mahmoodn,  

  


Thank you for posting on the Intel® communities. I am sorry to know that you are having issues with your Intel® HD Graphics 530.

  


In order to better assist you, please provide the following:  


1. Can you provide more details about the issue?

2. Are you working on a project or developing something?

3. What is the tool that you are using?


 

Regards,  

Deivid A. 

Intel Customer Support Technician 



0 Kudos
Mahmoodn
Beginner
1,281 Views

Hi Deivid,

The issue is that I want to run an OpenCL code on Intel HD 530 which is supposed to support OpenCL. But in reality when I run the OpenCL function clGetPlatformIDs it returns no compatible device. That is weird.

I am working on some educational exercises dealing with OpenCL performance and benchmarking on different devices.

I am using Ubuntu 20.04 with the following OpenCL related packages:

$ dpkg -l | grep opencl
ii  ocl-icd-libopencl1:amd64                                    2.2.11-1ubuntu1                               amd64        Generic OpenCL ICD Loader
ii  ocl-icd-opencl-dev:amd64                                    2.2.11-1ubuntu1                               amd64        OpenCL development files
ii  opencl-c-headers                                            2.2~2019.08.06-g0d5f18c-1                     all          OpenCL (Open Computing Language) C header files
ii  opencl-clhpp-headers                                        2.1.0~~git51-gc5063c3-1                       all          C++ headers for OpenCL development
ii  opencl-headers                                              2.2~2019.08.06-g0d5f18c-1                     all          OpenCL (Open Computing Language) header files

I can share the code but since the code has multiple files, I guess it will make things complicated. As I said, the question is why clGetPlatformIDs returns no compatible device on 530.

Any thoughts on that?

0 Kudos
DeividA_Intel
Employee
1,270 Views

Hello Mahmoodn, 


  

Thank you for the information provided 



I will proceed to check the situation internally to confirm any steps or possible solutions and post back soon with more details. 


 

Best regards, 

Deivid A.  

Intel Customer Support Technician 



0 Kudos
DeividA_Intel
Employee
1,231 Views

Hello Mahmoodn.



Based on your issue and the investigation performed, I recommend you to check with the Linus distributor forums to verify with them if the latest driver is installed.


Also, I recommend you to check with the application/game developer to verify the compatibility with the operating system and the troubleshooting steps needed since OpenGL*, OpenCL*, and Vulkan* drivers must be installed separately, and are only distributed with the game or application that requires it. 



Please keep in mind that this thread will no longer be monitored by Intel.  

 

Regards,  

Deivid A.  

Intel Customer Support Technician  




0 Kudos
Reply