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.

Ubuntu version of OpenCL

Polar01
Beginner
4,269 Views

Hi,

Is there an installation package for Ubuntu ?

If not, it will be nice to have, a lot of customers would like to run my soft. on Ubuntu with the Intel SDK !

Thanks

0 Kudos
38 Replies
nishma_l_
Beginner
640 Views

Hi Robert,

I uninstall AMD SDK and now no error is generated with clinfo and I got the following

Number of platforms:                 1
  Platform Profile:                 FULL_PROFILE
  Platform Version:                 OpenCL 1.2 LINUX
  Platform Name:                 Intel(R) OpenCL
  Platform Vendor:                 Intel(R) Corporation
  Platform Extensions:                 cl_khr_icd cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_depth_images cl_khr_3d_image_writes cl_intel_exec_by_local_thread cl_khr_spir cl_khr_fp64


  Platform Name:                 Intel(R) OpenCL
Number of devices:                 1
  Device Type:                     CL_DEVICE_TYPE_CPU
  Vendor ID:                     8086h
  Max compute units:                 4
  Max work items dimensions:             3
    Max work items[0]:                 8192
    Max work items[1]:                 8192
    Max work items[2]:                 8192
  Max work group size:                 8192
  Preferred vector width char:             1
  Preferred vector width short:             1
  Preferred vector width int:             1
  Preferred vector width long:             1
  Preferred vector width float:             1
  Preferred vector width double:         1
  Native vector width char:             16
  Native vector width short:             8
  Native vector width int:             4
  Native vector width long:             2
  Native vector width float:             4
  Native vector width double:             2
  Max clock frequency:                 2530Mhz
  Address bits:                     64
  Max memory allocation:             2056365056
  Image support:                 Yes
  Max number of images read arguments:         480
  Max number of images write arguments:         480
  Max image 2D width:                 16384
  Max image 2D height:                 16384
  Max image 3D width:                 2048
  Max image 3D height:                 2048
  Max image 3D depth:                 2048
  Max samplers within kernel:             480
  Max size of kernel argument:             3840
  Alignment (bits) of base address:         1024
  Minimum alignment (bytes) for any datatype:     128
  Single precision floating point capability
    Denorms:                     Yes
    Quiet NaNs:                     Yes
    Round to nearest even:             Yes
    Round to zero:                 No
    Round to +ve and infinity:             No
    IEEE754-2008 fused multiply-add:         No
  Cache type:                     Read/Write
  Cache line size:                 64
  Cache size:                     262144
  Global memory size:                 8225460224
  Constant buffer size:                 131072
  Max number of constant args:             480
  Local memory type:                 Global
  Local memory size:                 32768
  Kernel Preferred work group size multiple:     128
  Error correction support:             0
  Unified memory for Host and Device:         1
  Profiling timer resolution:             1
  Device endianess:                 Little
  Available:                     Yes
  Compiler available:                 Yes
  Execution capabilities:                
    Execute OpenCL kernels:             Yes
    Execute native function:             Yes
  Queue on Host properties:                
    Out-of-Order:                 Yes
    Profiling :                     Yes
  Platform ID:                     0x1c9ceb0
  Name:                         Intel(R) Core(TM) i5 CPU       M 540  @ 2.53GHz
  Vendor:                     Intel(R) Corporation
  Device OpenCL C version:             OpenCL C 1.2
  Driver version:                 1.2.0.10002
  Profile:                     FULL_PROFILE
  Version:                     OpenCL 1.2 (Build 10002)
  Extensions:                     cl_khr_icd cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_depth_images cl_khr_3d_image_writes cl_intel_exec_by_local_thread cl_khr_spir cl_khr_fp64

 

Robert_I_Intel
Employee
640 Views

Hi Nishma,

One thing I am curious about: if you reinstall the AMD SDK, does that fix the problem and do you see the GPU device as well?

nishma_l_
Beginner
640 Views

Hi Robert,

