Bitcoin Forum
April 23, 2014, 11:11:23 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 52 53 54 55 56
  Print  
Author Topic: python OpenCL bitcoin miner  (Read 1002729 times)
m0mchil
Full Member
***
Offline Offline

Activity: 170


View Profile

Ignore
November 03, 2010, 01:48:19 PM
 #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.

Buy a Blade, Get a 5-Chip Free!
Start Mining with GAWMiners.com
24/7 Live Phone & Tech Support
Free Hosting & Electricity for 1 Year!

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

Posts: 1398294683

View Profile Personal Message (Offline)

Ignore
1398294683
Reply with quote  #2

1398294683
Report to moderator
1398294683
Hero Member
*
Offline Offline

Posts: 1398294683

View Profile Personal Message (Offline)

Ignore
1398294683
Reply with quote  #2

1398294683
Report to moderator
1398294683
Hero Member
*
Offline Offline

Posts: 1398294683

View Profile Personal Message (Offline)

Ignore
1398294683
Reply with quote  #2

1398294683
Report to moderator
1398294683
Hero Member
*
Offline Offline

Posts: 1398294683

View Profile Personal Message (Offline)

Ignore
1398294683
Reply with quote  #2

1398294683
Report to moderator
brocktice
Sr. Member
****
Offline Offline

Activity: 292


Apparently I inspired this image.


View Profile WWW

Ignore
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


View Profile

Ignore
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


View Profile

Ignore
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


View Profile

Ignore
November 03, 2010, 11:22:07 PM
 #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: 273



View Profile WWW

Ignore
November 05, 2010, 04:47:41 PM
 #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.


So Lazy, Obviously True Hodler Sf67i4Xeqkn7mMcJ2nNT7uPUZXnoeqWfZh
Need2Revolt
Newbie
*
Offline Offline

Activity: 29


View Profile

Ignore
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


Apparently I inspired this image.


View Profile WWW

Ignore
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


Apparently I inspired this image.


View Profile WWW

Ignore
November 09, 2010, 01:29:51 AM
 #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


Apparently I inspired this image.


View Profile WWW

Ignore
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


View Profile

Ignore
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
Staff
Hero Member
*****
Offline Offline

Activity: 868


View Profile WWW

Ignore
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: 72


View Profile

Ignore
November 09, 2010, 09:12:52 PM
 #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:
http://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


View Profile

Ignore
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



View Profile

Ignore
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
Staff
Hero Member
*****
Offline Offline

Activity: 1148


1davout


View Profile WWW

Ignore
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


View Profile

Ignore
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


View Profile

Ignore
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
Hero Member
*****
Offline Offline

Activity: 784


View Profile

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

You like what I'm doing? Why don't you send me a coin: 17Pj8jpUgY6qTaKgiopL5U48zxU4rTrkuB
Bitcoin on Reddit: https://pay.reddit.com/r/Bitcoin
slush
Hero Member
*****
Offline Offline

Activity: 1078



View Profile WWW

Ignore
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:  

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!