In this, we'll go into the details for installing and configuring the ATI video card driver, followed by the AMD Accelerated Parallel Processing (APP) SDK, CAL++, and OpenCL. Taking advantage of the ATI Stream Technology, we can run computationally-intensive tasks, typically running on the CPU, more quickly and efficiently. For more detailed information regarding the ATI Stream technology, visit www.amd.com/stream.
The following requirements need to be fulfilled:
· A connection to the Internet is required to complete this recipe
· The preparation of the kernel headers is needed before starting this task, which is explained in the Preparing kernel headers recipe at the beginning of this chapter
How to do it...
Let's begin installing and configuring the ATI drivers:
1. Download the ATI display driver required for our system:
cd /tmp/
wget http://www2.ati.com/drivers/linux/amd-driver-installer- 12-1-x86.x86_64.run
2. Start the installation by typing the following command:
sh amd-driver-installer-12-1-x86.x86_64.run
3. When the setup completes, reboot your system for the changes to take effect and to prevent system instability.
4. Install the dependencies needed for further steps:
apt-get install libroot-python-dev libboost-python-dev libboost1.40-all-dev cmake
5. Download and untar the AMD APP SDK according to your CPU architecture:
wget http://developer.amd.com/Downloads/AMD-APP-SDK-v2.6- lnx64.tgz
mkdir AMD-APP-SDK-v2.6-lnx64
tar zxvf AMD-APP-SDK-v2.6-lnx64.tgz –C /tmp/AMD-APP-SDK-v2.6- lnx64
cd AMD-APP-SDK-v2.6-lnx64
6. Install AMD APP SDK by issuing the following command:
sh Install-AMD-APP.sh
7. Set the ATI Stream paths into the .bashrc file:
echo export ATISTREAMSDKROOT=/opt/AMDAPP/ >> ~/.bashrc
source ~/.bashrc
8. Download and compile CAL++:
cd /tmp/
svn co https://calpp.svn.sourceforge.net/svnroot/calpp calpp
cd calpp/trunk
cmake
make
make install
9. Download and compile Pyrit:
cd /tmp/
svn co http://pyrit.googlecode.com/svn/trunk/ pyrit_src
cd pyrit_src/pyrit
python setup.py build
python setup.py install
10. Build and install OpenCL:
cd /tmp/pyrit_src/cpyrit_opencl
python setup.py build
python setup.py install
11. Make a few changes to the cpyrit_calpp setup:
cd /tmp/pyrit_source/cpyrit_calpp
vi setup.py
Replace the following line:
VERSION = '0.4.0-dev'
With:
VERSION = '0.4.1-dev'
And also the following line:
CALPP_INC_DIRS.append(os.path.join(CALPP_INC_DIR, 'include'))
With:
CALPP_INC_DIRS.append(os.path.join(CALPP_INC_DIR, 'include/CAL'))
12. Finally, add the ATI GPU module to Pyrit:
python setup.py build
python setup.py install