Bitcoin Forum
April 21, 2014, 01:05:52 PM *
News: Due to the OpenSSL heartbleed bug, changing your forum password is recommended.
 
   Home   Help Search Donate Login Register  
Pages: [1] 2  All
  Print  
Author Topic: Easy Ubuntu python OpenCL mining setup  (Read 120000 times)
Syke
Hero Member
*****
Offline Offline

Activity: 1260


View Profile

Ignore
January 06, 2011, 06:32:08 AM
 #1

Here's the quick instructions I use when setting up a new box. Nothing fancy, but it works. From a bare box to a mining machine.

1. Install Ubuntu 10.10.
2. Install the proprietary video driver. The regular Nvidia driver in the repo works fine. I have not tested the ATI driver.
3. Install the python stuff. Paste the following commands in a Terminal:
Code:
sudo apt-get install python-pyopencl subversion
wget http://iweb.dl.sourceforge.net/project/bitcoin/Bitcoin/bitcoin-0.3.19/bitcoin-0.3.19-linux.tar.gz
tar xvf bitcoin-0.3.19-linux.tar.gz
svn checkout http://svn.json-rpc.org/trunk/python-jsonrpc
cd python-jsonrpc/
sudo python setup.py install
cd ..
mkdir .bitcoin
echo "rpcuser=un" > .bitcoin/bitcoin.conf
echo "rpcpassword=pw" >> .bitcoin/bitcoin.conf
wget --no-check-certificate https://github.com/m0mchil/poclbm/raw/master/BitcoinMiner.cl
wget --no-check-certificate https://github.com/m0mchil/poclbm/raw/master/BitcoinMiner.py
wget --no-check-certificate https://github.com/m0mchil/poclbm/raw/master/poclbm.py
~/bitcoin-0.3.19/bin/64/bitcoin -server&
python poclbm.py -d 0 --user un --pass pw

Change the username and password if you are worried about someone connecting to your box.

Buy & Hold
1398085552
Hero Member
*
Offline Offline

Posts: 1398085552

View Profile Personal Message (Offline)

Ignore
1398085552
Reply with quote  #2

1398085552
Report to moderator
1398085552
Hero Member
*
Offline Offline

Posts: 1398085552

View Profile Personal Message (Offline)

Ignore
1398085552
Reply with quote  #2

1398085552
Report to moderator
1398085552
Hero Member
*
Offline Offline

Posts: 1398085552

View Profile Personal Message (Offline)

Ignore
1398085552
Reply with quote  #2

1398085552
Report to moderator
    mBitCASINOWIN BITCOINS IN OUR
24/7 LIVE DEALER CASINO

Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1398085552
Hero Member
*
Offline Offline

Posts: 1398085552

View Profile Personal Message (Offline)

Ignore
1398085552
Reply with quote  #2

1398085552
Report to moderator
1398085552
Hero Member
*
Offline Offline

Posts: 1398085552

View Profile Personal Message (Offline)

Ignore
1398085552
Reply with quote  #2

1398085552
Report to moderator
1398085552
Hero Member
*
Offline Offline

Posts: 1398085552

View Profile Personal Message (Offline)

Ignore
1398085552
Reply with quote  #2

1398085552
Report to moderator
1398085552
Hero Member
*
Offline Offline

Posts: 1398085552

View Profile Personal Message (Offline)

Ignore
1398085552
Reply with quote  #2

1398085552
Report to moderator
em3rgentOrdr
Sr. Member
****
Offline Offline

Activity: 434


youtube.com/ericfontainejazz now accepts bitcoin


View Profile WWW

Ignore
January 12, 2011, 10:14:43 AM
 #2

Awesome!  I just did a fresh upgrade from Ubuntu 10.04 to 10.10, and followed your above instructions, and it worked for me, no problems.  Do you have a bitcoin donate address?

I'm getting 28,000 khash/sec on my Nvidia GF9800GX2 GPU using this OpenCL miner in addition to the 2,000 khash/sec on my low-end Core2 Duo CPU.

UPDATE: THAT 28,000 khash/sec was on just one GPU, but the GX2 has two GPUS.  When I also spawn a second process using -d 1, then I get an additional ~26,000 khash/sec for the GPU running my main display (but screen is clunkly, of course).

"We will not find a solution to political problems in cryptography, but we can win a major battle in the arms race and gain a new territory of freedom for several years.

