Pages:
Author

Topic: 50 BTC if you write a complete guide on GPU mining on Ubuntu using ATI - page 7. (Read 102909 times)

sr. member
Activity: 434
Merit: 251
Every saint has a past. Every sinner has a future.
@Raulo

On the machine that has two cards after intalling the drivers I am getting this:

Code:

mahkul@mahkul:~$ fglrxinfo
Error: unable to open display (null)


This may have something to do with the fact that the drivers were installed using: System->Administration->Aditional Drivers (I did this before you wrote the tutorial). However, when I do the four steps:

Code:
$ sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
$ sudo apt-get install fglrx
$ sudo apt-get install fglrx-amdcccle
$ sudo apt-get install fglrx-modaliases

it always says that everything is already installed.

Any thoughts?

Sorted: just added -display :0 switch
sr. member
Activity: 434
Merit: 251
Every saint has a past. Every sinner has a future.
@Raulo

On the machine that has two cards after intalling the drivers I am getting this:

Code:

mahkul@mahkul:~$ fglrxinfo
Error: unable to open display (null)


This may have something to do with the fact that the drivers were installed using: System->Administration->Aditional Drivers (I did this before you wrote the tutorial). However, when I do the four steps:

Code:
$ sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
$ sudo apt-get install fglrx
$ sudo apt-get install fglrx-amdcccle
$ sudo apt-get install fglrx-modaliases

it always says that everything is already installed.

Any thoughts?
sr. member
Activity: 434
Merit: 251
Every saint has a past. Every sinner has a future.
@Raulo

I managed to test it with my Radeon 4670 here and i works flawlessly. I am getting ~9 more khash/s than I was getting on Windows XP.

I am really impressed. I am a linux noobie, so perhaps what you wrote isn't very complicated for people who are more experienced. But still - impressive.

Should I use the Bitcoin address in your signature?

I am going to test this with a 2x5850 setup soon. If you don't mind, I may get back to you later if I run into problems with that?
full member
Activity: 238
Merit: 100
By the way, have you already checked CLInfo and it was OK? If so, you are close to finish. Getting drivers and SDK was the hardest part.
full member
Activity: 238
Merit: 100
To install numpy

Code:
$ sudo apt-get install python-numpy

Apt should do all the rest of the magic.

And of course, it was ./configure.py

I'll correct the post.
sr. member
Activity: 434
Merit: 251
Every saint has a past. Every sinner has a future.
You need to install numpy, Mahkul.

Yes, that's what I think too. I briefly looked at how to do it:

http://ubuntuforums.org/showthread.php?t=566456

Seems to be a little bit problematic. I will better let Raulo earn his Bitcoins.
legendary
Activity: 980
Merit: 1020
You need to install numpy, Mahkul.
sr. member
Activity: 434
Merit: 251
Every saint has a past. Every sinner has a future.
@Raulo:

When I get to:

Code:
$ ./configure --cl-inc-dir=/opt/ati-stream-sdk-v2.1-lnx64/include/ --cl-lib-dir=/opt/ati-stream-sdk-v2.1-lnx64/lib/x86_64
$ make

This is what I get: (I assume you meant the user to use ./configure.py and not just ./configure as there is no such file in that directory?)

Code:

