Bitcoin Forum
November 18, 2017, 04:40:04 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1] 2 3 4 5 6 7 »  All
  Print  
Author Topic: 50 BTC if you write a complete guide on GPU mining on Ubuntu using ATI  (Read 101561 times)
Mahkul
Sr. Member
****
Offline Offline

Activity: 434


Every saint has a past. Every sinner has a future.


View Profile
February 11, 2011, 05:05:24 PM
 #1

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.
A blockchain platform for effective freelancing
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1511023204
Hero Member
*
Offline Offline

Posts: 1511023204

View Profile Personal Message (Offline)

Ignore
1511023204
Reply with quote  #2

1511023204
Report to moderator
1511023204
Hero Member
*
Offline Offline

Posts: 1511023204

View Profile Personal Message (Offline)

Ignore
1511023204
Reply with quote  #2

1511023204
Report to moderator
1511023204
Hero Member
*
Offline Offline

Posts: 1511023204

View Profile Personal Message (Offline)

Ignore
1511023204
Reply with quote  #2

1511023204
Report to moderator
dingus
Full Member
***
Offline Offline

Activity: 126



View Profile
February 11, 2011, 05:06:55 PM
 #2

which version of ubuntu?

ding·us/ˈdiNGgəs/
Noun: Used to refer to something whose name the speaker cannot remember, is unsure of, or is humorously or euphemistically omitting
Mahkul
Sr. Member
****
Offline Offline

Activity: 434


Every saint has a past. Every sinner has a future.


View Profile
February 11, 2011, 05:07:34 PM
 #3

which version of ubuntu?

10.10
Raulo
Full Member
***
Offline Offline

Activity: 238


View Profile
February 11, 2011, 05:52:38 PM
 #4

I can write it. But why SDK 2.2 when 2.1 is faster?


1HAoJag4C3XtAmQJAhE9FTAAJWFcrvpdLM
davout
Legendary
*
Offline Offline

Activity: 1372


1davout


View Profile WWW
February 11, 2011, 06:02:02 PM
 #5

Never got 2.2 to work ...

Mahkul
Sr. Member
****
Offline Offline

Activity: 434


Every saint has a past. Every sinner has a future.


View Profile
February 11, 2011, 06:03:39 PM
 #6

I can write it. But why SDK 2.2 when 2.1 is faster?

Sorry, I meant 2.1.
Raulo
Full Member
***
Offline Offline

Activity: 238


View Profile
February 11, 2011, 06:16:52 PM
 #7

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

http://bitcointalk.org/index.php?topic=1334.0

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

1HAoJag4C3XtAmQJAhE9FTAAJWFcrvpdLM
Mahkul
Sr. Member
****
Offline Offline

Activity: 434


Every saint has a past. Every sinner has a future.


View Profile
February 11, 2011, 07:30:09 PM
 #8

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.

Mahkul
Sr. Member
****
Offline Offline

Activity: 434


Every saint has a past. Every sinner has a future.


View Profile
February 11, 2011, 07:52:10 PM
 #9

@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 <module>
    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

kiba
Legendary
*
Offline Offline

Activity: 980


View Profile
February 11, 2011, 07:53:34 PM
 #10

You need to install numpy, Mahkul.

Mahkul
Sr. Member
****
Offline Offline

Activity: 434


Every saint has a past. Every sinner has a future.


View Profile
February 11, 2011, 07:56:46 PM
 #11

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.
Raulo
Full Member
***
Offline Offline

Activity: 238


View Profile
February 11, 2011, 08:04:03 PM
 #12

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.

1HAoJag4C3XtAmQJAhE9FTAAJWFcrvpdLM
Raulo
Full Member
***
Offline Offline

Activity: 238


View Profile
February 11, 2011, 08:04:48 PM
 #13

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.

1HAoJag4C3XtAmQJAhE9FTAAJWFcrvpdLM
Mahkul
Sr. Member
****
Offline Offline

Activity: 434


Every saint has a past. Every sinner has a future.


View Profile
February 11, 2011, 08:26:16 PM
 #14

@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?
Mahkul
Sr. Member
****
Offline Offline

Activity: 434


Every saint has a past. Every sinner has a future.


View Profile
February 11, 2011, 09:43:44 PM
 #15

@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?
Mahkul
Sr. Member
****
Offline Offline

Activity: 434


Every saint has a past. Every sinner has a future.


View Profile
February 11, 2011, 09:54:21 PM
 #16

@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
Raulo
Full Member
***
Offline Offline

Activity: 238


View Profile
February 11, 2011, 09:59:03 PM
 #17

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.

Wow. Out of 36 MH/s or so? That's impressive.

Quote
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.

I'm quite experienced with Linux and it took me anyway a few hours to make it work. The worst part is that ATI drivers work by magic. If it doesn't work, you have no idea why. That's a problem with proprietary binary only drivers.

Quote
Should I use the Bitcoin address in your signature?

Yes, I'll appreciate it.

Quote
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?

Sure. No problem.

1HAoJag4C3XtAmQJAhE9FTAAJWFcrvpdLM
Raulo
Full Member
***
Offline Offline

Activity: 238


View Profile
February 11, 2011, 10:05:36 PM
 #18

Sorted: just added -display :0 switch

Good. If you have some weird problems, you may try to uninstall the ones from System->Administration->Additional drivers and install  the ppa:ubuntu-x-swat/x-updates. The latter ones are 10.12 and are recommended (10.11 are as good as 10.12 and better for some but I had no problems with 10.12 while I had problems with multi-card set-up with older drivers). But if you don't have any problems, it's better not to touch it.

What version is printed with?
$ grep "ATI Proprietary Linux Driver" /var/log/Xorg.0.log

1HAoJag4C3XtAmQJAhE9FTAAJWFcrvpdLM
Mahkul
Sr. Member
****
Offline Offline

Activity: 434


Every saint has a past. Every sinner has a future.


View Profile
February 11, 2011, 10:15:04 PM
 #19

mahkul@mahkul:~/Downloads$ grep "ATI Proprietary Linux Driver" /var/log/Xorg.0.log
[    11.175] (II) ATI Proprietary Linux Driver Version Identifier:8.78.30
[    11.175] (II) ATI Proprietary Linux Driver Release Identifier: 8.78.3                               
[    11.175] (II) ATI Proprietary Linux Driver Build Date: Sep 20 2010 21:30:49
Raulo
Full Member
***
Offline Offline

Activity: 238


View Profile
February 11, 2011, 10:31:08 PM
 #20

mahkul@mahkul:~/Downloads$ grep "ATI Proprietary Linux Driver" /var/log/Xorg.0.log
[    11.175] (II) ATI Proprietary Linux Driver Version Identifier:8.78.30
[    11.175] (II) ATI Proprietary Linux Driver Release Identifier: 8.78.3                               
[    11.175] (II) ATI Proprietary Linux Driver Build Date: Sep 20 2010 21:30:49

This is Catalyst 10.10. But if it works, keep it.

1HAoJag4C3XtAmQJAhE9FTAAJWFcrvpdLM
Pages: [1] 2 3 4 5 6 7 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!