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.
1663 Discussions

Issues running OpenCL on Intel NUC5i5RYK with Centos 7.2

Wolfgang_N_
Beginner
315 Views
I tried to use OpenCL on a Intel NUC5i5RYK kit with
  • CPU: Intel(R) Core(TM) i5-5250U CPU @ 1.60GHz
  • GPU: Intel Corporation Broadwell-U Integrated Graphics [8086:1626] (rev 09)
  • BIOS: RYBDWi35.86A.0359.EB
  • OS: Centos 7.2

I get the following message in /var/log/dmesg

  • snd_hda_intel 0000:00:03.0: failed to add i915 component master (-19)
and xrandr says:
  • xrandr: Failed to get size of gamma for output default
I do not have any problems to install OpenCL but running the examples from intel_ocl_samples.zip produce runtime errors.
Installing intel_sdk_for_opencl_2016_6.2.0.1761_x64.tar.gz on a fresh Centos 7.2 installation
  • Linux nuc.workgroup 3.10.0-327.36.2.el7.x86_64 #1 SMP Mon Oct 10 23:08:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
running CapsBasic crashes with
  • OpenCL error with code -1001 happened in file capsbasic.cpp at line 106. Exiting...
Installing intel-opencl-2.0-2.0-54425.tar.gz on a patched kernel
  • Linux nuc.workgroup 4.4.0.intel.r16.5 #1 SMP Sat Oct 22 12:00:28 CEST 2016 x86_64 x86_64 x86_64 GNU/Linux
CapsBasic crashes with
  • terminate called after throwing an instance of 'OCLRT::xcb_error' what():  XCB ERROR: cannot open device: !
Installing the brand new intel-opencl-2.0-r3.0-57406.zip on a patched kernel
  • Linux nuc.workgroup 4.7.0.intel.r3.0 #1 SMP Sun Oct 23 16:11:53 CEST 2016 x86_64 x86_64 x86_64 GNU/Linux
brings an additional message in /var/log/dmesg
  • snd_hda_intel 0000:00:03.0: failed to add i915 component master (-19)
  • snd_hda_intel 0000:00:03.0: HSW/BDW HD-audio HDMI/DP requires binding with gfx driver
and CapsBasic now reveals that no GPU is found:
Number of available platforms: 1
Platform names:
    [0] Intel(R) OpenCL [Selected]
Number of devices available for each type:
    CL_DEVICE_TYPE_CPU: 1
    CL_DEVICE_TYPE_GPU: 0
    CL_DEVICE_TYPE_ACCELERATOR: 0
*** Detailed information for each device ***
CL_DEVICE_TYPE_CPU[0]
    CL_DEVICE_NAME: Intel(R) Core(TM) i5-5250U CPU @ 1.60GHz
    CL_DEVICE_AVAILABLE: 1
    CL_DEVICE_VENDOR: Intel(R) Corporation
    CL_DEVICE_PROFILE: FULL_PROFILE
    CL_DEVICE_VERSION: OpenCL 2.0 (Build 330)
    CL_DRIVER_VERSION: 1.2.0.330
    CL_DEVICE_OPENCL_C_VERSION: OpenCL C 2.0
    CL_DEVICE_MAX_COMPUTE_UNITS: 4
    CL_DEVICE_MAX_CLOCK_FREQUENCY: 1600
    CL_DEVICE_MAX_WORK_GROUP_SIZE: 8192
    CL_DEVICE_ADDRESS_BITS: 64
    CL_DEVICE_MEM_BASE_ADDR_ALIGN: 1024
    CL_DEVICE_MAX_MEM_ALLOC_SIZE: 2062904320
    CL_DEVICE_GLOBAL_MEM_SIZE: 8251617280
    CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE: 131072
    CL_DEVICE_GLOBAL_MEM_CACHE_SIZE: 262144
    CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE: 64
    CL_DEVICE_LOCAL_MEM_SIZE: 32768
    CL_DEVICE_PROFILING_TIMER_RESOLUTION: 1
    CL_DEVICE_IMAGE_SUPPORT: 1
    CL_DEVICE_ERROR_CORRECTION_SUPPORT: 0
    CL_DEVICE_HOST_UNIFIED_MEMORY: 1
    CL_DEVICE_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 cl_khr_image2d_from_buffer
    CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT: 1
    CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG: 1
    CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT: 1
    CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE: 1
    CL_DEVICE_NATIVE_VECTOR_WIDTH_INT: 8
    CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG: 4
    CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT: 8
    CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE: 4
On the internet many users report similar issues concerning dmesg but no fix seems to be available.
Whereas on Windows 10 everything works fine as CapsBasic shows:
Number of available platforms: 2
Platform names:
    [0] Intel(R) OpenCL [Selected]
    [1] Experimental OpenCL 2.1 CPU Only Platform
Number of devices available for each type:
    CL_DEVICE_TYPE_CPU: 1
    CL_DEVICE_TYPE_GPU: 1
    CL_DEVICE_TYPE_ACCELERATOR: 0