mahkul@mahkul:~/Downloads/pyopencl-0.92$ ./configure.py --cl-inc-dir=/opt/ati-stream-sdk-v2.1-lnx32/include/ --cl-lib-dir=/opt/ati-stream-sdk-v2.1-lnx32/lib/x86
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.14.tar.gz
Extracting in /tmp/tmpUWd5Tu
Now working in /tmp/tmpUWd5Tu/distribute-0.6.14
Building a Distribute egg in /home/mahkul/Downloads/pyopencl-0.92
/home/mahkul/Downloads/pyopencl-0.92/distribute-0.6.14-py2.6.egg
mahkul@mahkul:~/Downloads/pyopencl-0.92$ make
ctags -R src || true
/bin/sh: ctags: not found
/usr/bin/python setup.py build
running build
running build_py
creating build
creating build/lib.linux-i686-2.6
creating build/lib.linux-i686-2.6/pyopencl
copying pyopencl/array.py -> build/lib.linux-i686-2.6/pyopencl
copying pyopencl/version.py -> build/lib.linux-i686-2.6/pyopencl
copying pyopencl/tools.py -> build/lib.linux-i686-2.6/pyopencl
copying pyopencl/__init__.py -> build/lib.linux-i686-2.6/pyopencl
copying pyopencl/elementwise.py -> build/lib.linux-i686-2.6/pyopencl
copying pyopencl/clrandom.py -> build/lib.linux-i686-2.6/pyopencl
copying pyopencl/clmath.py -> build/lib.linux-i686-2.6/pyopencl
running build_ext
building '_cl' extension
----------------------------------------------------------------------------
Sorry, your build failed. Try rerunning configure.py with different options.
----------------------------------------------------------------------------
Traceback (most recent call last):
  File "setup.py", line 160, in
    main()
  File "setup.py", line 152, in main
    extra_link_args=conf["LDFLAGS"],
  File "/home/mahkul/Downloads/pyopencl-0.92/aksetup_helper.py", line 37, in setup
    setup(*args, **kwargs)
  File "/usr/lib/python2.6/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib/python2.6/distutils/dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.6/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/usr/lib/python2.6/distutils/cmd.py", line 333, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
  File "build/bdist.linux-i686/egg/setuptools/command/build_ext.py", line 46, in run
  File "/usr/lib/python2.6/distutils/command/build_ext.py", line 340, in run
    self.build_extensions()
  File "/usr/lib/python2.6/distutils/command/build_ext.py", line 449, in build_extensions
    self.build_extension(ext)
  File "build/bdist.linux-i686/egg/setuptools/command/build_ext.py", line 182, in build_extension
  File "/usr/lib/python2.6/distutils/command/build_ext.py", line 496, in build_extension
    include_dirs=ext.include_dirs,
  File "/home/mahkul/Downloads/pyopencl-0.92/aksetup_helper.py", line 69, in include_dirs
    return self._include_dirs + [self.get_numpy_incpath()]
  File "/home/mahkul/Downloads/pyopencl-0.92/aksetup_helper.py", line 63, in get_numpy_incpath
    file, pathname, descr = find_module("numpy")
ImportError: No module named numpy
make: *** [all] Error 1

sr. member
Activity: 434
Merit: 251
Every saint has a past. Every sinner has a future.
You really know what you're doing. Smiley

I am testing it using 32-bit version, just replaced 64 with 32 or omitted it wherever necessary. Everything has been going great until I got to:


$ cd /opt/ati-stream-sdk-v2.1-lnx64/samples/opencl/bin/x86
$ ./CLInfo |grep CL_DEVICE_TYPE_GPU


I get:

mahkul@mahkul:/opt/ati-stream-sdk-v2.1-lnx32/samples/opencl/bin/x86$ ./CLInfo |grep CL_DEVICE_TYPE_GPU
./CLInfo: error while loading shared libraries: libOpenCL.so: cannot open shared object file: No such file or directory
mahkul@mahkul:/opt/ati-stream-sdk-v2.1-lnx32/samples/opencl/bin/x86$


Any thoughts?


Sorry, my bad. Made a typo in the LIBRARY PATH. Getting back to testing.

full member
Activity: 238
Merit: 100
This should be a complete tutorial. Ask if you have some problems, as I might have had a different hardware/software configuration or forgot about a required package. that I installed before.  

------
Make sure all the cards are visible

$ lspci -v

should have a line (lines) with "Display controller: ATI Technologies Inc Device"

Open terminal and write the following command

$ sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
# the following line added after moa comment later in the thread
$ sudo apt-get update
$ sudo apt-get install fglrx
$ sudo apt-get install fglrx-amdcccle
$ sudo apt-get install fglrx-modaliases

This should install Proprietary ATI Catalyst drivers.

Create xorg.conf by issuing:

$ sudo aticonfig --initial

If you have more than one card, do
$ sudo aticonfig --initial -f --adapter=all

Reboot to load the kernel modules.

The X should run. To check if the correct driver is installed:

$ fglrxinfo

Download ATI SDK from AMD webpage

http://developer.amd.com/gpu/AMDAPPSDK/downloads/pages/AMDAPPSDKDownloadArchive.aspx

2.1 is recommended. For 64-bit systems, it will be

http://developer.amd.com/Downloads/ati-stream-sdk-v2.1-lnx64.tgz

Unpack it to, e.g. /opt

$ cd /opt
$ sudo mv Downloadlocation/ati-stream-sdk-v2.1-lnx64.tgz /opt
$ sudo tar xfzv ati-stream-sdk-v2.1-lnx64.tgz

Download

