Bitcoin Forum
April 23, 2014, 07:30:29 PM *
News: Due to the OpenSSL heartbleed bug, changing your forum password is recommended.
 
   Home   Help Search Donate Login Register  
Pages: [1] 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 ... 56
  Print  
Author Topic: python OpenCL bitcoin miner  (Read 1002670 times)
m0mchil
Full Member
***
Offline Offline

Activity: 170


View Profile

Ignore
October 01, 2010, 06:21:59 PM
 #1

Latest miner

poclbm_py2exe_20120920

mirror


Sources for poclbm are at http://github.com/m0mchil/poclbm


GUI

Created by Kiv, see http://bitcointalk.org/index.php?topic=3878.0


Guides

Windows - http://www.newslobster.com/random/how-to-get-started-using-your-gpu-to-mine-for-bitcoins-on-windows

Ubuntu - http://bitcointalk.org/index.php?topic=2636

Mac - http://forum.bitcoin.org/index.php?topic=12360


Known best settings
(please PM better/best settings for your platform)

AMD 5xxx and up
use '-v -w 128'


Frequently asked questions

Q: Does my video card / driver supports OpenCL?

AMD - 4xxx and up. Nvidia - 8xxx and up. On Windows you can use 'GPU Caps Viewer' or similar.


Q: I am seeing 'pyopencl.LogicError: clGetPlatformIDs failed', what is this?
Q: It says 'ImportError: DLL load failed: The specified module could not be found'?
Q: Or 'ImportError: DLL load failed: The specified procedure could not be found'?


You don't have proper OpenCL support. The reasons may vary. Be sure to remove any old drivers and SDK from different vendors you may have used. Use web search to see how to make it work for your combination of GPU and OS.


Q: When I try to run it with the following parameters: '--host=http://mining.bitcoin.cz:8332' miner errors out with  'nonnumeric port'

Remove 'http://', it's intended for browsers (becames '--host=mining.bitcoin.cz'). Use '--port' to specify port (default is 8332 so you don't need to specify it if the pool you use is at same port).


Q: Why it uses 100% CPU?

You probably selected the CPU as OpenCL device. Or you are using it on Linux with AMD Stream SDK 2.2. Use 2.1 instead.


Q: What does 'invalid or stale' means?

The block last submitted was either invalid or stale.


Q: How a block becomes stale?

You submited solution for a block which was just solved by someone else.


Q: Why a block is invalid?

Don't overclock too much. And switch crossfire off. Or may be I screwed the search again? Smiley It's good if you see more 'accepted's than 'invalid's.


When I try to run the miner a new CMD window flashes on my screen too rapidly to read anything, or even see if it says anything.

It's console application. You use that ugly black thing called 'Command Prompt' to run it.

1398281429
Hero Member
*
Offline Offline

Posts: 1398281429

View Profile Personal Message (Offline)

Ignore
1398281429
Reply with quote  #2

1398281429
Report to moderator
1398281429
Hero Member
*
Offline Offline

Posts: 1398281429

View Profile Personal Message (Offline)

Ignore
1398281429
Reply with quote  #2

1398281429
Report to moderator
1398281429
Hero Member
*
Offline Offline

Posts: 1398281429

View Profile Personal Message (Offline)

Ignore
1398281429
Reply with quote  #2

1398281429
Report to moderator
Unbeatable Service & Product Support
Grab Your Miners at GAWMiners.com
Order Before April 25th to receive
Double your Hashing Power for 1 week!

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

Posts: 1398281429

View Profile Personal Message (Offline)

Ignore
1398281429
Reply with quote  #2

1398281429
Report to moderator
1398281429
Hero Member
*
Offline Offline

Posts: 1398281429

View Profile Personal Message (Offline)

Ignore
1398281429
Reply with quote  #2

1398281429
Report to moderator
nelisky
Hero Member
*****
Offline Offline

Activity: 1218


View Profile

Ignore
October 01, 2010, 06:35:13 PM
 #2

I hope someone will try this wonderful OpenCL bitcoin miner. It uses PyOpenCl. Should be generally platform independent. The OpenCL kernel uses previous work by laszlo. You will need bitcoin patched with this to enable RPC getwork(). You may use as many external miners as you wish (if running RPC with -rpcallowip).

Have fun.