Governments are good at cutting off the heads of a centrally controlled networks, but pure P2P networks are holding their own."
em3rgentOrdr
Sr. Member
****
Offline Offline

Activity: 434


youtube.com/ericfontainejazz now accepts bitcoin


View Profile WWW

Ignore
January 12, 2011, 12:30:47 PM
 #3

I modified this Ubuntu python script http://ubuntuforums.org/showthread.php?t=498631 which runs a command when the screensaver is invoked, to instead make it run the OpenCL miner on DEVICE 1 (which is the GPU controlling my video screen) and also modified this script to ensure it kills the OpenCL miner properly when exiting screensaver.  Then I added this script to my startup programs (in addition to the python script to run on DEVICE 0), so that I now have DEVICE 0 startup mining on login and then have DEVICE 1 startup mining when screensaver is invoked.  That's a total of ~56,000 khash/sec when my screen saver is on using both cards of my GF9800GX2!

Quote
#!/usr/bin/python

import os
import time
import subprocess

screensaver_started = 0
running = 0

while 1:
        active = 0
        out = ""

        if screensaver_started == 0:
                # Don't do anything if the screensaver isn't running
                s = os.popen("pidof gnome-screensaver")
                spid = s.read()
                s.close()
                if len(spid) > 0:
                        screensaver_started = 1
        else:
                h = os.popen("gnome-screensaver-command -q", "r")
                out = h.read()
                active = out.find("inactive")
                h.close()

                if active < 0 and running == 0:
                        p = subprocess.Popen(['python', 'poclbm.py', '-d', '1', '--user', 'un', '--pass', 'pw'])
                        running = 1
                elif active > 0 and running == 1:
                        p.kill()
                        running = 0

        time.sleep(5)

Update: I fixed a small bug...what you see above is corrected.

"We will not find a solution to political problems in cryptography, but we can win a major battle in the arms race and gain a new territory of freedom for several years.

Governments are good at cutting off the heads of a centrally controlled networks, but pure P2P networks are holding their own."
Syke
Hero Member
*****
Offline Offline

Activity: 1260


View Profile

Ignore
January 17, 2011, 07:11:00 PM
 #4

Glad it worked for you too! Sure, I'll accept donations at 1JpsaZmgqaPTx9pHayPHxNK3uuHqahDZ12.

Buy & Hold
em3rgentOrdr
Sr. Member
****
Offline Offline

Activity: 434


youtube.com/ericfontainejazz now accepts bitcoin


View Profile WWW

Ignore
January 17, 2011, 11:47:13 PM
 #5

Glad it worked for you too! Sure, I'll accept donations at 1JpsaZmgqaPTx9pHayPHxNK3uuHqahDZ12.

Ok, just sent you 10 bitcoins.

"We will not find a solution to political problems in cryptography, but we can win a major battle in the arms race and gain a new territory of freedom for several years.

Governments are good at cutting off the heads of a centrally controlled networks, but pure P2P networks are holding their own."
humble
Member
**
Offline Offline

Activity: 91



View Profile

Ignore
January 21, 2011, 04:16:57 AM
 #6

Has anyone got this running with ATI cards? I'd be curious how it compares to Diablo...
The Script
Sr. Member
****
Offline Offline

Activity: 336



View Profile

Ignore
January 22, 2011, 06:03:55 AM
 #7

Here's the quick instructions I use when setting up a new box. Nothing fancy, but it works. From a bare box to a mining machine.

1. Install Ubuntu 10.10.
2. Install the proprietary video driver. The regular Nvidia driver in the repo works fine. I have not tested the ATI driver.
3. Install the python stuff. Paste the following commands in a Terminal:
Code:
sudo apt-get install python-pyopencl subversion
wget http://iweb.dl.sourceforge.net/project/bitcoin/Bitcoin/bitcoin-0.3.19/bitcoin-0.3.19-linux.tar.gz
tar xvf bitcoin-0.3.19-linux.tar.gz
svn checkout http://svn.json-rpc.org/trunk/python-jsonrpc
cd python-jsonrpc/
sudo python setup.py install
cd ..
mkdir .bitcoin
echo "rpcuser=un" > .bitcoin/bitcoin.conf
echo "rpcpassword=pw" >> .bitcoin/bitcoin.conf
wget --no-check-certificate https://github.com/m0mchil/poclbm/raw/master/BitcoinMiner.cl
wget --no-check-certificate https://github.com/m0mchil/poclbm/raw/master/BitcoinMiner.py
wget --no-check-certificate https://github.com/m0mchil/poclbm/raw/master/poclbm.py
~/bitcoin-0.3.19/bin/64/bitcoin -server&
python poclbm.py -d 0 --user un --pass pw

