OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1722 Discussions

OpenCL CPU runtime cannot find any platforms

AfshinArefi
Beginner
2,904 Views

I am trying to test Intel's CPU runtime for OpenCL but my test program fails to get any platforms on the system and "clGetPlatformIDs" returns "CL_PLATFORM_NOT_FOUND_KHR".

To prepare the system I have followed the instructions to install the runtime through oneapi instructions, so I have installed:

sudo yum install intel-oneapi-runtime-opencl
sudo yum install intel-oneapi-runtime-compilers.x86_64
sudo yum install opencl-headers.noarch

 My Cpu is 

Intel(R) Xeon(R) CPU E5-2683 v4 @ 2.10GHz

which seems to have the requirements for the X86 CPU runtime.

 

The code I am test with is just a simple

#include<CL/cl.h>
#include<iostream>

using namespace std;

int main() {
    unsigned int num;
    cout << clGetPlatformIDs(0, NULL, &num) << endl;
    cout << num << endl;
    return 0;
}

Building with

g++ test.cpp -o test -lOpenCL

And the call returns error "-1001" which is "CL_PLATFORM_NOT_FOUND_KHR"
Using strace I can see that these related files are being loaded:

/opt/intel/oneapi/lib/libOpenCL.so.1
/etc/OpenCL/vendors/intel64.icd
/opt/intel/oneapi/lib/intel64/libintelocl.so


Am i missing a step? Something else I need to install?

 

P.S.: Installing the complete base toolkit

sudo yum install intel-basekit

Did not change anything.

Labels (2)
0 Kudos
5 Replies
AfshinArefi
Beginner
2,834 Views

Manually installing the older package for the runtime

l_opencl_p_18.1.0.015.tgz

Works well and as expected.

 

Any idea what is the problem with the new packages based on the oneAPI?

0 Kudos
cw_intel
Moderator
2,792 Views

Hi,

 

Can you tell me the version of your OS?  You can refer to the system requirements and check if your OS meets the requirements.  https://www.intel.com/content/www/us/en/developer/articles/system-requirements/intel-oneapi-base-toolkit-system-requirements.html

 

Thanks

0 Kudos
AfshinArefi
Beginner
2,744 Views

Thank you for your response. My OS is "CentOS Linux release 7.9.2009 (Core)" which is in the supported OSes I think.

0 Kudos
Ben_A_Intel
Employee
2,738 Views

Hi, did you source the setvars.sh configuration file to setup your oneAPI installation?

On my Ubuntu system this is done via:

$ source /opt/intel/oneapi/setvars.sh

For more information please see:

https://www.intel.com/content/www/us/en/develop/documentation/oneapi-programming-guide/top/oneapi-development-environment-setup/use-the-setvars-script-with-linux-or-macos/use-a-config-file-for-setvars-sh-on-linux-or-macos.html

I've found this is required to setup some library paths for the CPU OpenCL implementation.

0 Kudos
cw_intel
Moderator
2,728 Views

I'm sorry to tell you that the OpenCL CPU Runtime in oneAPI Base Toolkit doesn't support  Centos 7.  OpenCL CPU Runtime is shipped with Intel® oneAPI DPC++/C++ Compiler, and for the system requirements of the compiler, please refer to  https://www.intel.com/content/www/us/en/developer/articles/system-requirements/intel-oneapi-dpcpp-system-requirements.html

 

 

Thanks.

0 Kudos
Reply