http://developer.amd.com/Downloads/icd-registration.tgz

and unpack it into root directory.

$ cd /
$ sudo mv Downloadlocation/icd-registration.tgz /
$ tar zxfv icd-registration.tgz

You should have
 /etc/OpenCL/vendors/

with

atiocl32.icd  atiocl64.icd

Add library location  (you may want to add it to your .bashrc) (for 64-bit version)

$ export LD_LIBRARY_PATH=/opt/ati-stream-sdk-v2.1-lnx64/lib/x86_64/:$LD_LIBRARY_PATH

And you can test openCL support:

$ cd /opt/ati-stream-sdk-v2.1-lnx64/samples/opencl/bin/x86_64

$ ./CLInfo |grep CL_DEVICE_TYPE_GPU
 
It should lits all your GPUs (in case of 5970s, two for each card).

If only one is shown, issue
$ export DISPLAY=:0

In some cases, you'll need to disable CrossFire for 5970.

$ aticonfig --list-adapters

$ aticonfig --crossfire=off --adapter=all

You may need to restart X and/or repeat aticinfig --initial step

If you have correct  ./CLInfo, you can proceed to installing miners.

Download PyOpenCL
$ wget http://pypi.python.org/packages/source/p/pyopencl/pyopencl-0.92.tar.gz

Unpack

$ tar zxfv pyopencl-0.92.tar.gz

Compile and install

Prerequisites:
$ sudo apt-get install g++  libboost-all-dev subversion git-core python-numpy

$ cd pyopencl-0.92

$ ./configure.py --cl-inc-dir=/opt/ati-stream-sdk-v2.1-lnx64/include/ --cl-lib-dir=/opt/ati-stream-sdk-v2.1-lnx64/lib/x86_64
$ make
$ sudo make install

Download python-jsonrpc

$ svn checkout http://svn.json-rpc.org/trunk/python-jsonrpc

$ cd python-jsonrpc

$ sudo python setup.py install

Download m0mchil poclbm

$ git clone git://github.com/m0mchil/poclbm poclbm
$ cd poclbm
$ chmod +x poclbm.py

Run ./poclbm.py to see if all devices are detected. If only one GPU is visible (on multi-GPU system), do

$ export DISPLAY=:0

$ ./poclbm.py  -u user --pass=pass -o host -p 8332 -d 1

And the same for other GPUs (-d 2, -d3, etc.)

If it fails during kernel compilation, try:

$ export LD_LIBRARY_PATH=/opt/ati-stream-sdk-v2.1-lnx64/lib/x86_64/:$LD_LIBRARY_PATH

You may play with "-v", "-w" and "-f" options. See, poclbm thread

https://bitcointalksearch.org/topic/python-opencl-bitcoin-miner-1334

Useful utilities:

$ aticonfig --odgt --adapter=all

shows GPU temperature

$ aticonfig --odgc --adapter=all

shows clock and load.

$ aticonfig --pplib-cmd "get fanspeed 0"

shows fan speed

If you have multiple cards, before checking the fan for each one, you need  for first GPU
$ export DISPLAY=:0.0; aticonfig --pplib-cmd "get fanspeed 0"
for second GPU, etc.
$ export DISPLAY=:0.1 ; aticonfig --pplib-cmd "get fanspeed 0"

edit: apt-get update added
sr. member
Activity: 434
Merit: 251
Every saint has a past. Every sinner has a future.
I can write it. But why SDK 2.2 when 2.1 is faster?

Sorry, I meant 2.1.
legendary
Activity: 1372
Merit: 1008
1davout
Never got 2.2 to work ...
full member
Activity: 238
Merit: 100
I can write it. But why SDK 2.2 when 2.1 is faster?

sr. member
Activity: 434
Merit: 251
Every saint has a past. Every sinner has a future.
full member
Activity: 126
Merit: 100
which version of ubuntu?
sr. member
Activity: 434
Merit: 251
Every saint has a past. Every sinner has a future.
I will give 50 BTC to the person who will write a comprehensive tutorial on starting to mine using ATI GPUs on Ubuntu. The tutorial should include installation of relevant ATI drivers, 2.2 2.1 SDK with OpenCL and a GPU miner (preferably m0mchil's). This should also cover a scenario when someone has two or more GPUs installed in one machine (disabling Crossfire etc.).

Cheers.

PS. I will send Bitcoins only after I test it myself and confirm this is working on a fresh Ubuntu install.
Pages:
Jump to: