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.

Howto Setup Intel® SDK for OpenCL* Applications XE 2013 on Ubuntu 12.04.2 64 bit

Joel_Divekar
Beginner
577 Views

There are very few installation guides available for setting up Intel® SDK for OpenCL* Applications XE 2013 on Ubuntu 12.04.2 and following steps should help with you to quickly configure your system

  1. Download Intel SDK for OpenCL Application XE 2013 version from Intel site

    http://software.intel.com/en-us/vcsource/tools/opencl-sdk-xe
    select 64-bit SDK and click on download button
  2. Now click on "Installation Instruction" link (just under download button) and download public key from this page

    Intel-E901-172E-EF96-900F-B8E1-4184-D7BE-0E73-F789-186F.pub
  3. Import the public key

    [bash]$ sudo rpm --import Intel-E901-172E-EF96-900F-B8E1-4184-D7BE-0E73-F789-186F.pub[/bash]
  4. Once sdk is downloaded, extract the file

    [bash]$ tar zxvf intel_sdk_for_ocl_applications_2013_xe_sdk_3.0.67279_x64.tgz[/bash]
  5. Install additional packages to manage RPM files & other tools for building packages

    [bash]$ sudo apt-get install rpm alien build-essential fakeroot dpkg-dev[/bash]
  6. Verify signature of rpm files. For example, do this for all rpm files

    [bash]$ rpm --checksig opencl-1.2-base-3.0.67279-1.x86_64.rpm[/bash]

    and result should be similar to
    opencl-1.2-base-3.0.67279-1.x86_64.rpm: rsa sha1 (md5) pgp md5 OK
  7. Proceed to convert all .rpm files to .deb

    [bash]$ fakeroot alien --to-deb --scripts *.rpm[/bash]
  8. We need to create /usr/lib64 folder, if it is not existing

    [bash]$ sudo mkdir /usr/lib64[/bash]
  9. Now lets proceed with the installation

    [bash]$ sudo dpkg -i opencl-1.2-base_3.0.67279-2_amd64.deb
    $ sudo dpkg -i opencl-1.2-devel_3.0.67279-2_amd64.deb
    $ sudo dpkg -i opencl-1.2-intel-cpu_3.0.67279-2_amd64.deb
    $ sudo dpkg -i opencl-1.2-intel-devel_3.0.67279-2_amd64.deb
    $ sudo dpkg -i opencl-1.2-intel-mic_3.0.67279-2_amd64.deb[/bash]
  10. Create symbolic links for libraries

    [bash]$ sudo ln -s /usr/lib64/libOpenCL.so /usr/lib/libOpenCL.so
    $ sudo ln -s /usr/lib64/libOpenCL.so.1 /usr/lib/libOpenCL.so.1
    $ sudo ln -s /usr/lib64/libOpenCL.so.1.2 /usr/lib/libOpenCL.so.1.2[/bash]
  11. And update library cache

    [bash]$ sudo ldconfig[/bash]
  12. Lets test our installation by downloading sample application from following link

    http://software.intel.com/sites/default/files/article/391203/capsbasic-sample.tar.gz
    and extract the file

    [bash]$ tar zxvf capsbasic-sample.tar.gz
    $ cd CapsBasic
    $ make
    $ ./capsbasic[/bash]

    if the application compiles & runs displaying system information then your installation is successful
0 Kudos
3 Replies
Edgardo_Doerner
577 Views

Dear Joel, I have followed all the steps but I have problems compiling codes that use the OpenCL C++ Wrapper. When I use the standard OpenCL C I have no problems during the compilation/execution (as in the case of the Intel OpenCL samples)

For example, for the code buffer_test.cpp (attached) I obtain a long list of errors, here an extract:

/usr/include/CL/cl.hpp:681:1: error: expected unqualified-id before ‘{’ token
/usr/include/CL/cl.hpp:1097:28: error: ‘cl::vector’ is not a template
/usr/include/CL/cl.hpp:1097:8: error: template parameters not used in partial specialization:
/usr/include/CL/cl.hpp:1097:8: error: ‘T’
/usr/include/CL/cl.hpp:1119:28: error: ‘cl::vector’ is not a template
/usr/include/CL/cl.hpp:1121:45: error: ‘cl::vector’ is not a template

My machine is a Lenovo Thinkpad Twist ultrabook with Ubuntu 12.04 LTS 64-bit. This error does not happens with another systems, like a Thinkpad T420 with Fedora 19 64-bit (the same Intel OpenCL SDK XE 2013) and a AMD processor with the AMD OpenCL SDK. I suppose that something is bad configured on my system, but I have not been able to found a solution by myself through internet. Thanks for your help.

0 Kudos
shuanshuan_b_
Beginner
577 Views

Hello,I installed the intel_sdk_for_ocl_applications_2014_4.6.0.92_x64 on centos,but there's a problem come to me that I cann't find MIC device ,only can find CPU. The newest version MPSS ( mpss-3.4.1 ) has been installed before I install the ocl,would please give some advise about this??any one will be  appreciate!

0 Kudos
Yuri_K_Intel
Employee
577 Views
Hi shuanshuan b, This package (intel_sdk_for_ocl_applications_2014_4.6.0.92_x64) doesn't contain any runtime components. You need to install OpenCL™ Runtime 14.2 both for CPU and MIC from https://software.intel.com/en-us/articles/opencl-drivers. Another important point is that OpenCL runtime 14.2 was validated with MPSS 3.3 (as per release notes). So, there is no guarantee that it will work appropriately (or anyhow) with MPSS 3.4.1. Thanks, Yuri
0 Kudos
Reply