Bitcoin Forum
November 02, 2024, 06:14:03 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
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 52 53 54 55 56 »
  Print  
Author Topic: python OpenCL bitcoin miner  (Read 1239026 times)
m0mchil (OP)
Full Member
***
Offline Offline

Activity: 171
Merit: 127


View Profile
November 03, 2010, 01:48:19 PM
Last edit: November 04, 2010, 01:07:49 PM by m0mchil
 #161

Its not for the masses obviously.  Sad

Edit btc_miner.cl

Insert at the top

#pragma OPENCL EXTENSION cl_amd_media_ops : enable

change

#define rot(x, y) rotate(x, (uint)y)

to

#define rot(x, y) amd_bitalign(x, x, (uint)(32-y))

See Stream SDK OpenCL Programming Guide for details.

I'll try to add some macro to resolve this by default.

brocktice
Sr. Member
****
Offline Offline

Activity: 292
Merit: 250


Apparently I inspired this image.


View Profile WWW
November 03, 2010, 02:02:41 PM
 #162

Ah, that did it, thanks!

http://media.witcoin.com/p/1608/8----This-is-nuts

My #bitcoin-otc ratings: http://bitcoin-otc.com/viewratingdetail.php?nick=brocktice&sign=ANY&type=RECV

Like my post? Leave me a tip: 15Cgixqno9YzoKNEA2DRFyEAfMH5htssRg
fenpark15
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
November 03, 2010, 02:42:53 PM
 #163

OK - Have it working now!  I needed to fix some hidden characters that snuck in during the creation of my .conf file.  Also, I was previously not running bitcoin in server mode.

  Only 20740 khash/s with my ATI HD 4600 (work computer) but it sure beats 4600 from the CPU.  Thanks for the help.
ciuciu
Donator
Hero Member
*
Offline Offline

Activity: 588
Merit: 500


View Profile
November 03, 2010, 10:51:51 PM
 #164

Hi,

I hope I can get an answer, although my question might seem stupid to some of you.
I try to run poclbm.exe after I downloaded the files from the first post in this thread and I only get this message:

C:\Users\First\Desktop\my>poclbm.exe
Traceback (most recent call last):
  File "poclbm.py", line 5, in <module>
  File "pyopencl\__init__.pyc", line 3, in <module>
  File "pyopencl\_cl.pyc", line 12, in <module>
  File "pyopencl\_cl.pyc", line 10, in __load
ImportError: DLL load failed: The specified procedure could not be found.

Thank you.

ciuciu
Donator
Hero Member
*
Offline Offline

Activity: 588
Merit: 500


View Profile
November 03, 2010, 11:22:07 PM
Last edit: November 04, 2010, 01:33:37 AM by ciuciu
 #165

Solved  by reinstalling all drivers. Smiley

Yes, installed both.
I have a Radeon HD 5850 and Windows 7 x64.

Thank you.

teknohog
Sr. Member
****
Offline Offline

Activity: 520
Merit: 253


555


View Profile WWW
November 05, 2010, 04:47:41 PM
Last edit: November 08, 2010, 02:18:37 PM by teknohog
 #166

59.5 Mhash/s on a Radeon HD 5570. Cheers to m0mchil Smiley

Edit:

This is using --frames 1. With the default frames, I only get about 52 Mhash/s.

After updating the Radeon Linux drivers from 10.9 to 10.10, the rate decreased slightly to 59.2. However, I then tried the vectors option, which gave a small boost up to 60.65 Mhash/s. The motherboard only has 1x PCIe slots, which may affect things.


world famous math art | masternodes are bad, mmmkay?
Every sha(sha(sha(sha()))), every ho-o-o-old, still shines
Need2Revolt
Newbie
*
Offline Offline

Activity: 29
Merit: 0


View Profile
November 05, 2010, 08:56:06 PM
 #167

great work m0mchil!!!
laptop with an ATI HD5650 running at 46Mhash/s

thanks a lot for this app and i hope you can put your work in the official trunk asap
brocktice
Sr. Member
****
Offline Offline

Activity: 292
Merit: 250


Apparently I inspired this image.


View Profile WWW
November 08, 2010, 06:38:52 PM
 #168

I am working on a daemon-like version of this miner via a fork on github. The script is minerd.py, and it uses a config file.

It's still in development / testing, but if you'd like to give it a try here it is:

https://github.com/brocktice/poclbm

http://media.witcoin.com/p/1608/8----This-is-nuts

My #bitcoin-otc ratings: http://bitcoin-otc.com/viewratingdetail.php?nick=brocktice&sign=ANY&type=RECV

Like my post? Leave me a tip: 15Cgixqno9YzoKNEA2DRFyEAfMH5htssRg
brocktice
Sr. Member
****
Offline Offline

Activity: 292
Merit: 250


Apparently I inspired this image.


View Profile WWW
November 09, 2010, 01:29:51 AM
Last edit: November 11, 2010, 03:52:27 AM by brocktice
 #169