Change the username and password if you are worried about someone connecting to your box.



Hey, I'm a complete newbie but am trying to ramp up my hash/s rate so I can get more shares in Slush's pooled mining venture.  I have a Lenovo SL510 laptop which apparently has the GMA4500 graphics card.  I have Win 7 and Ubuntu dual booted on the machine.  Currently I'm running my miner in Ubuntu and was wondering if this python code is compatible with my graphics card.  Would that be the best way to get a higher hash rate? Any advice?

Oh yeah, currently I'm only getting ~800 khash/s running the miner using my CPUs (dual core, 2.2 GHz).
Syke
Hero Member
*****
Offline Offline

Activity: 1260


View Profile

Ignore
January 22, 2011, 08:41:26 AM
 #8

No, sorry. The Intel graphics you have won't work.

Buy & Hold
Syke
Hero Member
*****
Offline Offline

Activity: 1260


View Profile

Ignore
January 22, 2011, 09:55:36 AM
 #9

Has anyone got this running with ATI cards? I'd be curious how it compares to Diablo...

The python-pyopencl package depends on the Nvidia drivers, which conflict with the ATI OpenCL drivers. So these instructions will not work on ATI.

Buy & Hold
jamesb
Jr. Member
*
Offline Offline

Activity: 30


View Profile

Ignore
February 16, 2011, 12:02:08 PM
 #10

Hello

thank you for your great work Syke (alias m0mchil?). I'm trying to make the miner work but it seems that the actual version on the git causes issues http://pastebin.com/QgFCsUHu which isn't my own paste. So I'm not alone with it.

Do you think someone can fix it any time soon. Does the problem come from json-rpc (need to upgrade?) or the your miner ? Thank you in advance.

Edit: I had to modify the port detection method because it found 'w' which isn't valid.
Edit2: I've used the revision 873dcf91516420b8baa92b7a71e2d1558fea370f which works fine, 58 Mhash/s great ! (have some 'Warning: overflow encountered in uint_scalars' though every 10-30 sec)
sniper_sniperson
Full Member
***
Offline Offline

Activity: 124


View Profile

Ignore
March 24, 2011, 10:58:00 PM
 #11

Any ideas how to start the stuff under Ubuntu server on Virtual Box, because without running gui 'fglrxinfo' just responds:

Quote
Error: unable to open display (null)

 Undecided

I think there might be a problem loading the ati driver since there is no gui service running in server mode...
carbonpenguin
Full Member
***
Offline Offline

Activity: 157



View Profile

Ignore
April 05, 2011, 07:00:57 PM
 #12

I'm a totally command-line illiterate ubuntu user, so I just copy/pasted the above into the command line, and it seemed to install. Now what do I do?
qed
Full Member
***
Offline Offline

Activity: 196


View Profile

Ignore
April 06, 2011, 07:10:51 PM
 #13

Confirmed not working on ATI card on Ubuntu even if the OpenCL example programs are running.

Mobile App (Android)

Monitor miners, exchange rates and Bitcoin network stats.
Jossie90
Newbie
*
Offline Offline

Activity: 1


View Profile

Ignore
April 07, 2011, 05:49:29 PM
 #14

I can unconfirm that. I've got a notebook here with Ubuntu 10.10 (Maverick) with an ATI Firepro.

To get it working I got
(a) the official ubuntu fglrx driver
(b) the ATI Stream SDK
(c) pyopencl from here http://pypi.python.org/pypi/pyopencl/2011.1beta3 , along with the required dependencies
I compiled pyopencl and it works just fine (around 58Mh/s).
singpolyma
Jr. Member
*
Offline Offline

Activity: 43



View Profile WWW

Ignore
April 12, 2011, 02:45:10 PM
 #15

I can unconfirm that. I've got a notebook here with Ubuntu 10.10 (Maverick) with an ATI Firepro.