Amazing solution! Not good for the masses (it's better to integrate the miner in the binary) but great for experimentation and multiple machine mining. I'll be sure to have a go at this when I get a sec, kudos for putting this out.

we measure long periods of time in bitcoin blocks, and short ones in vodka tonics
DividendRippler  | DICEonCRACK | The Amazing Anonymous Bitcoin Lottery
jgarzik
Staff
Hero Member
*****
Offline Offline

Activity: 1260


View Profile

Ignore
October 01, 2010, 06:35:57 PM
 #3

It is interesting to see how you've split mining and wallet+P2P into separate pieces.  Nice and modular.

I'll be interested to see feedback from people, if they actually generate coins from this.

Jeff Garzik, bitcoin core dev team and BitPay engineer; opinions are my own, not my employer.
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
m0mchil
Full Member
***
Offline Offline

Activity: 170


View Profile

Ignore
October 01, 2010, 07:06:06 PM
 #4

nelisky: Integrating CUDA/OpenCL seems to have portability issues. Also, my goal is actually to convince satoshi to patch the mainline. The patch must be crystal clear for this to happen.

jgarzik: I tested this against vanilla client to be sure blocks are actually accepted. On ATI 4350 it makes ~5800 khash/s.


Forgot to mention that original client generation could be used in parallel.

nelisky
Hero Member
*****
Offline Offline

Activity: 1218


View Profile

Ignore
October 01, 2010, 07:36:35 PM
 #5

nelisky: Integrating CUDA/OpenCL seems to have portability issues. Also, my goal is actually to convince satoshi to patch the mainline. The patch must be crystal clear for this to happen.


Yes, that is one of my biggest concerns. I don't have enough exposure to assert in multiple platforms / hw. And I have failed to provide a simple click and use distributable, as of yet, but as interest increases and more developers tackle this I'm sure one of us will provide a clean implementation that is production quality for satoshi.

we measure long periods of time in bitcoin blocks, and short ones in vodka tonics
DividendRippler  | DICEonCRACK | The Amazing Anonymous Bitcoin Lottery
m0mchil
Full Member
***
Offline Offline

Activity: 170


View Profile

Ignore
October 01, 2010, 07:46:09 PM
 #6

davidonpda: you need

1. Some OpenCL capable hardware and driver.
2. python 2.6.6
3. PyOpenCL. This could be tricky, follow the official installation instructions.

oclbm.py -h or --help for some options, by default looks for bitcoin RPC at 127.0.0.1:8332

Hope this helps

checker
Sr. Member
****
Offline Offline

Activity: 350



View Profile

Ignore
October 01, 2010, 08:10:55 PM
 #7

Will opencl client works on ati hd3850?

Хочешь отблагодарить - кинь биткоинов, сколько не жалко- буду рад!
(If u want to say me thanx - give me some bitcoins Smiley )
1NXsbppu1B2exLUY8i5cYbQxbc2zWtiTAY
m0mchil
Full Member
***
Offline Offline

Activity: 170


View Profile

Ignore
October 02, 2010, 06:00:48 AM
 #8

ATI HD3850 has no OpenCL support.

4xxx and 5xxx have.

m0mchil
Full Member
***
Offline Offline

Activity: 170


View Profile

Ignore
October 04, 2010, 11:43:55 AM
 #9

Due to popular demand Smiley bitcoin PyOpenCL miner is available now at http://github.com/m0mchil/poclbm

There are some minor fixes. Be sure to experiment with globalThreads to achieve better performance/dekstop lag ratio.

ShadowOfHarbringer
Hero Member
*****
Offline Offline

Activity: 1246


Bringing Har® to you since 1952


View Profile

Ignore
October 04, 2010, 12:27:44 PM
 #10

jgarzik: I tested this against vanilla client to be sure blocks are actually accepted. On ATI 4350 it makes ~5800 khash/s.

Hmm, that's weird. Shouldn't the speed be much bigger, like 10-fold or 100-fold faster at least ?

I mean there was this guy somewhere on the BTC forum who claimed that he's getting 983 Mhash/s (983 000 khash/sec) with just 3 radeons 5870 or something.

nelisky
Hero Member
*****
Offline Offline

Activity: 1218


View Profile

Ignore
October 04, 2010, 12:34:43 PM
 #11

jgarzik: I tested this against vanilla client to be sure blocks are actually accepted. On ATI 4350 it makes ~5800 khash/s.

Hmm, that's weird. Shouldn't the speed be much bigger, like 10-fold or 100-fold faster at least ?

I mean there was this guy somewhere on the BTC forum who claimed that he's getting 983 Mhash/s (983 000 khash/sec) with just 3 radeons 5870 or something.

Yeah, I'm struggling with how OpenCL compiles kernels and the impact of the work size on performance. It is quite counter intuitive coming from CUDA, as the unrolling of loops and functions actually makes performance worse, as the kernel needs more space. I don't have any numbers for that ATI, but the 4350 seems to be a LOT less performant than the 5870, so it might not be that low.

Once I have hardware to test this for real, I'll compare my approach to this one, so we can learn from each other.

we measure long periods of time in bitcoin blocks, and short ones in vodka tonics
DividendRippler  | DICEonCRACK | The Amazing Anonymous Bitcoin Lottery
m0mchil
Full Member
***
Offline Offline

Activity: 170


View Profile

Ignore
October 04, 2010, 12:52:40 PM
 #12

There is information on wikipedia about the performance of various AMD/ATI and Nvidia chips.

4350 is cited at 92 GFLOPS. 5870 has 2720 GFLOPS. tcatm has 3x5870s. Due to it's superior architecture 5870 is capable of more than just the difference in GFLOPS. For example I get 6 Mhash/s on 4350 and 137 Mhash/s on 5770 (ratio of 1/22) even if the ratio of GFLOPS for the relevant cards is 92 to 1360 (1/14).

BitLex
Staff
Hero Member
*****
Offline Offline

Activity: 868


View Profile WWW

Ignore
October 04, 2010, 01:57:52 PM
 #13

don't have an ATI card, but even after reading those performance-infos i still can't believe that 980something-mega-hash.

5.800khash on a hd4350 makes sense to me, i get around 5-6.000 on a 8600gt, both listed around 100GFlops.
my gtx260 gets ~40Mhash, 874GFlops
i'd expect a hd5870 makes at least 3times as much, cuz it's listed with 2700GFlops,
which would result in around 400Mhash for 3 of those cards,
that's what i would expect, so where's those extra 600Mhash coming from? Huh
it's superior architecture?
if so, my next card will be ati again.  Grin

nelisky
Hero Member
*****
Offline Offline

Activity: 1218


View Profile

Ignore
October 04, 2010, 02:02:54 PM
 #14

don't have an ATI card, but even after reading those performance-infos i still can't believe that 980something-mega-hash.

5.800khash on a hd4350 makes sense to me, i get around 5-6.000 on a 8600gt, both listed around 100GFlops.
my gtx260 gets ~40Mhash, 874GFlops
i'd expect a hd5870 makes at least 3times as much, cuz it's listed with 2700GFlops,
which would result in around 400Mhash for 3 of those cards,
that's what i would expect, so where's those extra 600Mhash coming from? Huh
it's superior architecture?
if so, my next card will be ati again.  Grin


There's a lot more than GFlops to this equation. Memory bandwidth, for one, will be very important.

we measure long periods of time in bitcoin blocks, and short ones in vodka tonics
DividendRippler  | DICEonCRACK | The Amazing Anonymous Bitcoin Lottery
BitLex
Staff
Hero Member
*****
Offline Offline

Activity: 868


View Profile WWW

Ignore
October 04, 2010, 02:29:21 PM
 #15

of course, but still
i'd like to know if that's a usual expectation on ati cards compared to nvidia,
no single-hd5870-users around that want to share their hash-count?

i'm gonna buy a new card sooner or later anyway and i don't mind if it says ati or nvidia on it,
both will surely run my game/s.
but if one of them is x times better crunching blocks and besides that, prolly cheaper too,
i already know what my next favourite brand is.

m0mchil
Full Member
***
Offline Offline

Activity: 170


View Profile

Ignore
October 04, 2010, 03:30:57 PM
 #16

Sorry, just realized i broke it with latest changes, please update. (It won't submit to RPC properly)

m0mchil
Full Member
***
Offline Offline

Activity: 170


View Profile

Ignore
October 05, 2010, 03:31:14 PM
 #17

Added auto adjustment to keep desktop responsive. Also, doing hash rate calculation at user defined interval.

martin
Full Member
***
Offline Offline

Activity: 150



View Profile WWW

Ignore
October 05, 2010, 10:27:55 PM
 #18

I can't get the getwork patch to compile into bitcoin. Is that something satoshi has considered adding to the main trunk?

I've got PyOpenCL finally installed but without the patch in the client, I can't request anything.

I'm in the same position. All I need is the patch compiled into the client and I should be ready to go :/

L29Ah
Newbie
*
Offline Offline

Activity: 8


View Profile

Ignore
October 05, 2010, 11:28:44 PM
 #19

i'm getting http://paste.pocoo.org/show/271546/ when trying to run it
m0mchil
Full Member
***
Offline Offline

Activity: 170


View Profile

Ignore
October 06, 2010, 10:42:59 AM
 #20

Slightly improved kernel (~10%). Fixed a problem with rotate() and Nvidia OpenCL. I won't upload anymore to the forum, please use the repo.

Pages: [1] 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 ... 56
  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!