I tried running GEMM and bitonic sort and it doesn't give error now. They use CPU. Does this means I have install OpenCL correctly? Could you please tell me how to run samples using GPU?

Best Regards,

Nishma Laitonjam

Robert_I_Intel
Employee
640 Views

Hi Nishma,

Yes, you installed the CPU OpenCL runtime correctly. You could try to reinstall AMD SDK and see if you could get your GPU OpenCL device back. Your integrated GPU is much too old, so we don't have an OpenCL runtime that supports it.

Robert_I_Intel
Employee
640 Views

Hi Tata,

We don't support a GPU driver for Sandy Bridge. Sorry!

Kris_H_
Beginner
640 Views

Hi Robert,

My environment is ubuntu14.04 64-bit and Intel® Core™ i7-4770 CPU @ 3.40GHz × 8. 
I've download and installed the Intel opencl backend from https://software.intel.com/en-us/articles/opencl-drivers#latest_linux_driver

Also I installed the clinfo:  $ sudo apt-get install clinfo

And then I ran clinfo: $ sudo clinfo

But it crashed:

terminate called after throwing an instance of 'unsigned long'

Could you help on it?

Best Regards,

Kris

Vitaliy_K_
Beginner
640 Views

Hello,

I have the same environment and did exactly what is recommended in https://software.intel.com/en-us/node/671831 after installation of Intel OpenCL from https://software.intel.com/en-us/intel-opencl/download. But, when invoking Eclipse Mars.2 I have messages kind of "Cannot get machine/platform/device list. Failed to initialize code builder API." What may be the problem?

Thanks

Nicholas_F_
Beginner
640 Views

Hi Robert,

I have a similar problem to Vitali K. I am using Eclipse Neon and I also get messages of the type "Cannot get machine/platform/device list. Failed to initialize code builder API." The command line version of ioc64 seems to work.

Thanks,

Nik

 

Robert I. (Intel) wrote:

Jeffrey_M_Intel1
Employee
640 Views

Looking for more info on eclipse.  Hope to get back to you soon.

Sudipta_P_Intel
Employee
640 Views

Hi,

I am trying to install intel SDK for openCL on a virtual machine. when I am trying to install opencl runtime env then it is giving output as "CPU is not supported". I complied the matrix multiplication program. It is compiling with some warning and creating the executable file. But when I am running the executable then it is giving  error as follows:

./GEMM: error while loading shared libraries: libOpenCL.so.1: cannot open shared object file: No such file or directory

UPDATE:

now I fixed the path problem I think. A new error is coming.

root@VM1:/home/sudiptavm/workvm/codeSamples/withOpenCL/matrix_mult/GEMM# ./GEMM
Platforms (1):
    [0] Intel(R) OpenCL [Selected]
Devices (1):
    [0] QEMU Virtual CPU version 2.2.0 [Selected]

[ ERROR ] Sample application specific error: OpenCL error CL_DEVICE_NOT_AVAILABLE happened in file ../common/oclobject.cpp at line 447.

How can I solve it?

 

note: I installed OpenCL in the host machine which has Intel(R) Xeon(R) CPU E31280 @ 3.50GHz

With regards,

Sudipta

 

Jeffrey_M_Intel1
Employee
640 Views

What do you see with the system analyzer?  https://software.intel.com/en-us/articles/mss-sys-analyzer-linux

You can also see more about how OpenCL initialization is handling this environment  with the Platform/Device Capabilities Viewer Sample.

siromoni__sandipan
640 Views

 

 

Hi ,

 

I am  trying to install intel opencl sdk on CentOS 7.2 core , but while installing it is giving the error   GPU not supported 

 

I am using intel i5 core on x86  and os is here on Vertual mechine Cent Os 7.2 core   , 

 

can anyone help me on this 

 

thank u

siromoni__sandipan
640 Views

 

while installing the intel opencl sdk on x86  intel i5 core  and os in vertual machine is  CentOS  7.2 core 

I am getting this error  , 

but I have installed  that dkms packages and java 8 also installed  and 3D graphics option in VM ware also done 

 

