Install OpenCL

From BackTrack Linux
Jump to: navigation, search

Install OpenCL on Backtrack

This article was contributed by g0tmi1k.

  • In this guide we will be installing and configuring OpenCL on Backtrack.

NOTE: You might need to make some minor tweaks depending on your system.

Let's begin:

  • First of all before we start we want to make sure that our system is up to date.
root@bt:~# apt-get update && apt-get upgrade
  • Before we go on with installing the ATI drivers we need to get our kernel source prepared.
root@bt:~# prepare-kernel-sources
root@bt:~# cd /usr/src/linux
root@bt:~# cp -rf include/generated/* include/linux/
  • Now that we are set up it's time to download the ATI drivers.
root@bt:~# wget
root@bt:~# chmod +x
root@bt:~# ./
root@bt:~# reboot


  • Before we are finished there is one more thing that we need to install, The AMD Accelerated Parallel Processing (APP) SDK, this one needs to be installed according to your CPU architecture.

For 32 bit architecture:

root@bt:~# wget 
root@bt:~# tar -xvzf AMD-APP-SDK-v2.5-lnx32.tgz
root@bt:~# ./

For 64 bit architecture:

root@bt:~# wget 
root@bt:~# tar -xvzf AMD-APP-SDK-v2.5-lnx64.tgz
root@bt:~# ./
  • We will also need cmake and cmake++ along with some other library files.

First we install the libraries and cmake:

root@bt:~# apt-get install libroot-python-dev libboost-python-dev zlib1g-dev libssl-dev cmake libboost1.40-all-dev

Before we can install cmake++ we need to set the ATI Stream paths:

root@bt:~# echo "ATISTREAMSDKROOT=/opt/AMDAPP
root@bt:~# export ATISTREAMSDKROOT" >> ~/.bashrc
root@bt:~# source ~/.bashrc

Now we can proceed with the installation:

root@bt:~# svn co calpp
root@bt:~# cd calpp/trunk
root@bt:~# cmake .


root@bt:~# make
root@bt:~# make install
  • In addition now we can install Pyrit with the OpenCL option.
root@bt:~# svn checkout /tmp/pyrit
root@bt:~# cd /tmp/pyrit/pyrit && python build && python install
root@bt:~# cd /tmp/pyrit/cpyrit_opencl && python build && python install
  • Now we can test Pyrit.
root@bt:~# pyrit list_cores
root@bt:~# pyrit benchmark