To get it working I got
(a) the official ubuntu fglrx driver
(b) the ATI Stream SDK
(c) pyopencl from here http://pypi.python.org/pypi/pyopencl/2011.1beta3 , along with the required dependencies
I compiled pyopencl and it works just fine (around 58Mh/s).

Is it possible to make this work with ATI Radeon HD 2600 XT ?  I think I installed it right, but it only lists my CPU as an option for OpenCL device.
dust
Hero Member
*****
Offline Offline

Activity: 840



View Profile WWW

Ignore
April 12, 2011, 03:04:06 PM
 #16

Is it possible to make this work with ATI Radeon HD 2600 XT ?  I think I installed it right, but it only lists my CPU as an option for OpenCL device.

Only ATI 4xxx series and up are supported.

Cryptocoin Mining Info | OTC | PGP | Twitter | freenode: dust-otc | BTC: 1F6fV4U2xnpAuKtmQD6BWpK3EuRosKzF8U
blap
Jr. Member
*
Offline Offline

Activity: 53


=)


View Profile

Ignore
April 13, 2011, 07:12:40 PM
 #17

I can unconfirm that. I've got a notebook here with Ubuntu 10.10 (Maverick) with an ATI Firepro.

To get it working I got
(a) the official ubuntu fglrx driver
(b) the ATI Stream SDK
(c) pyopencl from here http://pypi.python.org/pypi/pyopencl/2011.1beta3 , along with the required dependencies
I compiled pyopencl and it works just fine (around 58Mh/s).

I do all, but when I run poclbm.py, I got: "ImportError: No module named sha256"

With: ubuntu 10.10 and ATI Mobility Radeon HD 5650

What I can do?

I could be killing, I could be stealing. But I'm begging here:
http://payb.tc/blap or
1LLqF5bdbhQoH37ztTsZ5tmyE5Lq7jYmns
=)
Dusty
Hero Member
*****
Offline Offline

Activity: 636


Libertas a calumnia


View Profile WWW

Ignore
April 15, 2011, 09:01:43 AM
 #18

I do all, but when I run poclbm.py, I got: "ImportError: No module named sha256"

With: ubuntu 10.10 and ATI Mobility Radeon HD 5650

What I can do?

I've the exact same problem, I also installed the package python-pycryptopp that should contain that package but I get the same import error.

Anybody care to help?

thanks!

Articoli bitcoin: Il portico dipinto
blap
Jr. Member
*
Offline Offline

Activity: 53


=)


View Profile

Ignore
April 15, 2011, 06:40:36 PM
 #19

I do all, but when I run poclbm.py, I got: "ImportError: No module named sha256"

With: ubuntu 10.10 and ATI Mobility Radeon HD 5650

What I can do?

I've the exact same problem, I also installed the package python-pycryptopp that should contain that package but I get the same import error.

Anybody care to help?

thanks!

try to get sha256.py.
Code:
wget --no-check-certificate https://github.com/m0mchil/poclbm/raw/master/sha256.py
=)

I could be killing, I could be stealing. But I'm begging here:
http://payb.tc/blap or
1LLqF5bdbhQoH37ztTsZ5tmyE5Lq7jYmns
=)
blap
Jr. Member
*
Offline Offline

Activity: 53


=)


View Profile

Ignore
April 15, 2011, 06:44:09 PM
 #20

I do all, but when I run poclbm.py, I got: "ImportError: No module named sha256"

With: ubuntu 10.10 and ATI Mobility Radeon HD 5650

What I can do?

I've the exact same problem, I also installed the package python-pycryptopp that should contain that package but I get the same import error.

Anybody care to help?

thanks!

try to get sha256.py.
Code:
wget --no-check-certificate https://github.com/m0mchil/poclbm/raw/master/sha256.py
=)

now I got:
Code:
Traceback (most recent call last):
  File "poclbm.py", line 3, in <module>
    import pyopencl as cl
  File "/usr/lib/pymodules/python2.6/pyopencl/__init__.py", line 3, in <module>
    import pyopencl._cl as _cl
ImportError: libOpenCL.so.1: cannot open shared object file: No such file or directory

I found this topic: http://bitcointalk.org/index.php?topic=3359.0;all
but I do not kown what to do next...
=(

I could be killing, I could be stealing. But I'm begging here:
http://payb.tc/blap or
1LLqF5bdbhQoH37ztTsZ5tmyE5Lq7jYmns
=)
Pages: [1] 2  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!