*** Detailed information for each device ***
CL_DEVICE_TYPE_CPU[0]
    CL_DEVICE_NAME: Intel(R) Core(TM) i5-5250U CPU @ 1.60GHz
    CL_DEVICE_AVAILABLE: 1
    CL_DEVICE_VENDOR: Intel(R) Corporation
    CL_DEVICE_PROFILE: FULL_PROFILE
    CL_DEVICE_VERSION: OpenCL 2.0 (Build 10094)
    CL_DRIVER_VERSION: 5.2.0.10094
    CL_DEVICE_OPENCL_C_VERSION: OpenCL C 2.0
    CL_DEVICE_MAX_COMPUTE_UNITS: 4
    CL_DEVICE_MAX_CLOCK_FREQUENCY: 1600
    CL_DEVICE_MAX_WORK_GROUP_SIZE: 8192
    CL_DEVICE_ADDRESS_BITS: 32
    CL_DEVICE_MEM_BASE_ADDR_ALIGN: 1024
    CL_DEVICE_MAX_MEM_ALLOC_SIZE: 536838144
    CL_DEVICE_GLOBAL_MEM_SIZE: 2147352576
    CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE: 131072
    CL_DEVICE_GLOBAL_MEM_CACHE_SIZE: 262144
    CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE: 64
    CL_DEVICE_LOCAL_MEM_SIZE: 32768
    CL_DEVICE_PROFILING_TIMER_RESOLUTION: 641
    CL_DEVICE_IMAGE_SUPPORT: 1
    CL_DEVICE_ERROR_CORRECTION_SUPPORT: 0
    CL_DEVICE_HOST_UNIFIED_MEMORY: 1
    CL_DEVICE_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_dx9_media_sharing cl_intel_dx9_media_sharing cl_khr_d3d11_sharing cl_khr_gl_sharing cl_khr_fp64 cl_khr_image2d_from_buffer
    CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT: 1
    CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG: 1
    CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT: 1
    CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE: 1
    CL_DEVICE_NATIVE_VECTOR_WIDTH_INT: 8
    CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG: 4
    CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT: 8
    CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE: 4
CL_DEVICE_TYPE_GPU[0]
    CL_DEVICE_NAME: Intel(R) HD Graphics 6000
    CL_DEVICE_AVAILABLE: 1
    CL_DEVICE_VENDOR: Intel(R) Corporation
    CL_DEVICE_PROFILE: FULL_PROFILE
    CL_DEVICE_VERSION: OpenCL 2.0
    CL_DRIVER_VERSION: 20.19.15.4531
    CL_DEVICE_OPENCL_C_VERSION: OpenCL C 2.0
    CL_DEVICE_MAX_COMPUTE_UNITS: 48
    CL_DEVICE_MAX_CLOCK_FREQUENCY: 950
    CL_DEVICE_MAX_WORK_GROUP_SIZE: 256
    CL_DEVICE_ADDRESS_BITS: 32
    CL_DEVICE_MEM_BASE_ADDR_ALIGN: 1024
    CL_DEVICE_MAX_MEM_ALLOC_SIZE: 390280806
    CL_DEVICE_GLOBAL_MEM_SIZE: 1561123226
    CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE: 65536
    CL_DEVICE_GLOBAL_MEM_CACHE_SIZE: 1048576
    CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE: 64
    CL_DEVICE_LOCAL_MEM_SIZE: 65536
    CL_DEVICE_PROFILING_TIMER_RESOLUTION: 80
    CL_DEVICE_IMAGE_SUPPORT: 1
    CL_DEVICE_ERROR_CORRECTION_SUPPORT: 0
    CL_DEVICE_HOST_UNIFIED_MEMORY: 1
    CL_DEVICE_EXTENSIONS: cl_intel_accelerator cl_intel_advanced_motion_estimation cl_intel_ctz cl_intel_d3d11_nv12_media_sharing cl_intel_dx9_media_sharing cl_intel_motion_estimation cl_intel_simultaneous_sharing cl_intel_subgroups cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_d3d10_sharing cl_khr_d3d11_sharing cl_khr_depth_images cl_khr_dx9_media_sharing cl_khr_gl_depth_images cl_khr_gl_event cl_khr_gl_msaa_sharing cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_gl_sharing cl_khr_icd cl_khr_image2d_from_buffer cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_mipmap_image cl_khr_mipmap_image_writes cl_khr_spir
    CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT: 1
    CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG: 1
    CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT: 1
    CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE: 0
    CL_DEVICE_NATIVE_VECTOR_WIDTH_INT: 1
    CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG: 1
    CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT: 1
    CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE: 0
What can I do that OpenCL detects the GPU on Centos 7?
 

 
0 Kudos
1 Reply
Jeffrey_M_Intel1
Employee
315 Views

It looks like there may be a driver install issue.  Here are some options:

  1. A new OpenCL standalone driver is available: https://software.intel.com/en-us/articles/opencl-drivers#latest_linux_driver.  This will mean updating your kernel to 4.7.
  2. Install Media Server Studio.  This applies all needed patches for OpenCL and Media SDK to the default CentOS 7.2 kernel.  This is the most automated option for this HW+Linux distro combination

The system analyzer (https://software.intel.com/en-us/articles/mss-sys-analyzer-linux) can give some feedback on the install process and what you might be missing.   

Reply