but again instalation time it is giving the same error  i.e  GPU not supported 

 

need help , can anyone help on this issue 

 

opncl.PNG

Safarov__Timur
Beginner
640 Views

Я получаю эту ошибку, 

но я установил, что dkms 

 

но опять же время установки дает ту же ошибку, то есть GPU не поддерживается 

 

нужна помощь, может кто-нибудь помочь по этой проблеме 

Safarov__Timur
Beginner
640 Views

I am getting this error  , 

but I have installed  that dkms 

 

but again instalation time it is giving the same error  i.e  GPU not supported 

 

need help , can anyone help on this issue 

Michael_C_Intel1
Moderator
640 Views

Hi TimurS,

Can you share what CPU SKU the system is on? What kernel the system is on?

For linux setup... please see these two pages:

https://software.intel.com/en-us/articles/sdk-for-opencl-gsg

https://software.intel.com/en-us/articles/sdk-for-opencl-2017-gsg-linux-os

-MichaelC

valade__trace
Beginner
640 Views

Hi, I am a new OCL dev trying to get everything off the ground so I can start playing with it.

I am running on an Inspiron prebuilt laptop running window 10 home, and operate in an Ubuntu 16.04.4 terminal.

When compiling through the C++ wrapper I get a large error string as follows:

/tmp/ccTKf6fE.o: In function `cl::detail::ReferenceHandler<_cl_device_id*>::release(_cl_device_id*)':                   oCLtest.cpp:(.text._ZN2cl6detail16ReferenceHandlerIP13_cl_device_idE7releaseES3_[_ZN2cl6detail16ReferenceHandlerIP13_cl_device_idE7releaseES3_]+0x14): undefined reference to `clReleaseDevice'                                                 /tmp/ccTKf6fE.o: In function `cl::detail::ReferenceHandler<_cl_context*>::release(_cl_context*)':                       oCLtest.cpp:(.text._ZN2cl6detail16ReferenceHandlerIP11_cl_contextE7releaseES3_[_ZN2cl6detail16ReferenceHandlerIP11_cl_contextE7releaseES3_]+0x14): undefined reference to `clReleaseContext'                                                    /tmp/ccTKf6fE.o: In function `cl::detail::ReferenceHandler<_cl_command_queue*>::release(_cl_command_queue*)':           oCLtest.cpp:(.text._ZN2cl6detail16ReferenceHandlerIP17_cl_command_queueE7releaseES3_[_ZN2cl6detail16ReferenceHandlerIP17_cl_command_queueE7releaseES3_]+0x14): undefined reference to `clReleaseCommandQueue'                                   collect2: error: ld returned 1 exit status     

after the program defaults to OpenCL2.0.

I've done some poking around and believe that I haven't installed the SDK properly, or at the very least haven't linked it correctly, though I'm not familiar enough with bash commands to make any sense of what I'm supposed to do through it. Thanks in advance.

Michael_C_Intel1
Moderator
640 Views

Hi TraceV,

Can you share your linker command? If your ocltest.cpp source is appropriate for sharing... can you start a new thread on the forum and attach it?

 

Edits:

Thanks for the comment. This looks like the OpenCL library isn't being linked in properly.

On Linux OS the linker will need to see libOpenCL.so... On Windows OS the linker will need to see OpenCL.lib... both are available from the Intel SDK for OpenCL Applications 2017 and 2019 beta respectively.

Adding -lOpenCL -L<path to libOpenCL.so> may get you across the finish line.

Also... Look out for deprecated functions when using OpenCL 2.0 which may not link as expected without the usage of macros...  Some functions only exist for OpenCL 2.0 while some exist in 1.2 but are sometimes exposed with #define CL_USE_DEPRECATED_OPENCL_1_2_APIS... Examples that users evaluate may not specify which OpenCL version they expect, so a developer needs to consider tweaking the code in accordance with their platforms.

 

/Edits

Thanks for your interest,

-MichaelC

Reply