Linux Miner Howto

Donations: 1Nw7aQcdtGVPmMsMtSJrDoQPEu1FJspyfd

I'll probably miss something, so please propose changes if you see fit.

1. Install Linux. For now I recommend Ubuntu 10.04 LTS Server, and I will be targeting it in this guide.

2. Install prerequisites, including compilers.

Code:
sudo aptitude install build-essential linux-headers-`uname -r`

3. Install the ATI drivers. The ubuntu packages are old. First,

Code:
wget https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/ati-driver-installer-10-10-x86.x86_64.run

(then build dpkgs, need to add instructions here)

-OR-

Try
Code:
apt-cache search fglrx
on debian-based systems (including ubuntu). If it's available, do
Code:
sudo apt-get install fglrx
, otherwise, download (and you may want to check for an update) using

Code:
wget https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/ati-driver-installer-10-10-x86.x86_64.run

4. Run the installer with
Code:
sudo sh ./ati-driver-installer-10-10-x86.x86_64.run
You may instead want to build packages. This may be added later.

5. Do the initial X configuration with
Code:
sudo aticonfig --initial --adapter=all -f
as root. And restart X. Logging out of X and back in should work. If you get a black screen, try ctrl-alt-f1, hopefully this will get you to a terminal where you can log in and recover.

6. Get the ATI streaming SDK v2.1 NOT v2.2, from here: http://developer.amd.com/gpu/ATIStreamSDK/pages/ATIStreamSDK-Archive.aspx

7. Untar it somewhere, I just used ~/ since it's a dedicated mining machine.

8. Edit your ~/.bashrc and add these lines:

Code:
ATISTREAMSDKSAMPLESROOT=/path/to/the/sdk
ATISTREAMSDKROOT=/path/to/the/sdk






http://media.witcoin.com/p/1608/8----This-is-nuts

My #bitcoin-otc ratings: http://bitcoin-otc.com/viewratingdetail.php?nick=brocktice&sign=ANY&type=RECV

Like my post? Leave me a tip: 15Cgixqno9YzoKNEA2DRFyEAfMH5htssRg
brocktice
Sr. Member
****
Offline Offline

Activity: 292
Merit: 250


Apparently I inspired this image.


View Profile WWW
November 09, 2010, 03:00:07 PM
 #170

By the way, I'd like to add an accuracy-checking opencl code to make sure the video cards are working right before starting generation, or as an optional run-mode. Art is using something similar to do precision overclocking.

I'll probably get around to it eventually, but if someone would like to contribute it feel free. Basically it should take known inputs and hashed outputs, and verify that the card correctly hashes the inputs to the outputs.

http://media.witcoin.com/p/1608/8----This-is-nuts

My #bitcoin-otc ratings: http://bitcoin-otc.com/viewratingdetail.php?nick=brocktice&sign=ANY&type=RECV

Like my post? Leave me a tip: 15Cgixqno9YzoKNEA2DRFyEAfMH5htssRg
InterArmaEnimSil
Member
**
Offline Offline

Activity: 77
Merit: 10


View Profile
November 09, 2010, 04:08:16 PM
 #171

I see all kinds of discussion regarding AMD/ATI drivers here...does this work on nVidia cards which support OpenCL?  Mine is on the list at the beginning of the thread, but I think I may be missing/skipping something, or misinterpreting whether my card is supported by this fork at all.  Thanks to everyone in advance.

12aro27eH2SbM1N1XT4kgfsx89VkDf2rYK
BitLex
Hero Member
*****
Offline Offline

Activity: 532
Merit: 505


View Profile
November 09, 2010, 07:44:21 PM
 #172

does this work on nVidia cards which support OpenCL?
yes, it does.
works fine for me on 8600GT and gtx260, so it should also work on all in between and above.

LobsterMan
Member
**
Offline Offline

Activity: 73
Merit: 10


View Profile
November 09, 2010, 09:12:52 PM
Last edit: November 10, 2010, 03:57:30 AM by LobsterMan
 #173

