Setting up Intel OpenCL SDK on Gentoo Linux
This page describes how to get the Intel OpenCL installed and working on Gentoo Linux.
First, do not install the Gentoo ebuild. It is out of date.
- Download the Intel OpenCL XE SDK
- Unpack the tarball
- Use rpm2tar to convert the .rpm files to .tar
- Extract all of the .tar files
- Copy the contents to the appropriate directory or use a package management system to install it, e.g. installit
- Add the linked file into /etc/env.d/99intel-opt-opencl (some modification may be necessary)
- If it doesn't already exist, create the directory /etc/OpenCL/vendors
- Create a symlink to /opt/intel/opencl-1.2-3.1.1.11385/etc/intel64.icd to /etc/OpenCL/vendors
- env-update
- . /etc/profile
- run ldconfig as root
Now opencl is set up. To use it, you'll need the following:
- You need to link to the OpenCL library: -lOpenCL (caps important)
- Use Intel's icc compiler:
- I use the non-commercial version because I'm not paid for the work I do with it
- You'll probably want to make sure that the icc compiler is the latest (14 AKA 2013 R2) if you're going to be using the OpenCL 1.2 C++ wrapper.
- Also because the icc compiler uses GCC headers, and Gentoo is on GCC 4.8
- If you want to use the OpenCL C++ wrapper, you'll almost certainly want to use the latest version, from Simon McIntosh-Smith's Supercomputing 2013 page (in the exercises zipfile: OpenCL_exercises/Cpp_common/cl.hpp)
- If you have trouble, you may need the following compile options:
- -I /opt/intel/opencl-1.2-3.1.1.11385/include
- -L /opt/intel/opencl-1.2-3.1.1.11385/lib64
- If you're new to OpenCL, I highly recommend working through the tutorial on Simon McIntosh-Smith's Supercomputing 2013 page
Page last modified Thursday, 21-Nov-2013 15:59:14 EST