OpenCL HOWTO FOR FEDORA 14 LINUX
Here are some notes which may be useful to anyone who wishes to mine for bitcoins on Fedora 14 Linux. It's simpler than the instructions I posted
for Fedora 12, because Bitcoin now supports the 'getwork' call and therefore doesn't need to be recompiled.
===
Check your software versions, and upgrade as necessary. The gcc compiler needs to be 4.x (for PyOpenCL), and Python needs to be 2.4 or newer (again, for PyOpenCL), but not Python 3.x.
$ gcc --version
gcc (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4)
$ python --version
Python 2.7
You need to have either the full kernel source, or the kernel headers (because the ATI GPU driver is installed by compiling a kernel module). You also need the Python headers.
$ rpm -q kernel-devel
kernel-devel-2.6.35.10-74.fc14.x86_64
$ rpm -q python-devel
python-devel-2.7-8.fc14.1.x86_64
===
Update your display driver.
I followed the instructions from here:
http://gofedora.com/how-to-install-ati-catalyst-fglrx-98-drivers-fedora-11/except that I used the version
11.1 11.2 of the ATI Catalyst Display Driver for Linux x86 from here:
http://support.amd.com/us/gpudownload/linux/Pages/radeon_linux.aspx?type=2.4.1&product=2.4.1.3.42&lang=EnglishSupposedly some of the installation steps are no longer needed with version 11.1, but I wasn't completely certain which ones, so I did them all anyway.
===
Get the ATI Stream SDK v2.1 (NOT any later version, according to brocktice), from here:
http://developer.amd.com/gpu/ATIStreamSDK/pages/ATIStreamSDK-Archive.aspxYou need two downloads from that page: the Linux SDK (32-bit or 64-bit according to your version of Linux), plus icd-registration.tgz
Untar the SDK anywhere convenient. Add these lines to your .bash_profile file (in your login directory):
export ATISTREAMSDKSAMPLESROOT=....../ati-stream-sdk-v2.1-lnx64
export ATISTREAMSDKROOT=....../ati-stream-sdk-v2.1-lnx64
export LD_LIBRARY_PATH=$ATISTREAMSDKROOT/lib/x86_64:$LD_LIBRARY_PATH
These pathnames will vary slightly if you have a 32-bit Fedora installation.
Move icd-registration.tgz into your root directory and (as root) untar it from there. It puts some essential config files into /etc.
If you like, follow the documentation that is included in the SDK to compile the examples. Execute ati-stream-sdk-v2.1-lnx64/samples/opencl/bin/x86_64/CLInfo to check that things are working and that your GPU card is detected.
===
Install the Python OpenCL module (PyOpenCL). Broadly, follow the instructions here:
http://wiki.tiker.net/PyOpenCL/Installation/LinuxHowever, in step 2 I couldn't install the Numpy dependency this way. Instead I ran "System | Administration | Add/Remove Software", then searched for numpy and installed it.
In step 3, the OpenCL headers and libraries weren't found, so I had to use the longer configure.py example and provide explicit paths.
I don't think the "Boost C++" libraries are required for this version of PyOpenCL.
===
Install the JSON-RPC module for Python. This was straightforward using the instructions here:
http://json-rpc.org/wiki/python-json-rpc===
Go to m0mchil's Git repository:
https://github.com/m0mchil/poclbmClick the "Download" button. Download and unpack these files anywhere convenient. Change poclbm.py to executable and check that it's working:
chmod 744 poclbm.py
./poclbm.py --help
===
If you don't already have a file bitcoin.conf in your ~/.bitcoin directory, create one and put a username and password in it:
rpcuser=yourusername
rpcpassword=yourpassword
Go back to the bitcoin/bin/64 directory and start bitcoin in rpc server mode:
Go to the directory where you built poclbm.py and run it:
./poclbm.py --user=yourusername --pass=yourpassword
It will tell you which devices it can see. Choose the one that's
not your CPU, and add that one to the command line with the "-d" switch:
./poclbm.py --user=yourusername --pass=yourpassword -d1
Watch the khash/s figures with sweet delight, and enjoy the few moments before the roar of your GPU fan starts up.
Many thanks to m0mchil and the many others who have offered code or helpful tips.
(PS: If you upgrade your kernel, the ATI driver might hang on startup. If this happens, boot into runlevel 3, delete /etc/X11/xorg.conf , reboot and reinstall the ATI driver.)