Very nice, thanks a lot m0mchil, I'll send some coins as gratitude once I start generating some blocks  Grin
(running successfully on win7-64 with 2x gtx275's and version 260.99 of the nvidia drivers at present)

I fire up one instance polcbm.exe for each of my gfx cards, specifying 0 or 1 to select which device:
https://i.imgur.com/uONpy.png for example

Working nicely so far giving me 45-50mhash/s per card, vs. just around 4.1mhash for my i7 running @ 2.67GHz.



A few questions:

-I've obtained the patched bitcoin.exe and I run that with "bitcoin.exe -server", is this more or less the same as specifying -daemon? just that daemon has no gui?

-Is there any "proper" way to close the miners? ctrl-c works but generates some weird warnings like:
Code:
Traceback (most recent call last):
  File "poclbm.py", line 144, in <module>
  File "pyopencl\__init__.pyc", line 286, in event_wait
KeyboardInterrupt

-At present is the only way to run these and be able to view your hash rate to have command windows open? I imagine I could whip up some sort of batch script to launch 2 of them, but that is still going to need at least 2 console windows, one for each miner?
InterArmaEnimSil
Member
**
Offline Offline

Activity: 77
Merit: 10


View Profile
November 09, 2010, 09:31:18 PM
 #174

does this work on nVidia cards which support OpenCL?
yes, it does.
works fine for me on 8600GT and gtx260, so it should also work on all in between and above.

Great to know that it will work on my card.  I've gotten PyOpenCL installed, but I've hit an impasse patching Satoshi's mainline client.  I'm running Linux, and the standard "patch" command responds that the input is garbage, while copying the patch files on top of the mainline ones won't compile by a long shot.  Could someone clue me in to what I'm supposed to be doing here?

12aro27eH2SbM1N1XT4kgfsx89VkDf2rYK
lfm
Full Member
***
Offline Offline

Activity: 196
Merit: 104



View Profile
November 10, 2010, 12:48:07 AM
 #175

Quote
I'm running Linux, and the standard "patch" command responds that the input is garbage, while copying the patch files on top of the mainline ones won't compile by a long shot.  Could someone clue me in to what I'm supposed to be doing here?

You need exactly the right revision of the bitcoin sources to use the patch. Most of the patch versions I have seen are for the "svn" development revisions of bitcoin. I think the top few lines of the patch should have a svn revision number that you can use to get the right revision of the source using a svn command.
svn -r {num} http:....


have fun.
davout
Legendary
*
Offline Offline

Activity: 1372
Merit: 1008


1davout


View Profile WWW
November 10, 2010, 09:27:05 AM
 #176

Quote
I'm running Linux, and the standard "patch" command responds that the input is garbage, while copying the patch files on top of the mainline ones won't compile by a long shot.  Could someone clue me in to what I'm supposed to be doing here?

You need exactly the right revision of the bitcoin sources to use the patch. Most of the patch versions I have seen are for the "svn" development revisions of bitcoin. I think the top few lines of the patch should have a svn revision number that you can use to get the right revision of the source using a svn command.
svn -r {num} http:....


have fun.

Go to sources root and then :
$ patch -i -p0 < /path/to/the/patch

InterArmaEnimSil
Member
**
Offline Offline

Activity: 77
Merit: 10


View Profile
November 10, 2010, 04:19:51 PM
 #177

Quote
I'm running Linux, and the standard "patch" command responds that the input is garbage, while copying the patch files on top of the mainline ones won't compile by a long shot.  Could someone clue me in to what I'm supposed to be doing here?

You need exactly the right revision of the bitcoin sources to use the patch. Most of the patch versions I have seen are for the "svn" development revisions of bitcoin. I think the top few lines of the patch should have a svn revision number that you can use to get the right revision of the source using a svn command.
svn -r {num} http:....


have fun.

Go to sources root and then :
$ patch -i -p0 < /path/to/the/patch

Thanks!  The next issue seems to be wxWidgets.  The revision calls for 2.9.0, but I can only find 2.9.1 now, which doesn't appear to work.  Anyone know where I can get 2.9.0?  Or, does 2.9.1 indeed work, and I'm just doing something wrong?  Sorry for the dearth of questions...

12aro27eH2SbM1N1XT4kgfsx89VkDf2rYK
darich
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
November 10, 2010, 09:51:42 PM
 #178

On winxp I downloaded binaries and trying with last nvidia driver (geforce 6200).
poclbm write this:
Code:
C:\Documents and Settings\David Richter\poclbm>poclbm
Traceback (most recent call last):
  File "poclbm.py", line 55, in <module>
pyopencl.LogicError: clGetPlatformIDs failed: invalid/unknown error code

C:\Documents and Settings\David Richter\poclbm>

Is it due to nvidia? Is anyone using it with nvidia?
thnx
SmokeTooMuch
Legendary
*
Offline Offline

Activity: 860
Merit: 1026


View Profile
November 10, 2010, 10:15:43 PM
 #179

afaik the geforce 6 series does not have support for CUDA/OpenCL.
you need geforce 8 and newer.

Date Registered: 2009-12-10 | I'm using GPG, pm me for my public key. | Bitcoin on Reddit: https://www.reddit.com/r/btc
slush
Legendary
*
Offline Offline

Activity: 1386
Merit: 1097



View Profile WWW
November 11, 2010, 08:36:16 PM
 #180

Hi, I cannot get it work Sad

Started patched bitcoin with rpc enabled, then poclbm.exe, but it displayed

Code:
No device specified, you may use -d to specify one of the following

Traceback (most recent call last):
  File "poclbm.py", line 61, in <module>
    context = cl.create_some_context()
  File "pyopencl\__init__.pyc", line 350, in create_some_context
pyopencl.RuntimeError: Context failed: out of host memory

I have already latest development version of OpenCL installed.

Any ideas?  Undecided Thanks  Smiley
Marek

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 52 53 54 55 56 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!