BitcoinTalk
python OpenCL bitcoin miner

View Satoshi only

External link

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.
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.
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.
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: 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.
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
Will opencl client works on ati hd3850?
ATI HD3850 has no OpenCL support.

4xxx and 5xxx have.
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.
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.
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.
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).
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
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.
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.
Sorry, just realized i broke it with latest changes, please update. (It won't submit to RPC properly)
Added auto adjustment to keep desktop responsive. Also, doing hash rate calculation at user defined interval.
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 :/
i'm getting http://paste.pocoo.org/show/271546/ when trying to run it
Slightly improved kernel (~10%). Fixed a problem with rotate() and Nvidia OpenCL. I won't upload anymore to the forum, please use the repo.
Do i need to use a special version of graphics drivers to get the OpenCL client working ?
Win32 bitcoin with getwork, against SVN 161.
Any chance of a 64 bit windows build? Roll Eyes
Slightly improved kernel (~10%). Fixed a problem with rotate() and Nvidia OpenCL. I won't upload anymore to the forum, please use the repo.
now it segfaults: http://paste.pocoo.org/show/271825/
Sorry, forgot about that. You should install json-rpc. See at http://json-rpc.org/wiki/python-json-rpc

L29Ah, unfortunately there isn't Nvidia card here to test with it. I suppose you should try different drivers. It seems the problem is in nvidia OpenCL compiler.
Use '-server'.
Slightly improved kernel (~10%). Fixed a problem with rotate() and Nvidia OpenCL. I won't upload anymore to the forum, please use the repo.

Added to http://www.bitcoin.org/wiki/doku.php?id=repositories
Can anyone pls upload the Stream SDK 2.2 for 64bit Windows 7 pls ?
AMD link is down -.-
Got it working:

295525 khash/s!!!

Holy mother of <Insert supreme being here>

Please, do share some hw details Smiley
damn, i cant get python to register properly.
does anyone know how to fix that on win7-64 ?

HKEY_LOCAL_MACHINE\SOFTWARE\Python\Pythoncore\2.7\InstallPath = C:\Python27
HKEY_LOCAL_MACHINE\SOFTWARE\Python\Pythoncore\2.7\PythonPath = C:\Python27;C:\Python27\Lib;C:\Python27\DLLs

and

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\Pythoncore\2.7\InstallPath = C:\Python27
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\Pythoncore\2.7\PythonPath = C:\Python27;C:\Python27\Lib;C:\Python27\DLLs

dont work.
Smoketoomuch, get version 2.6.6 AND get the 32 bit binaries.

If you install the 64 bit, the extensions are all based on 32 bit, and it won't find your installation. Reinstall with 32 bit and you're golden.
oh ok, thanks, now it works.
all I need is a stream sdk for 64 bit now -.- cmon AMD! fix it!
wtf ?
when I click that link I get forwarded to http://developer.amd.com/Pages/amd404.aspx

edit: works with IE O.o but not with firefox, hmm.
maybe I changed my http referrer settings or something.

__________________________________________________

while trying to install pyopencl 0.92 with "python setup.py install" I get the following error:
Code:
Traceback (most recent call last):
  File "setup.py", line 160, in <module>
    main()
  File "setup.py", line 50, in main
    warn_about_no_config=False)
  File "c:\Users\STM\Desktop\OpenCL Bitcoin\pyopencl-0.92\aksetup_helper.py", line 164, in get_config
    return schema.read_config()
  File "c:\Users\STM\Desktop\OpenCL Bitcoin\pyopencl-0.92\aksetup_helper.py", line 366, in read_config
    cfile, key))
KeyError: 'invalid config key in .\\siteconf.py: SHIPPED_CL_HEADERS'

using Python 2.6.6, setuptools 0.6c11, NumPy 1.5.0, SciPy 0.8.0, Boost 1.44

any recommendation ?
Code:
BOOST_INC_DIR = [r'C:\Program Files (x86)oostoost_1_44']
BOOST_LIB_DIR = [r'C:\Program Files (x86)oostoost_1_44\lib']
BOOST_COMPILER = 'msvc'
BOOST_PYTHON_LIBNAME = ['boost_python-vc90-mt-1_44']
BOOST_THREAD_LIBNAME = ['boost_thread-vc90-mt-1_44']
CL_TRACE = False
CL_ENABLE_GL = False
SHIPPED_CL_HEADERS = False
CL_INC_DIR = [r'C:\Program Files (x86)\ATI Stream\include']
CL_LIB_DIR = [r'C:\Program Files (x86)\ATI Stream\lib\x86']
CL_LIBNAME = ['OpenCL']
CXXFLAGS = ['/EHsc', '/DBOOST_PYTHON_NO_PY_SIGNATURES']
LDFLAGS = ['/FORCE']
Thats my current siteconfig.py, but I will try yours now.

Edit: thx man, your my hero now ^^
Code:
BOOST_INC_DIR = [r'C:\Program Files (x86)oostoost_1_44']
BOOST_LIB_DIR = [r'C:\Program Files (x86)oostoost_1_44\lib']
BOOST_COMPILER = 'msvc'
BOOST_PYTHON_LIBNAME = ['boost_python-vc90-mt-1_44']
USE_SHIPPED_BOOST = False
CL_TRACE = False
CL_ENABLE_GL = False
CL_INC_DIR = [r'C:\Program Files (x86)\ATI Stream\include']
CL_LIB_DIR = [r'C:\Program Files (x86)\ATI Stream\lib\x86']
CL_LIBNAME = ['OpenCL']
CXXFLAGS = ['/EHsc', '/DBOOST_PYTHON_NO_PY_SIGNATURES']
LDFLAGS = ['/FORCE']
hey, it's me .. again ...

python poclbm.py -->

Code:
Traceback (most recent call last):
  File "poclbm.py", line 5, in <module>
    import pyopencl as cl
  File "C:\Python26\lib\site-packages\pyopencl-0.92-py2.6-win32.egg\pyopencl\__init__.py", line 3, in <module>
    import pyopencl._cl as _cl
ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.
Seems like a DLL is missing.
I copied them into system32, this usually sloves these problems, but I'm gonna try it.

PS: the German error message only says, that the module was not found.

EDIT: and again, you were right Cheesy

but now a new error message shows up:
Code:
C:\Program Files (x86)\Bitcoin>python poclbm.py
Unable to communicate with bitcoin RPC
I'm using this client:
Win32 bitcoin with getwork, against SVN 161. Download

EDIT2: ok forget it, forgot about the -server switch
EDIT3: yay it works, finally.
BUT, now it asks for username and passwords every ~8 seconds.... ?

EDIT4: I changed the default values for user and pw in pocbm.py and now it works Smiley
ASUS Radeon HD4870 512MB gpu@750MHz vram@900(1800)MHz
~75500khashs/s
gpu temp currently @74\u00b0C (bios-modded long ago to adjust fan speed)
yes 4870, edited my post.
and yes, more people should use it Smiley
now I can generate bitcoins on my gpu and rainbow tables on my cpu at the same time Tongue
More people need to jump on board of the OpenCL miner.

Anyone fancy building a 64bit windows build of bitcoin suitable for the OpenCL miner? It may be worth some bitcoins Wink
Yes, I am.

Uhm, does anyone know if poclbm works with mutliple graphic cards ?
Here's one for you.

It just found another block, and... bitcoin doesn't show anything...

The miner asks for work at an interval of 10 seconds. If there is a new block from the network in the last such interval your client won't even try to announce your own next block. I am not sure, but I think this is the behavior of the original client too. Please take a look at your debug.log and if possible send me an excerpt from around where this happened. Look for terms like "SetBestChain" and "height=" if you know the block number.

Sometimes the client just doesn't show the new transaction right away.
Right after these lines is there something like:

ProcessBlock: ACCEPTED
sending: inv (37 bytes)

If so (and you are sure this is the block in question) it was announced to the network, but another block got included in the chain instead. Do you have other blocks after that?

BTW, if you want poclbm to crunch slower, start it with something like -f 400. Experiment with the number.
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.

gflops is not really relevant to bitcoin mining since gflops is measure of floating point and bitcoin mining is fixed point. It think fixed point is relatively good to ati and hard for nvidia.

If you have an app that uses floating point more than fixed point the the disparity might vanish or at least diminish.

It think fixed point is relatively good to ati and hard for nvidia.
That sounds interesting. Do you have any web-sources for this ?

@m0mchil:
Is your Python OpenCL client using priorization ? like, can I start a game while using your client and it will automatically slow down the hash rate and my card will focus on the game ?
It only tries to keep single kernel run under specific time by changing the number of 'global' threads. If you start a game, kernel execution will get slower. The number of threads will then be gradually adjusted to achieve the desired execution time.

By default this time is 1/60 of a second. If shorter i.e. 1/120 sec it will leave more time for other GPU tasks.

This is adjusted with the '-f' switch.
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.

try :

  svn co -r 161 https://bitcoin.svn.sourceforge.net/svnroot/bitcoin

It seems any other revision fails the patch.

ok, I'm really new at this GPGPU stuff, I got this message when I try to run the thing:


Traceback (most recent call last):
  File "poclbm.py", line 28, in <module>
    miner = cl.Program(context, kernelFile.read()).build()
  File "/usr/lib/pymodules/python2.6/pyopencl/__init__.py", line 138, in program_build
    "Build on %s: %s" % (dev, log) for dev, log in build_logs))
pyopencl.RuntimeError: clBuildProgram failed: build program failure

Build on <pyopencl.Device 'GeForce 8400 GS' at 0xf16c40>:

Error: Code selection failed to select: 0x138fdc0: i32 = bswap 0x138fbc0

-------------------
This is on Linux 64 bit, does the "i32 = bswap" mean it wants linux 32?

btw I know the 8400 GS is slow, you don't have to tell me.

Error: Code selection failed to select: 0x138fdc0: i32 = bswap 0x138fbc0


Try to update your GPU driver. See http://forums.nvidia.com/index.php?showtopic=150585

It seems OpenCL is still problematic on Nvidia GPUs. Unfortunately I don't have one to try to make a PyCuda miner.
I think I have the newest stuff. Ill just have to wait for the next version by the looks of it. Maybe give up on it and find an ATI card.
Quote
SPARKLE SX84GS256D2LDPP GeForce 8400 GS 256MB 64-bit DDR2 PCI Express 2.0 x16 HDCP Ready Low Profile Ready Video Card
Well .. 256mb .. DDR2 with 64 bit interface
this even was crap when it came on the market ^^

ok, I'm really new at this GPGPU stuff, I got this message when I try to run the thing:


Traceback (most recent call last):
  File "poclbm.py", line 28, in <module>
    miner = cl.Program(context, kernelFile.read()).build()
  File "/usr/lib/pymodules/python2.6/pyopencl/__init__.py", line 138, in program_build
    "Build on %s: %s" % (dev, log) for dev, log in build_logs))
pyopencl.RuntimeError: clBuildProgram failed: build program failure

Build on <pyopencl.Device 'GeForce 8400 GS' at 0xf16c40>:

Error: Code selection failed to select: 0x138fdc0: i32 = bswap 0x138fbc0

-------------------
This is on Linux 64 bit, does the "i32 = bswap" mean it wants linux 32?

btw I know the 8400 GS is slow, you don't have to tell me.

Got the same error on a Win7-64 with 8600 GTS.
Code:
Build on <pyopencl.Device 'GeForce 8600 GTS' at 0x2ed2f48>:

Error: Code selection failed to select: 0x5d57918: i32 = bswap 0x5d57808
Seems like poclbm doesn't work on nvidia cards.
hey, it's me .. again ...

python poclbm.py -->

Code:
Traceback (most recent call last):
  File "poclbm.py", line 5, in <module>
    import pyopencl as cl
  File "C:\Python26\lib\site-packages\pyopencl-0.92-py2.6-win32.egg\pyopencl\__init__.py", line 3, in <module>
    import pyopencl._cl as _cl
ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.
Seems like a DLL is missing.

Copy your boost_python-vc90-mt-1_44.dll and boost_thread-vc90-mt-1_44.dll that you compiled with boost earlier directly into your directory where you are running poclbm.py from.

I don't speak German, but that looks like what it is saying to me.


I also get this error.  I tried copying boost_python-vc90-mt-1_44.dll and boost_thread-vc90-mt-1_44.dll directly into the directory where I am running poclbm.py but it has the same error (see below).  I copied it into Windows\System32 but still same error.  Any ideas???

Code:
C:itcoin_miner>python poclbm.py
Traceback (most recent call last):
  File "poclbm.py", line 5, in <module>
    import pyopencl as cl
  File "C:\Python26\lib\site-packages\pyopencl-0.92-py2.6-win32.egg\pyopencl\__i
nit__.py", line 3, in <module>
    import pyopencl._cl as _cl
ImportError: DLL load failed: The specified module could not be found.
looks like a dll is missing

which boost version are you using ?

best is to post your siteconf.py
Post your boost version, siteconf, and os. Should be able to help you more from there. Make sure you grabbed the right dll's because several of them are named close.

I am using Windows Vista 64-bit.  I used boost 1.44, but there was an error so I actually downloaded the binary versions of "boost_python-vc90-mt-1_44.dll" and "boost_thread-vc90-mt-1_44.dll". I used all 32-bit installations for compatibility.  Below is siteconf.py.  I was able to run "python setup.py install" ok without errors.

Code:
BOOST_INC_DIR = ['C:\oost_1_44_0']
BOOST_LIB_DIR = ['C:\oost_1_44_0\\lib']
BOOST_COMPILER = 'msvc'
BOOST_PYTHON_LIBNAME = ['boost_python-vc90-mt-1_44']
USE_SHIPPED_BOOST = False
CL_TRACE = False
CL_ENABLE_GL = False
CL_INC_DIR = ['C:\\Program Files (x86)\\NVIDIA GPU Computing Toolkit\\CUDA\3.2\\include']
CL_LIB_DIR = ['C:\\Program Files (x86)\\NVIDIA GPU Computing Toolkit\\CUDA\3.2\\lib\\Win32']
CL_LIBNAME = ['OpenCL']
CXXFLAGS = ['/EHsc', '/DBOOST_PYTHON_NO_PY_SIGNATURES']
LDFLAGS = ['/FORCE']

Thanks for your help!  Smiley

Awesome, so you got it working with a CUDA card?

Specs and hash rate?


Oh, not yet...sorry if it sounded like I declared victory too early.  I still get:

Code:
ImportError: DLL load failed: The specified module could not be found.

Any ideas?
I went home for lunch to debug but now I am at work. I am hardcore to get this to work.  Will work in it tonite.
I did not do the bootstrap methon.  I used the win installer with the precompiled binaries from here http://www.boostpro.com/download/ (that was what the boost site said to do). 

I reinstalled Python26, Numpy, SciPi, and boost 1_39.  I copied all the dlls into the same folder as poclmb.py. 

Still same error.

Hmmm...
I completely misunderstood you sorry.

So you did not compile the dll's yourself for boost? So you might have a problem with your boost path.

What happens when you run the bootstrap in the boost directory?

Then here is what I used to build the boost libraries after bootstrapping:

Code:
bjam.exe toolset=msvc --with-python --with-date_time --with-thread threading=multi link=shared

That then created a directory starting from c:/boost called C:oost\stage\lib that had the dll's in it, and is how I pointed it inside my site.conf

Then I copied those dll's over. I am wondering if the dll's you downloaded aren't the right ones or don't have all the right flags or something.


I believe I have the right flags.  In the installer I picked msvc 2008, python, date time, and thread.  There is no option for threading or link.
bitcoin-getwork-svn166-win32.7z - with key pool support (see SVN)

poclbm_py2exe.7z - this is the miner, packed with py2exe. Must be able to run without installing python, PyOpenCL, boost etc. Needs only ATI Stream SDK. Windows only. See command line options with -h to change your

The miner itself has been improved slightly, doing first 3 sha256 rounds in python. http://github.com/m0mchil/poclbm/


OMG!  Thx david and momchil!  I was about to give up...gonna try it when I get home.
I have an nVidia card...I hope I can install the nVidia sdk instead of the ati sdk. (Fingers crossed)
bitcoin-getwork-svn166-win32.7z - with key pool support (see SVN)

poclbm_py2exe.7z - this is the miner, packed with py2exe. Must be able to run without installing python, PyOpenCL, boost etc. Needs only ATI Stream SDK. Windows only. See command line options with -h to change your

The miner itself has been improved slightly, doing first 3 sha256 rounds in python. http://github.com/m0mchil/poclbm/


OMG!  Thx david and momchil!  I was about to give up...gonna try it when I get home.


I get this error:

Code:

C:\Users\Bitcoin GPU\Desktop\poclbm_py2exe>poclbm
Traceback (most recent call last):
  File "poclbm.py", line 40, in <module>
pyopencl.LogicError: clGetPlatformIDs failed: invalid/unknown error code

[\code]
I went home for lunch and I am physically at my computer...back to work for me.  I have not tried puddinpop's client.
Jimbo, please try this and see if the tool shows OpenCL is supported. It would be helpful if you post a screenshot.
I get a 2-3% increase on the new version. Not much, but a consistent increase. I have my hashes scaled back to about 150/m so this increases it to about 153/m.

It jumps around a little bit of course, but I don't really see it dip below 153/m


Edit-
Don't get me wrong either. 3000k/hs is an extra block a month so no complaints!

Wow! What hardware are you running?

On a more related note, I get this error when running m0m's release (8800 GTS, Driver 258.96)

Code:
C:\Users\Owner\Desktop\BitcoinOpenCL>poclbm
Traceback (most recent call last):
  File "poclbm.py", line 46, in <module>
  File "pyopencl\__init__.pyc", line 138, in program_build
pyopencl.RuntimeError: clBuildProgram failed: build program failure

Build on <pyopencl.Device 'GeForce 8800 GTS 512' at 0x2dd1600>:

Error: Code selection failed to select: 05102178: i32 = bswap 04EFFBA8
i get similar results with my nvidia card
Code:
C:\Documents and Settings\Administrator\Desktopitcoin_stuff\poclbm_py2exe>poclbm
Traceback (most recent call last):
File "poclbm.py", line 46, in <module>
File "pyopencl\__init__.pyc", line 138, in program_build
pyopencl.RuntimeError: clBuildProgram failed: build program failure

Build on <pyopencl.Device 'GeForce GTX 260' at 0x24325c0>:

Error: Code selection failed to select: 0x4ea2128: i32 = bswap 0x516dca0

here's a screenshot of Caps Viewer and GPU-Z (for driver-info).
ok , i have no opencl support (see image)  Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad Sad
Mine's an ATI 5870.

...
run that and see if it shows OpenCL is supported. Give us a screen shot. There are some trouble shooting steps on their website.


Wow, nice!

Here's my screenie:
Jim, I don't know where to help from here. Two other people have OpenCL support on their Nvidia card, and still can't get it to work. Without having a set in front of me, it's hard to troubleshoot it. I do have an Nvidia card, same one as you just about, but I don't know if I'm going to swap it out to test. I'm sure our set up varies greatly and I don't know if I would be able to make any beneficial advancements doing it, sorry.

It's ok.  I'm sure something awesome will come out, but I'm happy to test this for momchil.  thought my 8800 would have OpenCL support but it doesn't.  Thanks anyway.
On a more related note, I get this error when running m0m's release (8800 GTS, Driver 258.96)

Code:
C:\Users\Owner\Desktop\BitcoinOpenCL>poclbm
Traceback (most recent call last):
  File "poclbm.py", line 46, in <module>
  File "pyopencl\__init__.pyc", line 138, in program_build
pyopencl.RuntimeError: clBuildProgram failed: build program failure

Build on <pyopencl.Device 'GeForce 8800 GTS 512' at 0x2dd1600>:

Error: Code selection failed to select: 05102178: i32 = bswap 04EFFBA8

I get something very similar on a 9400GT, but in linux! No idea how to fix this.
has ANYONE got this working on a nvidia card ?
I have two machines that behave totally differently under this python client.

They both have the same hardware and OS:
AMD Semperon Single core
1GB RAM
ASUS ATI Radeon HD 5850 overclocked to 950mhz

One machine does 300-305mhash/s and stresses the gpu to 94-97%
The other does 282-289mhash/s and stresses the gpu to 89-91%

How do I increase my slow machine to get the extra 20mhash? Is there a command line way to tighten the processing loop?



Are both machines using the same driver version ?
They are the same.
8.14.10.0779 Catalyst 10.9 on Windows 7 64-bit

I would not expect them to be different because one is a clone of the other.
bethel, what are 5870s showing at stock frequency (850 MHz)? Perhaps one of the cards throttles down?

Latest version has new parameter, -w, to set work group size. I have best results on 5770 with -w 128 -f 35.
The IDs stay the same as long as there are no changes in hardware (new cards for example).

The -w parameter sets the number of 'work group size' (local threads). Unfortunately it's very difficult to determine the optimal value for this because it's different on different hardware platforms. The default is to use maximum reported by OpenCL for the specific hardware. This also was the behavior of previous versions. Last days I tried an optimization which tests two hashes in kernel run and it is 1-2% slower with default local threads (5770 - 256), but 5-6% faster with half of them (128) and global threads little bit more (-f 35). Generally, with default parameters one should achieve about the same or slightly worse performance than before.
Hello All,

I tried without success to use the Python OpenCL Miner, here's what I did and what I got :

First my config, I run on Windows 7 Pro 32 bits with a NVIDIA GeForce 9800 GT.

I downloaded and installed CUDA Toolkit from :
http://developer.nvidia.com/object/cuda_3_2_toolkit_rc.html#Windows%20XP,%20Windows%20Vista%20and%20Windows7
-> cudatoolkit_3.2.7_win_32.msi

I downloaded Boost 1.44.0 and built it with :
Code:
bjam.exe toolset=msvc --with-python --with-date_time --with-thread threading=multi link=shared
as did davidonpda on the post #81.
Then I copied all the dll from H:oost_1_44_0\stage\lib to system32.

I downloaded and built pyopencl-0.92 :
1) running > python configure.py
2) modifying siteconf.py :
(example from http://www.mail-archive.com/pyopencl@tiker.net/msg00349.html)
Code:
BOOST_INC_DIR = [r'H:oost_1_44_0']
BOOST_LIB_DIR = [r'H:oost_1_44_0\stage\lib']
BOOST_COMPILER = 'msvc'
BOOST_PYTHON_LIBNAME = ['boost_python-vc90-mt-1_44']
USE_SHIPPED_BOOST = False
CL_TRACE = False
CL_ENABLE_GL = False
CL_INC_DIR = [r'E:\NVIDIA GPU Computing Toolkit\CUDA3.2\include']
CL_LIB_DIR = [r'E:\NVIDIA GPU Computing Toolkit\CUDA3.2\lib\Win32']
CL_LIBNAME = ['OpenCL']
CXXFLAGS = ['/EHsc', '/DBOOST_PYTHON_NO_PY_SIGNATURES']
LDFLAGS = ['/FORCE']
3) running > ctags -R src || true
4) running > python setup.py build
 -> compilation without error
5) running > python setup.py install
 -> installation without error

I downloaded poclbm from http://github.com/m0mchil/poclbm
-> m0mchil-poclbm-cf33815.zip

And trying to run it : > python poclbm.py
Code:
Traceback (most recent call last):
  File "poclbm.py", line 5, in <module>
    import pyopencl as cl
  File "E:\Python26\lib\site-packages\pyopencl-0.92-py2.6-win32.egg\pyopencl\__init__.py", line 3, in <module>
    import pyopencl._cl as _cl
ImportError: DLL load failed: La proc\u00dadure sp\u00dacifi\u00dae est introuvable.
(the text in french with the fucked accents means : The specified procedure could not be found).

Note : I don't make all running together the first time, it took a long time and I can forget some step.

I also tried poclbm_py2exe.7z that I got from the board (post #87), first with the original OpenCL.dll in the archive, I got an error due to my Nvidia card I gess :
Code:
No device specified, you may use -d to specify one of the following

Traceback (most recent call last):
  File "poclbm.py", line 57, in <module>
  File "pyopencl\__init__.pyc", line 138, in program_build
pyopencl.RuntimeError: clBuildProgram failed: build program failure

Build on <pyopencl.Device 'GeForce 9800 GT' at 0x28d2be8>:

:37: error: incompatible type assigning 'int', expected 'uint2'
        work[5]=0x00000000;
               ^~~~~~~~~~~
:38: error: incompatible type assigning 'int', expected 'uint2'
        work[6]=0x00000000;
               ^~~~~~~~~~~
...

then I tried by replacing the dll with the one from the CUDA Toolkit, and I got the same error than while running poclbm I built :
Code:
 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: La proc\u00dadure sp\u00dacifi\u00dae est introuvable.

So the problem come from OpenCL dll from Nvidia !

I checked _cl.pyd with dependency walker, if I'm correct (this is the first time I use this tool), some functions are missing in the OpenCL.dll from Nvidia :
Code:
clSetUserEventStatus (pyopencl-0.92\src\wrapper\wrap_cl.hpp(1051,31))
clCreateUserEvent (pyopencl-0.92\src\wrapper\wrap_cl.hpp(1062,20))
                  (pyopencl-0.92\src\wrapper\wrap_cl.hpp(1063,32))
clCreateSubBuffer (pyopencl-0.92\src\wrapper\wrap_cl.hpp(1165,22))
                  (pyopencl-0.92\src\wrapper\wrap_cl.hpp(1168,36))
clEnqueueReadBufferRect (pyopencl-0.92\src\wrapper\wrap_cl.hpp(1416,27))
clEnqueueWriteBufferRect (pyopencl-0.92\src\wrapper\wrap_cl.hpp(1460,27))
clEnqueueCopyBufferRect (pyopencl-0.92\src\wrapper\wrap_cl.hpp(1496,27))

In the file OpenCL.dll in poclbm_py2exe.7z, those 6 functions exist !

I got the explication with a little more search on the net, with the confirmation on those two pages :
http://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/
http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/

The 6 functions where added in OpenCL 1.1, and Nvidia OpenCL implements the version 1.0 !

So if I'm correct pyopencl won't work on Nvidia cards until Nvidia release an OpenCL 1.1 compliant Toolkit and driver.
See the post below.

Note from http://developer.nvidia.com/object/opencl.html
Quote
On the same day Khronos Group announced the new OpenCL v1.1 specification update (June 14th, 2010), NVIDIA released OpenCL v1.1 pre-release drivers and SDK code samples to all GPU Computing registered developers.
So you have to register as a "GPU Computing developer" to get the SDK and driver, I don't do it for now (you have to fill a big form which is verified before validation, and I'm not "GPU Computing developer"  Grin ).

PS : I think you might have guessed, I'm French. sorry for mistakes and strange turns of phrase that can be  Embarrassed
After writing the post above, I checked the file pyopencl-0.92\src\wrapper\wrap_cl.hpp to see the use of the 6 functions that are not in OpenCL 1.0, and I saw an interesting point :

The use of the 6 functions is "protected" by blocks #ifdef CL_VERSION_1_1 / #endif.
So I will check why CL_VERSION_1_1 was defined when I compiled the wrapper and will try to compil it without this macro defined.

More informations to come ... later (it is now 2h33 AM in France, time to go to bed Grin ) Smiley
jef.blanc, try to replace the rotate() function with some native rotate left. rotate() is compiled to bit_align AMD specific instruction on AMD. Also there are problems with casts... I switched to uint2 vectors and all operations with mixed types (vector, scalar) work fine on AMD, but Nvidia compilator has problems.
Definitely hoping to see this on nvidia in the near future! I have 2 graphics cards now and can only use one with the CUDA client!
After verification, the macro CL_VERSION_1_1 is defined in CL/cl.h from the Cuda Toolkit I installed, and this file declare the OpenCL 1.1 functions (it's logic in fact, I should have a compilation error otherwise) !

So the Toolkit I installed take in charge OpenCL 1.1, and my current Nvidia driver (that I didn't update) is still on OpenCL 1.0.

I checked on the "public" drivers on the net, the version is still 258.96 (the one I use), so I downloaded and installed the "Developer Drivers for WinVista and Win7 (260.61)" from http://developer.nvidia.com/object/cuda_3_2_toolkit_rc.html#Windows%20XP,%20Windows%20Vista%20and%20Windows7 (the page on which I download the CUDA Toolkit).

My OpenCL.dll file now provides the OpenCL 1.1 functions.
I tried to run poclbm.py, as m0mchil said there is a problem with the rotate function, but pyopencl seems to work*, that's a good point Smiley

* There are still some errors while running the tests provided with pyopencl, but I don't know if this is crucial.

Errors on rotate :
Code:
<program source>:204:2: error: no matching function for call to 'rotate'
        sharound(D,E,F,G,H,A,B,C,R(61),0xA4506CEB);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<program source>:4:103: note: instantiated from:
#define sharound(a,b,c,d,e,f,g,h,x,K) {h=(h+(rot(e, 26)^rot(e, 21)^rot(e, 7))+(g^(e&(f^g)))+K+x); t1=(rot(a, 30)^rot(a,
19)^rot(a, 10))+((a&b)|(c&(a|b))); d+=h; h+=t1;}
                                                                                                      ^
<program source>:2:19: note: instantiated from:
#define rot(x, y) rotate(x, (uint)y)
                  ^~~~~~
<built-in>:3025:26: note: candidate function
ulong16 __OVERLOADABLE__ rotate(ulong16, ulong16);
                         ^
<built-in>:3024:25: note: candidate function
ulong8 __OVERLOADABLE__ rotate(ulong8, ulong8);
                        ^
<built-in>:3023:25: note: candidate function
ulong4 __OVERLOADABLE__ rotate(ulong4, ulong4);
                        ^
<built-in>:3019:25: note: candidate function
ulong2 __OVERLOADABLE__ rotate(ulong2, ulong2);
                        ^
<built-in>:3018:25: note: candidate function
long16 __OVERLOADABLE__ rotate(long16, long16);
                        ^
<built-in>:3017:24: note: candidate function
long8 __OVERLOADABLE__ rotate(long8, long8);
                       ^
<built-in>:3016:24: note: candidate function
long4 __OVERLOADABLE__ rotate(long4, long4);
                       ^
<built-in>:3012:24: note: candidate function
long2 __OVERLOADABLE__ rotate(long2, long2);
                       ^
<built-in>:3011:25: note: candidate function
uint16 __OVERLOADABLE__ rotate(uint16, uint16);
                        ^
<built-in>:3010:24: note: candidate function
uint8 __OVERLOADABLE__ rotate(uint8, uint8);
                       ^
<built-in>:3009:24: note: candidate function
uint4 __OVERLOADABLE__ rotate(uint4, uint4);
                       ^
<built-in>:3005:24: note: candidate function
uint2 __OVERLOADABLE__ rotate(uint2, uint2);
                       ^
<built-in>:3004:24: note: candidate function
int16 __OVERLOADABLE__ rotate(int16, int16);
                       ^
<built-in>:3003:23: note: candidate function
int8 __OVERLOADABLE__ rotate(int8, int8);
                      ^
<built-in>:3002:23: note: candidate function
int4 __OVERLOADABLE__ rotate(int4, int4);
                      ^
<built-in>:2998:23: note: candidate function
int2 __OVERLOADABLE__ rotate(int2, int2);
                      ^
<built-in>:2997:27: note: candidate function
ushort16 __OVERLOADABLE__ rotate(ushort16, ushort16);
                          ^
<built-in>:2996:26: note: candidate function
ushort8 __OVERLOADABLE__ rotate(ushort8, ushort8);
                         ^
<built-in>:2995:26: note: candidate function
ushort4 __OVERLOADABLE__ rotate(ushort4, ushort4);
                         ^
<built-in>:2991:26: note: candidate function
ushort2 __OVERLOADABLE__ rotate(ushort2, ushort2);
                         ^
<built-in>:2990:26: note: candidate function
short16 __OVERLOADABLE__ rotate(short16, short16);
                         ^
<built-in>:2989:25: note: candidate function
short8 __OVERLOADABLE__ rotate(short8, short8);
                        ^
<built-in>:2988:25: note: candidate function
short4 __OVERLOADABLE__ rotate(short4, short4);
                        ^
<built-in>:2984:25: note: candidate function
short2 __OVERLOADABLE__ rotate(short2, short2);
                        ^
<built-in>:2983:26: note: candidate function
uchar16 __OVERLOADABLE__ rotate(uchar16, uchar16);
                         ^
<built-in>:2982:25: note: candidate function
uchar8 __OVERLOADABLE__ rotate(uchar8, uchar8);
                        ^
<built-in>:2981:25: note: candidate function
uchar4 __OVERLOADABLE__ rotate(uchar4, uchar4);
                        ^
<built-in>:2977:25: note: candidate function
uchar2 __OVERLOADABLE__ rotate(uchar2, uchar2);
                        ^
<built-in>:2976:25: note: candidate function
char16 __OVERLOADABLE__ rotate(char16, char16);
                        ^
<built-in>:2975:24: note: candidate function
char8 __OVERLOADABLE__ rotate(char8, char8);
                       ^
<built-in>:2974:24: note: candidate function
char4 __OVERLOADABLE__ rotate(char4, char4);
                       ^
<built-in>:2970:24: note: candidate function
char2 __OVERLOADABLE__ rotate(char2, char2);
                       ^
<built-in>:2967:24: note: candidate function
ulong __OVERLOADABLE__ rotate(ulong, ulong);
                       ^
<built-in>:2966:23: note: candidate function
long __OVERLOADABLE__ rotate(long, long);
                      ^
<built-in>:2965:23: note: candidate function
uint __OVERLOADABLE__ rotate(uint, uint);
                      ^
<built-in>:2964:22: note: candidate function
int __OVERLOADABLE__ rotate(int, int);
                     ^
<built-in>:2963:25: note: candidate function
ushort __OVERLOADABLE__ rotate(ushort, ushort);
                        ^
<built-in>:2962:24: note: candidate function
short __OVERLOADABLE__ rotate(short, short);
                       ^
<built-in>:2961:24: note: candidate function
uchar __OVERLOADABLE__ rotate(uchar, uchar);
                       ^
<built-in>:2960:23: note: candidate function
char __OVERLOADABLE__ rotate(char, char);
                      ^

Edit : I just see the rot function in poclbm.py (the one m0mchil was talking in fact I gess), I will try to see how to change the two rot functions, and perhaps bytereverse in btc_miner. cl ?

Edit2 : pfiuuu, it's hard !
first time I work on python and therefore on pyopencl, and using the nvidia toolkit. I don't even know from where the rotate functions come (the candidates functions), where are they defined (nividia toolkit, boost, standard c++, ... and from which include) ?

Edit3 : ...
I made some tries, and I don't succed for now:
Code:
Traceback (most recent call last):
  File "poclbm.py", line 57, in <module>
    miner = cl.Program(context, kernelFile.read()).build()
  File "E:\Python26\lib\site-packages\pyopencl-0.92-py2.6-win32.egg\pyopencl\__init__.py", line 138, in program_build
    "Build on %s: %s" % (dev, log) for dev, log in build_logs))
pyopencl.RuntimeError: clBuildProgram failed: build program failure

Build on <pyopencl.Device 'GeForce 9800 GT' at 0x2312eb8>:

Error: Code selection failed to select: 0x527c7f8: i32 = bswap 0x527cbb0
... I have no idea of what that means  Grin

(for this test I just change #define rot(x, y) rotate(x, (uint)y) to #define rot(x, y) rotate(x, (uint2)y) in btc_miner.cl, trying to make it running first before checking the operations made).

Edit 4 :
a "funny" thing, the problem I have come from the end of the function search in btc_miner.cl

If I remove those lines
Code:
    if((H.x==0) && (bytereverse(G.x)<=target))
    {
        output[0] = 1;
        output[1] = nonce.x;
    }

    if((H.y==0) && (bytereverse(G.y)<=target))
    {
        output[0] = 1;
        output[1] = nonce.y;
    }
the script is built without error and start.

If I leave the tests without output[n] = ... it builds, and if I leave output[n] = ... without the tests, it builds also.
but if I put the test and output[n] = ... I have the following error :
Code:
Traceback (most recent call last):
  File "poclbm.py", line 57, in <module>
    miner = cl.Program(context, kernelFile.read()).build()
  File "E:\Python26\lib\site-packages\pyopencl-0.92-py2.6-win32.egg\pyopencl\__init__.py", line 138, in program_build
    "Build on %s: %s" % (dev, log) for dev, log in build_logs))
pyopencl.RuntimeError: clBuildProgram failed: build program failure

Build on <pyopencl.Device 'GeForce 9800 GT' at 0x2952eb8>:

Error: Code selection failed to select: 0x4f5a8d0: i32 = bswap 0x4f94670
Jef, at least it's now clear the problem is in the bytereverse(x) macro. Please try to replace it with:

uint bytereverse(const uint x)
{
   uint result;
   uchar* b = (uchar *)&x;
   uchar* l = (uchar *)&result;
   l[0] = b[3];
   l[1] = b[2];
   l[2] = b[1];
   l[3] = b[0];
   return result;
}
Hello again, thanks for the code  Smiley

but it still doesn't work  Sad
Nvidia doesn't like reversing numbers it seems  Angry
however, if I comments anyone of the four affectations, it builds  Grin

After trying by decomposing the reversing in many ways, I abandoned this path to bypass the problem.

I made a first version running with byte reversing and comparaisons made in the python script, and a second version with a function that make the comparison directly between a word and a reversed word in the OpenCl code. For now this version works only on big endian memory mapping (I hope it's what is used in the GPUs).

Note: I added somme print to the screen to show some informations when running the script.
I also let some comments in the code.

The two versions build and run without error, but I'm not sure that operations are correct.
As expected the second version is more effective (about 14800 khashs/sec with the 1st version, and 15200 khashs/sec with the 2nd version).

Version 1 : reversing and comparison in the python script
Code:
--- F:/Desktop/m0mchil-poclbm-cf33815/poclbm.py    Fri Oct 15 08:48:48 2010
+++ F:/Desktop/m0mchil-poclbm-cf33815/poclbm_nv1.py    Mon Oct 18 23:36:46 2010
@@ -21,6 +21,9 @@
     t2=(rot(a, 30)^rot(a, 19)^rot(a, 10))+((a&b)|(c&(a|b)))
     return (uint32(d + t1), uint32(t1+t2))
 
+def bytereverse(x):
+    return (((x & 0x000000ffL) << 24) | ((x & 0x0000ff00L) << 8) | ((x & 0x00ff0000L) >> 8) | ((x & 0xff000000L) >> 24))
+
 def sysWrite(format, args=()):
     sys.stdout.write('                                         ' + format % args)
     sys.stdout.flush()
@@ -50,16 +53,40 @@
     context = cl.Context([devices[options.device]], None, None)
 else:
     print 'No device specified, you may use -d to specify one of the following '
+    # create_some_context should ask for the platform and device to use
     context = cl.create_some_context()
+
+device = context.devices[0]
+print "==============================================================="
+print "Platform name:", platform.name
+print "Platform profile:", platform.profile
+print "Platform vendor:", platform.vendor
+print "Platform version:", platform.version
+print "---------------------------------------------------------------"
+print "Device name:", device.name
+print "Device type:", cl.device_type.to_string(device.type)
+print "Device memory: ", device.global_mem_size//1024//1024, 'MB'
+print "Device max clock speed:", device.max_clock_frequency, 'MHz'
+print "Device compute units:", device.max_compute_units
+print "==============================================================="
+
 queue = cl.CommandQueue(context)
 
-kernelFile = open('btc_miner.cl', 'r')
+kernelFile = open('btc_miner_nv1.cl', 'r')
 miner = cl.Program(context, kernelFile.read()).build()
 kernelFile.close()
 
+print "==============================================================="
+print "build OK"
+print "==============================================================="
+
 if (options.worksize == -1):
     options.worksize = miner.search.get_work_group_info(cl.kernel_work_group_info.WORK_GROUP_SIZE, context.devices[0])
 
+print "==============================================================="
+print "worksize = ", options.worksize
+print "==============================================================="
+
 frames = options.frames
 frame = float(1)/frames
 window = frame/30
@@ -75,7 +102,7 @@
 work['extraNonce'] = 0
 work['block'] = ''
 
-output = np.zeros(2, np.uint32)
+output = np.zeros(6, np.uint32)
 
 while True:
     try:
@@ -117,10 +144,12 @@
     output_buf = cl.Buffer(context, mf.WRITE_ONLY | mf.USE_HOST_PTR, hostbuf=output)
 
     rate = start = time()
+    success = 0
+    nonce = 0
     while True:
-        if (output[0]):
-            work['block'] = work['block'][:152] + pack('I', long(output[1])).encode('hex') + work['block'][160:]
-            sysWriteLn('found: %s, %s', (output[1], datetime.now().strftime("%d/%m/%Y %H:%M")))
+        if (success):
+            work['block'] = work['block'][:152] + pack('I', long(nonce)).encode('hex') + work['block'][160:]
+            sysWriteLn('found: %s, %s', (nonce, datetime.now().strftime("%d/%m/%Y %H:%M")))
             break
 
         if (time() - start > options.askrate or base + globalThreads == 0x7FFFFFFF):
@@ -131,8 +160,20 @@
             base = 0x7FFFFFFF - globalThreads
 
         kernelStart = time()
-        miner.search(queue, (globalThreads, ), (options.worksize, ), block2[0], block2[1], block2[2], state[0], state[1], state[2], state[3], state[4], state[5], state[6], state[7], state2[1], state2[2], state2[3], state2[5], state2[6], state2[7], target[6], pack('I', base), output_buf)
+        miner.search(queue, (globalThreads, ), (options.worksize, ), block2[0], block2[1], block2[2], state[0], state[1], state[2], state[3], state[4], state[5], state[6], state[7], state2[1], state2[2], state2[3], state2[5], state2[6], state2[7], pack('I', base), output_buf)
         cl.enqueue_read_buffer(queue, output_buf, output).wait()
+        #target = target[6]
+        #H.x = output[0] ; H.y = output[1]
+        #G.x = output[2] ; G.y = output[3]
+        #nonce.x = output[4] ; nonce.y = output[5]
+        if (output[0] == 0 and bytereverse(output[2])<=target[6]):
+            success = 1
+            nonce = output[4]
+       
+        if (output[1] == 0 and bytereverse(output[3])<=target[6]):
+            success = 1
+            nonce = output[5]
+       
         kernelTime = time() - kernelStart
 
         if (kernelTime < lower):
@@ -142,4 +183,4 @@
 
         if (time() - rate > options.rate):
             rate = time()
-            sysWrite('%s khash/s', int((base / (time() - start)) / 500))
\ No newline at end of file
+            sysWrite('%s : %s khash/s', (datetime.now().strftime("%d/%m/%Y %H:%M:%S"),int((base / (time() - start)) / 500)))
\ No newline at end of file
Code:
--- F:/Desktop/m0mchil-poclbm-cf33815/btc_miner.cl    Fri Oct 15 08:48:48 2010
+++ F:/Desktop/m0mchil-poclbm-cf33815/btc_miner_nv1.cl    Mon Oct 18 22:01:08 2010
@@ -1,5 +1,4 @@
-#define bytereverse(x) ( ((x) << 24) | (((x) << 8) & 0x00ff0000) | (((x) >> 8) & 0x0000ff00) | ((x) >> 24) )
-#define rot(x, y) rotate(x, (uint)y)
+#define rot(x, y) rotate(x, (uint2)y)
 #define R(x) (work[x] = (rot(work[x-2],15)^rot(work[x-2],13)^((work[x-2])>>10)) + work[x-7] + (rot(work[x-15],25)^rot(work[x-15],14)^((work[x-15])>>3)) + work[x-16])
 #define sharound(a,b,c,d,e,f,g,h,x,K) {h=(h+(rot(e, 26)^rot(e, 21)^rot(e, 7))+(g^(e&(f^g)))+K+x); t1=(rot(a, 30)^rot(a, 19)^rot(a, 10))+((a&b)|(c&(a|b))); d+=h; h+=t1;}
 
@@ -8,7 +7,6 @@
                         const uint state4, const uint state5, const uint state6, const uint state7,
                         const uint B1, const uint C1, const uint D1,
                         const uint F1, const uint G1, const uint H1,
-                        const uint target,
                         const uint base,
                         __global uint * output)
 {
@@ -209,17 +207,12 @@
     G+=0x1f83d9ab;
     H+=0x5be0cd19;
 
-    if((H.x==0) && (bytereverse(G.x)<=target))
-    {
-        output[0] = 1;
-        output[1] = nonce.x;
-    }
-
-    if((H.y==0) && (bytereverse(G.y)<=target))
-    {
-        output[0] = 1;
-        output[1] = nonce.y;
-    }
+    output[0] = H.x;
+    output[1] = H.y;
+    output[2] = G.x;
+    output[3] = G.y;
+    output[4] = nonce.x;
+    output[5] = nonce.y;
 }
 
 // end
\ No newline at end of file

Version 2 : function that make the comparison between inversed and non inversed word
Code:
--- F:/Desktop/m0mchil-poclbm-cf33815/poclbm.py    Fri Oct 15 08:48:48 2010
+++ F:/Desktop/m0mchil-poclbm-cf33815/poclbm_nv2.py    Mon Oct 18 23:53:18 2010
@@ -50,16 +50,40 @@
     context = cl.Context([devices[options.device]], None, None)
 else:
     print 'No device specified, you may use -d to specify one of the following '
+    # create_some_context should ask for the platform and device to use
     context = cl.create_some_context()
+
+device = context.devices[0]
+print "==============================================================="
+print "Platform name:", platform.name
+print "Platform profile:", platform.profile
+print "Platform vendor:", platform.vendor
+print "Platform version:", platform.version
+print "---------------------------------------------------------------"
+print "Device name:", device.name
+print "Device type:", cl.device_type.to_string(device.type)
+print "Device memory: ", device.global_mem_size//1024//1024, 'MB'
+print "Device max clock speed:", device.max_clock_frequency, 'MHz'
+print "Device compute units:", device.max_compute_units
+print "==============================================================="
+
 queue = cl.CommandQueue(context)
 
-kernelFile = open('btc_miner.cl', 'r')
+kernelFile = open('btc_miner_nv2.cl', 'r')
 miner = cl.Program(context, kernelFile.read()).build()
 kernelFile.close()
 
+print "==============================================================="
+print "build OK"
+print "==============================================================="
+
 if (options.worksize == -1):
     options.worksize = miner.search.get_work_group_info(cl.kernel_work_group_info.WORK_GROUP_SIZE, context.devices[0])
 
+print "==============================================================="
+print "worksize = ", options.worksize
+print "==============================================================="
+
 frames = options.frames
 frame = float(1)/frames
 window = frame/30
@@ -142,4 +166,4 @@
 
         if (time() - rate > options.rate):
             rate = time()
-            sysWrite('%s khash/s', int((base / (time() - start)) / 500))
\ No newline at end of file
+            sysWrite('%s : %s khash/s', (datetime.now().strftime("%d/%m/%Y %H:%M:%S"),int((base / (time() - start)) / 500)))
\ No newline at end of file
Code:
--- F:/Desktop/m0mchil-poclbm-cf33815/btc_miner.cl    Fri Oct 15 08:48:48 2010
+++ F:/Desktop/m0mchil-poclbm-cf33815/btc_miner_nv2.cl    Mon Oct 18 23:33:50 2010
@@ -1,8 +1,88 @@
-#define bytereverse(x) ( ((x) << 24) | (((x) << 8) & 0x00ff0000) | (((x) >> 8) & 0x0000ff00) | ((x) >> 24) )
-#define rot(x, y) rotate(x, (uint)y)
+#define rot(x, y) rotate(x, (uint2)y)
 #define R(x) (work[x] = (rot(work[x-2],15)^rot(work[x-2],13)^((work[x-2])>>10)) + work[x-7] + (rot(work[x-15],25)^rot(work[x-15],14)^((work[x-15])>>3)) + work[x-16])
 #define sharound(a,b,c,d,e,f,g,h,x,K) {h=(h+(rot(e, 26)^rot(e, 21)^rot(e, 7))+(g^(e&(f^g)))+K+x); t1=(rot(a, 30)^rot(a, 19)^rot(a, 10))+((a&b)|(c&(a|b))); d+=h; h+=t1;}
 
+// test 1 : recursive function, build error :
+// Error: Code selection failed to select: 0x504c1d8: i8 = NVPTXISD::MoveParam 0x504c150
+/*
+bool recurseReversedCompare(uchar *reversed, uchar *normal, uchar ir, uchar in)
+{
+    if(reversed[ir] > normal[in])
+    {
+        return false;
+    }
+    else if(reversed[ir] < normal[in])
+    {
+        return true;
+    }
+    else if(in > 0)
+    {
+        return recurseReversedCompare(reversed, normal, ir+1, in-1);
+    }
+    else
+    {
+        return true;
+    }
+}
+
+bool reversedSmallerThan(uint reversed, uint normal)
+{
+    uchar *r = (uchar *)&reversed;
+    uchar *n = (uchar *)&normal;
+
+    return recurseReversedCompare(r, n, 0, 3);
+}
+*/
+
+// test 2 : non recursive
+bool reversedSmallerThan(uint reversed, uint normal)
+{
+    uchar *r = (uchar *)&reversed;
+    uchar *n = (uchar *)&normal;
+
+    if(r[0] > n[3])
+    {
+        return false;
+    }
+    else if(r[0] < n[3])
+    {
+        return true;
+    }
+    else
+    {
+        if(r[1] > n[2])
+        {
+            return false;
+        }
+        else if(r[1] < n[2])
+        {
+            return true;
+        }
+        else
+        {
+            if(r[2] > n[1])
+            {
+                return false;
+            }
+            else if(r[2] < n[1])
+            {
+                return true;
+            }
+            else
+            {
+                if(r[3] > n[0])
+                {
+                    return false;
+                }
+                else
+                {
+                    return true;
+                }
+            }
+        }
+    }
+}
+
 __kernel void search(    const uint block0, const uint block1, const uint block2,
                         const uint state0, const uint state1, const uint state2, const uint state3,
                         const uint state4, const uint state5, const uint state6, const uint state7,
@@ -209,13 +289,13 @@
     G+=0x1f83d9ab;
     H+=0x5be0cd19;
 
-    if((H.x==0) && (bytereverse(G.x)<=target))
+    if((H.x==0) && reversedSmallerThan(G.x, target)) // (bytereverse(G.x)<=target)
     {
         output[0] = 1;
         output[1] = nonce.x;
     }
 
-    if((H.y==0) && (bytereverse(G.y)<=target))
+    if((H.y==0) && reversedSmallerThan(G.y, target)) // (bytereverse(G.y)<=target)
     {
         output[0] = 1;
         output[1] = nonce.y;

There are probably some optimisations to make Smiley
Thanks Jef! There is new version that should work on Nvidia now. I also changed default getwork request rate to 5 seconds to reduce the risk of solving stale block. The patch itself has now one more check to not show 'proof of work found' in this case.

Can someone with Nvidia please test this, it should resolve the 'code selection failed to select' issue.
you\u2019re welcome  Smiley
Thank you for your better code design than mine Grin

The new code you provided runs on my computer.
you\u0092re welcome  Smiley

The new code you provided runs on my computer.


OpenCL-wise it seems to work fine on my 9400 GT, now I just have trouble compiling bitcoind Smiley
you\u0092re welcome  Smiley

The new code you provided runs on my computer.


OpenCL-wise it seems to work fine on my 9400 GT, now I just have trouble compiling bitcoind Smiley

Ah, it worked it was just using another port.

I knew the 9400 GT would be slow relative to other cards, but maybe not this slow: I get 1800kh/s, which is slower than my cpu =)


I was hoping to maybe double performance, but oh well.
Only 1800kh/s ? It seems very low in comparison to my 9800 GT which give me about 15200 kh/s

Perhaps for some strange reason your GPU is not fully used, if your graphical card gives you this information you can check the GPU load with GPU-Z, in the "Sensors" tab (http://www.techpowerup.com/gpuz/).
9400GT 16SPs @ 1.4GHz
9800GT 112SPs @ 1.5GHz
-> a 9800GT is about 7.5x 9400GT ...
ah ... yes, I didn't check that before talking  Embarrassed
1800 * 7.5 = 13500 ... no so far than my 15200 ... logical then in fact.
Hi there!

Trying to use this, but here is the error I see:
Code:
D:\pycuda>poclbm.exe
No device specified, you may use -d to specify one of the following

Traceback (most recent call last):
  File "poclbm.py", line 58, in <module>
  File "pyopencl\__init__.pyc", line 138, in program_build
pyopencl.RuntimeError: clBuildProgram failed: build program failure

Build on <pyopencl.Device 'GeForce GTX 470' at 0x2d112d8>:

:52: error: incompatible type assigning 'int', expected 'uint2'
        work[5]=0x00000000;
               ^~~~~~~~~~~
:53: error: incompatible type assigning 'int', expected 'uint2'
        work[6]=0x00000000;
               ^~~~~~~~~~~
:54: error: incompatible type assigning 'int', expected 'uint2'
        work[7]=0x00000000;
               ^~~~~~~~~~~
:55: error: incompatible type assigning 'int', expected 'uint2'
        work[8]=0x00000000;
               ^~~~~~~~~~~
:56: error: incompatible type assigning 'int', expected 'uint2'
        work[9]=0x00000000;
               ^~~~~~~~~~~
:57: error: incompatible type assigning 'int', expected 'uint2'
        work[10]=0x00000000;
                ^~~~~~~~~~~
:58: error: incompatible type assigning 'int', expected 'uint2'
        work[11]=0x00000000;
                ^~~~~~~~~~~
:59: error: incompatible type assigning 'int', expected 'uint2'
        work[12]=0x00000000;
                ^~~~~~~~~~~
:60: error: incompatible type assigning 'int', expected 'uint2'
        work[13]=0x00000000;
                ^~~~~~~~~~~
:61: error: incompatible type assigning 'int', expected 'uint2'
        work[14]=0x00000000;
                ^~~~~~~~~~~
:62: error: incompatible type assigning 'int', expected 'uint2'
        work[15]=0x00000280;
                ^~~~~~~~~~~
:141: error: incompatible type assigning 'int', expected 'uint2'
        work[9]=0x00000000;
               ^~~~~~~~~~~
:142: error: incompatible type assigning 'int', expected 'uint2'
        work[10]=0x00000000;
                ^~~~~~~~~~~
:143: error: incompatible type assigning 'int', expected 'uint2'
        work[11]=0x00000000;
                ^~~~~~~~~~~
:144: error: incompatible type assigning 'int', expected 'uint2'
        work[12]=0x00000000;
                ^~~~~~~~~~~
:145: error: incompatible type assigning 'int', expected 'uint2'
        work[13]=0x00000000;
                ^~~~~~~~~~~
:146: error: incompatible type assigning 'int', expected 'uint2'
        work[14]=0x00000000;
                ^~~~~~~~~~~
:147: error: incompatible type assigning 'int', expected 'uint2'
        work[15]=0x00000100;
                ^~~~~~~~~~~
:149: error: incompatible type assigning 'int', expected 'uint2'
        A=0x6a09e667;
         ^~~~~~~~~~~
:151: error: incompatible type assigning 'int', expected 'uint2'
        C=0x3c6ef372;
         ^~~~~~~~~~~
:153: error: incompatible type assigning 'int', expected 'uint2'
        E=0x510e527f;
         ^~~~~~~~~~~
:155: error: incompatible type assigning 'int', expected 'uint2'
        G=0x1f83d9ab;
         ^~~~~~~~~~~
:156: error: incompatible type assigning 'int', expected 'uint2'
        H=0x5be0cd19;

Wish I were smart enough to understand what that means!

Any ideas?
Hello, it is the errors I had when running poclbm from poclbm_py2exe.7z with the original OpenCL.dll inside.

The 7z archive contains the dll from the ATI driver, so using an nvidia card I had to replace this dll by the one provided by my nvidia driver which is in C:\Windows\System32\

Is it your case, executing poclbm from the package poclbm_py2exe.7z ?

The things I had to do for using poclbm :
- building pyopencl for my system, I installed the latest CUDA Toolkit from here http://developer.nvidia.com/object/cuda_3_2_toolkit_rc.html#Windows%20XP,%20Windows%20Vista%20and%20Windows7 to build pyopencl.
- using the latest driver (Developer Drivers) from here http://developer.nvidia.com/object/cuda_3_2_toolkit_rc.html#Windows%20XP,%20Windows%20Vista%20and%20Windows7 , I had the following errors without that :
Code:
ImportError: DLL load failed: La proc\u00dadure sp\u00dacifi\u00dae est introuvable.
- using the latest version of poclbm from http://github.com/m0mchil/poclbm , a correction has been made to make poclbm running on nvidia GPU without errors
Can someone give direct links to NVIDIA OpenCL 1.1 drivers?
Can someone give direct links to NVIDIA OpenCL 1.1 drivers?
I didn't success to found a link to this driver (and I found two cd iso on bittorent, but I don't try to get them) ...

But Nvidia has apparently merge his OpenCL implementation in his CUDA Toolkit and drivers. The latest "Developer Drivers" from the "CUDA Toolkit 3.2 RC" page contains an OpenCL 1.1 compliant* driver (it is the one I use).

*at least concerning the openCL 1.1 functions needed by pyopencl

http://developer.nvidia.com/object/cuda_3_2_toolkit_rc.html
Scroll down in the page to found the drivers for windows, linux (some distributions), and MacOS)

Note : GPU Caps Viewer shows me OpenCL 1.0, but it works anyway.
bitcoin-getwork-svn170-win32.7z

poclbm_win32_exe.7z Wrong kernel was packed in the py2exe version, now fixed. Removed AMD OpenCL.dll to prevent conflicts.

I also reverted back to scalars. With vectors it was faster, but required hardware specific tweaks and was making it slower for others. Unfortunately OpenCL is not mature enough to provide means of automatic performance optimization.
seems to work now on my GTX260

hashcount results are similar to puddinpops cuda-code,
both get around 45Mhash/s.



Code:
C:\Documents and Settings\Administrator\Desktopitcoin_stuff\OpenCL\poclbm_win3
2_exe>poclbm --user=*** --pass=***
No device specified, you may use -d to specify one of the following

44120 khash/s
I'm not sure if and whats going wrong, i started bitcoin in server mode. start poclbm with user and pass, then it shows khash/s for about 5 seconds then pops back to asking username and pass. i can keep doing that over and over.
tnx, working fine now, forgot the username.


On my other pc i get this error "ImportError: DLL load failed: The specified module could not be found."

I already updated to latest graphics drivers and nvidia cuda toolkit..

Geforce 9800 GX2 @ win7 32 bit

i also noticed that the old puddingpop cuda client only puts out 2000khash/s on that gpu... i should get at least ten times as much...

any ideas?
hum, you can check with dependency walker (http://www.dependencywalker.com/) that your OpenCL.dll file (in C:\Windows\System32\) provides the OpenCL 1.1 functions needed by pyopencl :

clCreateSubBuffer
clCreateUserEvent
clEnqueueCopyBufferRect
clEnqueueReadBufferRect
clEnqueueWriteBufferRect
clSetUserEventStatus

If not, then either the driver installation has failed, or it is not the good driver.
Otherwise ... I don't know  Huh

Edit : you can check with GPU Caps Viewer if this GPU really manage OpenCL, because 2000 kh/s is what is currently made by the CPU alone.
The Geforce 9800 GX2 is if I'm rigth two 8800 GTX functionning in pair, not sure that they manage OpenCL.
Hi,

First, thanks for this wonderful miner.
I managed to make it work on linux (lib64 only) with a 8600 GT
(A bit disappointed about my card performance though: 5300kh/s)

:52: error: incompatible type assigning 'int', expected 'uint2'
        work[5]=0x00000000;
               ^~~~~~~~~~~
Any ideas?

Got this error too, just put some "u"s at the end of all these uint constants. Example:
Code:
       work[5]=0x00000000u;
Just pulled a fresh version and got this:

$ python2.6 poclbm.py -u l29ah --pass=hackme
No device specified, you may use -d to specify one of the following

Traceback (most recent call last):
  File "poclbm.py", line 133, in <module>
    target[6], pack('I', base), output_buf)
  File "/usr/lib64/python2.6/site-packages/pyopencl/__init__.py", line 158, in kernel_call
    self.set_arg(i, arg)
TypeError: expected a readable buffer object
  File "/usr/lib64/python2.6/site-packages/pyopencl/__init__.py", line 158, in kernel_call
    self.set_arg(i, arg)
TypeError: expected a readable buffer object

Upgrade to pyopencl-0.92.
  File "/usr/lib64/python2.6/site-packages/pyopencl/__init__.py", line 158, in kernel_call
    self.set_arg(i, arg)
TypeError: expected a readable buffer object

Upgrade to pyopencl-0.92.

Thank you! Getting 31MH/s from GeForce 9800 GTX if run with -f 10.
It finally work on my side !
Without optimisation, I got around 265000 khash/sec. I got an i7 920 oc to 3.6ghz with a radeon 5970. I'm gonna look to do some tweak to speed up this thing a bit Wink If you have any comment or something you want me to try don't hesitate. By the way, I've been running this thing tonight, and in 8 hours, my wallet is still at 0. Is it normal ? Do I need to restart it? Or it's just like the way it should work, which mean it's still pretty long to generate? Thanks for your OpenCL gui Moo, I really appreciate it !

Malouin

P-S I think I only got 265000 khash/sec on my 5970 because i'm only using 1 heart. When I'm at the point I need to choose the device, I see 3 option, 0 = my cpu, and 1 and 2 is the same thing. is it possible ?
265 mhps? Shocked
Yes, just took you a screenshot

http://img835.imageshack.us/img835/2157/bitcoin.jpg

I'm pretty sure I can get the 500 by using my 2 heart, or maybe i'm totally wrong XD


Malouin
The 4 that you see was just after I finished installing it. It was still downloading block. About the public or the test, I supose i'm on the public network. I simply did the bitcoin -server, and started the poclbm. While I was reading, I heard about a shared pool. Is it really that good ? If you have any info you can help me don't hesitate, I'm open to anything =) Btw i'm on irc ( Malouin ) presently if you wanna talk !

Malouin
I see

Thanks for the info and for the help david, I really appreciate it. If you want me to do some test or help you on something, don't hesitate.

Malouin
The miner should display 'bitcoin is downloading blocks...' until all blocks are downloaded. Please test. This was added in the SVN 163 patched client.

David, I removed usage of vectors. So the '-w 128' is not relevant anymore. Of course you can grab the vectors version from git and use it like before. It is really difficult to optimize for all possible devices. Current version is kind of best for all.
From now on I'll post latest versions only in the initial post of this thread.
Tried the -f 35 and -w 128. I get around 270m khash/s. And yes, I can load 2 separate poclbm, using device 1 and device 2, both are doing around 268m khash/s. Total of 536m khash/s.

And yes, it display the bitcoin is downloading blocks... Thanks !

Malouin
Update : I Oc'ed my 5970 GPU clock from 725 MHZ to 800 MHZ and my memory clock from 1000 to 1305MHZ.

I'm now at 295m on each heart, total of 590m. Everything seem to be fine, I will let you know about futur update and how much I can get with the 5970.

Malouin
590 mhps!!! Shocked Shocked Shocked
hehehe thanks guys =P

I was speaking with Art on irc today, and my next step will be to OC my 5970 from 800 to 910mhz. I should reach the 320mhash/s on each heart, which mean a big total of 640mhash/s.

I restarted my client at 15h30 EAST time, and will stop it tomorrow at the same time. It gonna give me some data to work on. After that, i'm going to OC it at 910mhz and see the result and report here with some screenshots.

Malouin
bethel, what are 5870s showing at stock frequency (850 MHz)? Perhaps one of the cards throttles down?

Latest version has new parameter, -w, to set work group size. I have best results on 5770 with -w 128 -f 35.

Latest py2exe version is http://github.com/downloads/m0mchil/poclbm/poclbm.7z

Sorry for the late reply, I have been away for a while.

I found my problem and it was so simple it is silly. I had not yet enabled the -frames switch to crunch faster. I still don't know why one card was faster without the switch but they are about equal now.

As for the mhash @ 850mhz I get about 265mhps.
Tried the -f 35 and -w 128. I get around 270m khash/s. And yes, I can load 2 separate poclbm, using device 1 and device 2, both are doing around 268m khash/s. Total of 536m khash/s.

And yes, it display the bitcoin is downloading blocks... Thanks !

Malouin

xxmalouinxx, what OS, SDK, and driver version are you on?

I can't seem to get my two cards to both run at the same time under Windows 7. Any hints?
Windows 7 Ultimate / ATI SDK 2.2 for Win7 64 / Catalyst 10.7

I got a radeon 5970, so I don't have 2 cards, but 2 hearts on it. Art got 4 cards on 1 motherboard doing this, I'm gonna ask him when I see him.

Malouin
Update :

Here's a screenshot of my last setting

http://img143.imageshack.us/img143/2157/bitcoin.jpg

640mhash/s - radeon 5970 870mhz/1305mhz - temp : 83c

Presently it run fine, but i'm not sure it gonna be stable, gonna update here if I have any news.

Malouin
I want it! Grin
incredible hashes/sec are incredible
do you think a Radeon 5970 would work fine with linux ?
core i7 quad, nvidia GT240, 64bit ubuntu 10.04

CPU: 7000 khps
GPU: 20000 khps

Should I be getting more?  I have python 2.6.5 installed.
Davout : Yea it should work without any problem on linux. ArtForz actually use that.

Fergalish : the Nvidia GT240 got 385 Gflops, the radeon 5970 got 4640. If we base it on the fact that the 5970 got 230 000khash/s per core without being OC, it should be around 20 000 khash/s yes.

Malouin
Is poclbm.py supposed to use 100% CPU, and increase CPU usage of Xorg quite a bit as well?

Code:
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND           
 4885 sturle    20   0  420m  56m  26m S  264  0.7  53:15.06 bitcoin           
 5522 sturle    20   0  231m  63m  24m S   97  0.8   9:44.01 poclbm.py         
14130 root      20   0  491m 174m 122m S   27  2.2  12:25.19 Xorg               

I get about 11500 khash/s maximum from poclbm.py, which is the same I get from bitcoin when running on all 4 CPU cores.  While poclbm.py is running, hash production from bitcoin is reduced to about 8k.  Is this normal?  Production from poclbm.py decreases if I reduce it's CPU share, e.g. by niceing it.

GPU is some ATI HD 5400 series.
I think it's a really good thing that such a client gets public, it decreases the chance that the blockchain gets overtaken by NSA XD
core i7 quad, nvidia GT240, 64bit ubuntu 10.04

CPU: 7000 khps
GPU: 20000 khps

Should I be getting more?  I have python 2.6.5 installed.

compared to my GTX260 which gets ~37.000 stock (575core/1240shader) and up to 45.000 oc'd (685/1480),
you should be ok with 20.000.

gonna run it on a radeon 5850 as soon as it arrives, should be by tomorrow.
hopefully i'll get some more outof that.
640mhash/s - radeon 5970 870mhz/1305mhz - temp : 83c

Presently it run fine, but i'm not sure it gonna be stable, gonna update here if I have any news.

Malouin

What are your -frames and -worksize arguments like? Also what -askrate interval do you have?

I did get two cards working (had to use the crossfirex cable and enable crossfirex).

The thing that baffles me is how to get the same performance out of two cards together as I got out of two cards seperately. It seems if i set the frames very low like -frames=2 I can get one card to do about 97% gpu capacity. The other card, however drops to 60-80%. When I make the frames high like 256 it does ok but any other program on my machine seems to have a higher priority and will make poclbm.exe run slow.

Currently the best compromise I found was
--frames=25 --rate=3 --worksize=256 --device=1 --askrate=30

On a single core processor machine this produces about 90% on each card average but has wild swings.

For a while I thought the issue was my MB or CPU not feeding the data fast enough but I tried the cards in my gaming machine with a quad core and dual x16PCIe slots and it still was about the same.

Any ideas?
A quick question, I have had the miner running, if found a "found: 339339279, 26/10/2010 06:27"  however, the coins for that block haven't been added to my bit coin wallet...  Have I missed something, or is my wallet corrupt or something?

I have had non open-cl coins generated, maybe my node isn't announcing the newly found block, It dose say 8 connections..
bethel : -f 35 and -w 128 . I don't have any rate or askrate variable.

da2ce7 : If you started to generate before having all the block downloaded, then the block you found isn't valid. Restart your client and start to generate once you got all the block. This happened to me too, david explained it to me pretty well =)

Malouin
do you need to have they client generating at the same time as the open-cl miner?
Nop, my bitcoin client don't generate from CPU.
HD5850 just arrived and gets a whopping ~235.000khash/s stock, very nice indeed.
that's 5 times a GTX260 oc'd at nearly the same power consumption (~200W),
it's actually a few watts less on the HD5850, still room to oc it a 'lil.  Grin


some updates:
ran fine througout the day so i did some more testings,
right now i'm up to 267.000 with default poclbm-settings*,
the core clocked at 825MHz (stock 725MHz) doesn't even get close to hot,
stock <63\u00b0C vs. current <66\u00b0C, it's fan is still idle,
with a bit of luck it might even break 300Mhash, but i'm more than pleased for now.

this card is well worth its money.

* ~270.000 with frames=10, desktop gets kinda unusable then though, but if i dont need it anway there's some extra Mhs to gain


woot! Grin
and just as i write this i generated my first OpenCL block!

it no longer just seems to work, it really doesShocked
Is poclbm.py supposed to use 100% CPU, and increase CPU usage of Xorg quite a bit as well?

I get about 11500 khash/s maximum from poclbm.py, which is the same I get from bitcoin when running on all 4 CPU cores.  While poclbm.py is running, hash production from bitcoin is reduced to about 8k.  Is this normal?  Production from poclbm.py decreases if I reduce it's CPU share, e.g. by niceing it.

GPU is some ATI HD 5400 series.
OpenCL can run on CPUs, too. It seems like that's what is happening. Maybe. Does poclbm ask you to choose your device when you start it?

My CPU usage is <5% for poclbm, so something's wrong.
Is poclbm.py supposed to use 100% CPU, and increase CPU usage of Xorg quite a bit as well?

I get about 11500 khash/s maximum from poclbm.py, which is the same I get from bitcoin when running on all 4 CPU cores.  While poclbm.py is running, hash production from bitcoin is reduced to about 8k.  Is this normal?  Production from poclbm.py decreases if I reduce it's CPU share, e.g. by niceing it.

GPU is some ATI HD 5400 series.
OpenCL can run on CPUs, too. It seems like that's what is happening. Maybe. Does poclbm ask you to choose your device when you start it?

My CPU usage is <5% for poclbm, so something's wrong.
poclbm.py is instructed to use the video card, not the CPU.  If I choose both (0,1), it uses 400% CPU for only 4 khash/s.

cProfile on poclbm.py overnight, and here is the function hogging my CPU:
Code:
  2549577 85597.463    0.034 85597.463    0.034 __init__.py:284(event_wait)

This is defined in pyopencl:
Code:
    def event_wait(self):
        wait_for_events([self])
        return self
Some kind of active wait loop in wait_for_events?

Btw -- polcbm.py claims to have found two blocks since it started, but only one is registered in my bitcoin client. :-/
$ nice -n 15 ./poclbm.py  --user=******** --pass=******** -f 60 -w 256
No device specified, you may use -d to specify one of the following

found: 46380061, 26/10/2010 14:46
found: 46380061, 26/10/2010 14:46
17616 khash/s                          

Found this just now.  Why did it find the same block twice?  Could it be there are, oh, like two threads repeating the same work?

EDIT: also, the main bitcoin client credited me with 50btc, one block, at 14:45.  Total to my credit is just one block 50btc.  What's going on?  I looked through the source, and the RPC commands list.  Where does the source poclbm.py tell the bitcoin client that it found a hash below the target?  (I'm a python newbie).
can't help you with that one, the 2 blocks i found so far just showed up once,

but i'v got another update on the HD5850.
the core is up to 910MHz now (from 725@stock), which gives me ~297.000 khashes at default poclbm settings.
system needs ~230W now, plus ~15% power to get plus ~25% hashes, still a good deal.

seems like that's it for basic catalystcc oc'ing, maybe a bit more using higher voltages/other tools, but i'm fine with it.  Cool


to satisfy your screeny-fetish

mornin' miners, up for another update?
here we go...


short version:

HD5850 300.000 khash/s @ 925MHz


long version:

i did some more testings and tweaks and finally reached my goal,
to break the 300M-barrier while keeping below 70\u00b0C (setting higher voltages would not only consume more energy, as a result it'll also create noise which i really don't like).

while Catalysts (and others) tests fail at clocksets above 910MHz, the pocl-miner doesnt care much about it, it runs fine up to 935MHz, more and the miner starts to get laggy and just starting the GPU Caps Viewer crashes the system (not if it's already running).

to stay safe i set it to 925MHz, which still gives hangups and failures in tests, Fallout:New Vegas doesn't even start, stuff like that,
but the miner runs fine, stable and averages at above 300Mhash/s.
i think i'll keep it like that and just set it to defaults to kill Mr.House and save (or rule?) the world, that old guy kinda scares me.


however, the ordinary screenshot this time is also a nice comparison of both of my OpenCL-capable Cards, funny that both of 'em found a block within 1hour.

to the left (via vnc) we see a GTX260@685MHz at work, mining 45.000 khash/s on win7x64,
to the right her greatness HD5850@925MHz, mining 300.000 khash/s on xp64.


not to mention that theres still 5x2-3GHz CPUs left on those 2 machines that don't do anything right now, but hey, i'd get what, ~1000 khash/s per core? on the HD-miner that's <1%! and it'll also create more heat and noise and will need more energy too,
i'd rather tweak the card/s a little more. Cheesy
but i think i'm done now and more than happy, hell i'm thrilled by those results, never thought the card would go that far.

what do you think?
how's your machine/s working?
tell us about it, we wanna know, well at least i do.

have a great day.
Well, I recently stopped mining on my  CPUs. Really no reason for that anymore it seems =)
nah, i wouldn't say that,
the bitcoin-randomizer-node only runs at ~800khash/s on a single core and still generates blocks every now and then,
i even got miners running on an intel-Atom and PIII-1GHz that just get ~250khash/s.

you just need some more luck, any single hash could be the one we'r all looking for.

if your running a GPU-miner anyway though, there's at least on midclass-ati-cards no real need to run CPUs, they'll consume more power than needed to get what you want. give your gfx-core another 1-2% speed and your done, this'll take ~5W+ instead of >50W+ for CPUs@full throttle.

if your thinking about, or going to build a new miner-machine, i agree,
don't bother with CPUs, nor with nvidia.  Wink

careful though if you buy new stuff, dont get one of those shiny new HD6850/70, or you'll be dissapointed.

Hey Bitlex !

I'm happy to see that everything's going well on your side =) I'm presently at 650-660mhash/s with my radeon 5970

Setting : 900mhz/1000 memory clock/ vcore to 1.15v / Temps : 78c, with 100% fan on. I use this command :

 --user=***** --pass=***** -f 35 -w 128

You should try to add the -f 35 -w 128 and see how many % you gain. I gained around 20-30mhash with that.

Malouin
yeah, that's why i didn't use it
... I removed usage of vectors. So the '-w 128' is not relevant anymore. Of course you can grab the vectors version from git and use it like before. It is really difficult to optimize for all possible devices. Current version is kind of best for all.

and i havent been compiling any miners myself (tried a few times but had no luck so far installing all required components on x64), so grabbing code x from y to patch z wouldn't help me much.
i'm just a user anyway, not a coder (php-scripter for fun, but that's it),
one could say i represent the masses (at least those that are interested in how it works), that's why i'm so happy that there's a few nice people to realease binaries.

playing around with frames just gives me a ~1-2% increase, not really worth mentioning and for the cost of a very low responding desktop.


@m0mchil: you should really put your btc-address either into the initial post of this thread, or your sig, kinda hard to find already and will get even worse over time.  Wink
Can anyone post a walkthrough on how to install this (and any dependencies) on Ubuntu? Or post a Linux binary? I have a Tesla I'm dying to try out.
i noticed some strange disconnections lately,
everything seems alright, but it somehow hangs and doesnt get new blocks,
happens while
connected un-forwarded (showing 8connections),
-connect=<forwarded-nodes-ip> (showing 1connection),
-addnode=<forwaded-nopdes-ip> (showing 8connections),
forwarded-node has 50<80connections and seems to always have all blocks, other nodes sometimes just don't get them, no matter how i connect them.
not sure yet what's causing this, a feature to force getblock or somethin' would be handy sometimes.

but this made me try to set up both OpenCL miners to run on one node.
starting the (former GTX-only) node with -rcpallowip, connection and mining works fine,
eatin' a few Mhashes though.
while running the (remote) HD-miner at defaults (askrate=5), the (local) GTX-miner slows down from ~45M to ~43M average, setting (remote) askrate=10 helped here, still a noticable but <1M loss,
the HD-miner also goes down ~2%, from 300 to 294.

tested on 100MBit, maybe there's <2% loss on gigabit networks, i'll try as soon as i find someone to pay for some switches and cards.  Cheesy

happy crunching
and if anyone knows of, or finds a solution to that spooky non-forwarded-node-disconnects, let me know, thanks.

while running standalone, non-forwarded, it's 8connections
while addnode'd, it's 8connections,
while connect'ed to forwarded node, it's only one.

what also might help is just running on different (but forwarded) ports,
as mentioned before silly me isn't able to compile/patch, so i'm not able to try yet. 
i usually start 'em all using addnode, these getblock-lags just happened quite often lately, so i tried using the connect-switch,
here's a screeny* of 2 nodes seem to be connected to forwarded-node,  both show only 1 connection, the higher blockcount is, the lower isn't, it sometimes even tells me, drops to 0connections for a sec, then back to 1, but still doesnt get any new blocks.

same happens when both are addnode'd and showing 8connections, connections drop below 8 and no more blocks are downloaded, mining doesnt stop though, lots of wasted energy, at least it's green.

* from front to back
- GPU mining to (addnode'd) remote node (not on screen)
- HD-miner-node -connect=<ip> (idle)
- a random node -connect=<ip> (idle, running in VM)

about half an hour after the shot was taken, the random node still hasnt loaded any blocks,
it's not that it's always the VM that lags blocks though, sometimes it's the other way around.

here's another unusual behaviour, a lost block.

the GTX-miner found 2blocks, both show the proof-of-work found...generated 50.00 in the debug.log,
but it seems only one of them made it into my wallet.

yeah, i also noticed that some blocks need some time to show up,
i already restarted bitcoin, hoping it might materialize somehow,  Grin
but it didn't.

first time i noticed this, hopefully the last too.
...about deleting the block chain, and having the client re download it to see if it adds that block....
i just tried not a completely new, but <80.000blocks chain and re-downloading,
the block is still missing.
The block won't show up. This happens when the network discovered block just after last request for work by the miner. This is the drawback of the pull manner in which getwork... works. The probability for this to happen is 1/60 with ask rate of 10 seconds and 1/120 with ask rate of 5 seconds. It will be better if work is provided in 'push' manner, but I didn't want to complicate the client with separate server thread.
ok, thanks,
so it's nothing to worry about, no big deal anyway, GTX already found a new one,
she's lucky lately. Cheesy
I was generating some blocks today on a 5970 and I noticed that both instances of the the miner claimed to have found the same block (see attached image) The main bitcoin client only counts them once (as it should.)  Does anyone know what is happening?  I am running with default settings and -f 30.
Well, this is not good. I will take a look to figure it out.
Sorry guys, I screwed it with the update to SVN 170. There is a bug in getwork patch that makes poclbm useless with more than a single instance. Until this is fixed anyone using more than one instance should use previous version of the patch (against SVN 166). Win32 binary bitcoin-getwork-svn166-win32.7z
Hey, anyone interested in discussing mining, especially with this miner, please join us in #bitcoin-mining on freenode IRC.

I think it'd be a good idea for everyone to be on the same page, and currently most of the mining discussion is happening in #bitcoin-dev, which may not be appropriate.
Just fixed problem with getwork (different miners were showing same results). Updated to SVN 173. See for windows build in first post.
Thank you for your hard work, m0mchil!

I seem to have this working properly on my GeForce 8800 GTS. I was pretty proud of my 32000 khash/s until I saw what some of you guys are getting. Wink
Wow, zipslack, that's almost as much as I get on my GTS 250!
Sorry, I'm behind the curve.  I am running the pocl binary (Win 7 64) and it says "Unable to communicate with bitcoin RPC"  I have tried installing json-rpc in my Python26 directory using: setup.py install   and it seems to complete without error.  I already have checked my ATI 4600 drivers and ATI Stream so that Open CL is available. 

Also, what user name and password are we supposed to use?   

Again, I apologize if these questions are dumb.  Until today my only experience with bitcoin is the GUI client hashing on my CPU (4600 k/s = not enough). 
I was on Bitcoin client 3.08 beta and now have also installed and tried 3.14 beta.  My bitcoin.conf file is located in directory "c:\Users\<my Windows user name>\AppData\Roaming\Bitcoin"

It contains 2 lines with syntax : rcpuser=<my unique user name>
 rcppassword=<my unique password>

I am running poclbm from a windows command line with syntax:
poclbm.exe --user=<username> --pass=<password>

It recognizes my CPU and GPU, then when I choose one, I get the "Unable to communicate with bitcoin RPC"

Thank you in advance for any help.
Did you build your client yourself?
it needs to have the getwork-patch included, so if you didn't,
just grab the win32-binary in the first post of this thread (works fine for me on 64bit XP&win7).

If you did (compile with patch, or grab),
you need to start the bitcoin-client with the -server switch (maybe -rpcallowip=<IP> if a miner is running on a remote machine).
Like BitLex told, I think it's the getwork-patch. Just replace the old bitcoin.exe by the one from the getwork and it should work. Enjoy your Bitcoin !

Malouin
I was on Bitcoin client 3.08 beta and now have also installed and tried 3.14 beta.  My bitcoin.conf file is located in directory "c:\Users\<my Windows user name>\AppData\Roaming\Bitcoin"

It contains 2 lines with syntax : rcpuser=<my unique user name>
 rcppassword=<my unique password>

I am running poclbm from a windows command line with syntax:
poclbm.exe --user=<username> --pass=<password>

It recognizes my CPU and GPU, then when I choose one, I get the "Unable to communicate with bitcoin RPC"

Thank you in advance for any help.
Hmm, are you aware of that you have to start bitcoin in server mode for this to work ?
Code:
bitcoin.exe -server
Got my new 5970 and it's only showing half performance it should. I'm on Linux with SDK 2.1 and catalyst drivers 10.10. I know others have seen this problem, but I don't know whether I've seen a resolution. Does anyone know how to fix it?
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.
Ah, that did it, thanks!
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.
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.
Solved  by reinstalling all drivers. Smiley

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

Thank you.
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.

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





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.
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.
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.
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?
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?
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.
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
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...
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
afaik the geforce 6 series does not have support for CUDA/OpenCL.
you need geforce 8 and newer.
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
(...)
Code:
(...)
pyopencl.RuntimeError: Context failed: out of host memory
(...)
Seems like you have some memory issues O.o
Any chance of getting a win32 binary of bitcoin.exe for 0.3.15 with the getwork patch?  Grin
So, someone want to compute wether amazon EC2 Cluster GPU instances would make you any money?

Quote
Cluster GPU Quadruple Extra Large 22 GB memory, 33.5 EC2 Compute Units, 2 x NVIDIA Tesla \u0093Fermi\u0094 M2050 GPUs, 1690 GB of local instance storage, 64-bit platform, 10 Gigabit Ethernet

These are $2.10 per hour.
So, someone want to compute wether amazon EC2 Cluster GPU instances would make you any money?

Quote
Cluster GPU Quadruple Extra Large 22 GB memory, 33.5 EC2 Compute Units, 2 x NVIDIA Tesla \u0093Fermi\u0094 M2050 GPUs, 1690 GB of local instance storage, 64-bit platform, 10 Gigabit Ethernet

These are $2.10 per hour.

That would be pretty sweet. Didnt someone already try that as an experiment?
See first post for updated (SVN 179, 0.3.15) win32 getwork patched client
With ATI 5970 Card and ubuntu I get with one Thread ~ 250 000 khash/s. But when I start a second thread the first thread rate is going down and I get with the two threats together not more as 250 000 khash/s. With "watch -n0 aticonfig --adapter=0 --od-getclocks" and "watch -n0 aticonfig --adapter=0 --od-getclocks" I can see that both GPUs are in use but only under 50% per GPU. I get this Problems with DISPLAY=:0 and with DISPLAY=:0.0 / :0.1 . What is wrong?

Thank you.
See first post for updated (SVN 179, 0.3.15) win32 getwork patched client

Thanks  Cool


If you want to make a quick launch for your miners in windows, just name a file something.bat, open it up in your text editor and then add a few lines like this, substituting your information:

Code:
start /DC:\Users\[username]\Desktop\poclbm_py2exe_20101102 poclbm.exe --user=youruser --pass=yourpw --device=0 -w 256
start /DC:\Users\[username]\Desktop\poclbm_py2exe_20101102 poclbm.exe --user=youruser --pass=yourpw --device=1 -w 256

The above is how I launch for my 2 nvidia gtx275's
-w specifies the work size and changing that (use powers of 2) can affect your hashrate, 256 works best for me on my nvidia gtx275's, but your mileage may vary.



Also do not forget to make your bitcoin.conf file at:
(win7)
C:\Users\[username]\AppData\Roaming\Bitcoinitcoin.conf

or
(xp)
C:\Documents and Settings\USERNAMEHERE\Application Data\Bitcoinitcoin.conf

containing

Code:
rpcuser=youruser
rpcpassword=yourpw

which is what you use in your calls to poclbm.exe

bitcoin.exe must also be launched with the -server argument from the command line to use external miners.


EDIT: Would still like clarification if simply using ctrl-c is an adequate way to exit these miners, or if there is a more "graceful" way to do so?
So, someone want to compute wether amazon EC2 Cluster GPU instances would make you any money?

Quote
Cluster GPU Quadruple Extra Large 22 GB memory, 33.5 EC2 Compute Units, 2 x NVIDIA Tesla \u0093Fermi\u0094 M2050 GPUs, 1690 GB of local instance storage, 64-bit platform, 10 Gigabit Ethernet

These are $2.10 per hour.

$2.10 x 24 hours = $50.40.

2 X M2050 = ~ 75 mkhash/s

Difficulty Factor   4536.35372328

Hash Target   5.94299671841E+63

Probability   Time
Average   3 days, 0 hours, 9 minutes
50%   2 days, 2 hours, 1 minute
95%   9 days, 0 hours, 10 minutes

^ From http://www.alloscomp.com/bitcoin/calculator.php

So, if one block for $150 is a good deal, then yes, it could make you money depending on what you think bitcoins value are now and in the future.

Of course the difficulty is jumping up again in a few days, current generation is still over 9 blocks an hour average.

$150 for a block means, by cloud computing industry standards, is $3 a bitcoin!  $150/50 = $3.  Is this the true worth of a bitcoin?!?
$150 for a block means, by cloud computing industry standards, is $3 a bitcoin!  $150/50 = $3.  Is this the true worth of a bitcoin?!?

No, it's not what they're worth. It's just what they cost to mine using the EC2 cluster. Just like everything else, bitcoins are worth whatever people are willing to pay for them.
Just updated to SVN 181 and fixed getwork patch to wait 60 seconds between rebuilding the block with new transactions. This is actually the behavior of the original client, was forgotten in the patch by mistake.  Fixes heavy CPU usage on every getwork request (this became obvious with recent heavy transaction spam). Please upgrade.
Hey guys, I'm really interested in generating Bitcoins and want to see how much I can get from my GPU. I've used "Geeks3D GPU Caps Viewer" and made sure that I do support "OpenCL(GPU)".

Problem is that the only clear instruction phases I see is:

1. Download "(GPU patch) bitcoin-getwork-svn181-win32.7z" and "poclbm_py2exe_20101102.7z".
2. ?
3. Profit!

Can a kind somebody please write a proper step-by-step guide as to how you get this to work in Windows 7 64-bit? With all the baby steps, including what files to download and where they can be downloaded from (direct links) plus where stuff should be extracted/configurated.

Of course a half-arsed how-to is better than how it is now, so any effort would be welcome. Smiley I and a lot of others would really appreciate it, and I believe you will be doing the community a huge favor.

People that try out making Bitcoins will stay much longer if they have 2000000 khash/s instead of 2000 khash/s.
it's actually all said in this thread, you just have to read it.

1. download (getwork patched client) bitcoin-getwork-* and the miner poclbm_py2exe_*.


2. make sure, you got a bitcoin.conf file at
C:\Users\[username]\AppData\Roaming\Bitcoinitcoin.conf
(or on xp)
C:\Documents and Settings\[username]\Application Data\Bitcoinitcoin.conf

containing
Code:
rpcuser=someone
rpcpassword=secret


3.a start bitcoin -server and wait for connections to get the last block
3.b start poclbm --user=someone --pass=secret
if you only have one GPU, this is it, if there's more, you'd need to specify the device to use for the miner, but it will tell you.
if you don't know how to handle your commandline, just create
a bitcoin.bat containing
Code:
start /DC:\Users\[username]\Desktopitcoin bitcoin.exe -server
and a poclbm.bat containing
Code:
start /DC:\Users\[username]\Desktop\poclbm poclbm.exe --user=someone --pass=secret
to feed your clicking-needs.


4. wait and/or pray Cheesy
So, someone want to compute wether amazon EC2 Cluster GPU instances would make you any money?

Quote
Cluster GPU Quadruple Extra Large 22 GB memory, 33.5 EC2 Compute Units, 2 x NVIDIA Tesla \u0093Fermi\u0094 M2050 GPUs, 1690 GB of local instance storage, 64-bit platform, 10 Gigabit Ethernet

These are $2.10 per hour.

$2.10 x 24 hours = $50.40.

2 X M2050 = ~ 75 mkhash/s

Difficulty Factor   4536.35372328

Hash Target   5.94299671841E+63

Probability   Time
Average   3 days, 0 hours, 9 minutes
50%   2 days, 2 hours, 1 minute
95%   9 days, 0 hours, 10 minutes

^ From http://www.alloscomp.com/bitcoin/calculator.php

So, if one block for $150 is a good deal, then yes, it could make you money depending on what you think bitcoins value are now and in the future.

Of course the difficulty is jumping up again in a few days, current generation is still over 9 blocks an hour average.

How did you estimate the hashrate of the cards? By my calculations, they'd hit at least 100mhash/s each.

Fermi M2050 = ~2 TFLOPS each

My NVidia card (8800 GTS 512MB) = ~624 GFLOPS, hashrate = 33mhash/s

Fermi hashrate = ~105mhash/s x2 = ~210 mhash/s

Difficulty Factor   4536.35372328
Hash Target   5.94299671841E+63
Hash Rate (khps)   

Probability   Time
Average   1 day, 1 hour, 46 minutes
50%   17 hours, 51 minutes
95%   3 days, 5 hours, 12 minutes
I'm confused here, how exactly is this installed. I got the bitcoin-getwork-svn181-win32 WHICH I am going to assume is a patched .exe and dll, and the other py2exe thing now that I have those I don't know what to do or exactly hwo to install this pyopencl application.

Windows Vista user by the way, (oh dread).
OpenCL HOWTO FOR FEDORA 12 LINUX

Here are some notes which may be useful to anyone who wishes to mine for bitcoins on Fedora 12 Linux. It took me about ten hours to get all of this working, because many of the standard Fedora packages are different to what bitcoin needs and generate all kinds of odd errors when you try to build the makefile.

If you aren't already running Fedora, save yourself a lot of time and hassles by installing Ubuntu instead.

===

Check your software versions, and upgrade as necessary. The gcc compiler needs to be 4.x (for PyOpenCL), and Python needs to be 2.4 or newer (again, for PyOpenCL).

Code:
$ gcc --version
gcc (GCC) 4.4.4 20100630 (Red Hat 4.4.4-10)

$ python --version
Python 2.6.2

You need to have either the full kernel source, or the kernel headers (because the ATI GPU driver is installed by compiling a kernel module.

Code:
$ rpm -q kernel-devel
kernel-devel-2.6.32.23-170.fc12.i686
$ rpm -q kernel-PAE-devel
kernel-PAE-devel-2.6.32.21-168.fc12.i686

===

Update your display driver.

I followed the instructions from here:
http://gofedora.com/how-to-install-ati-catalyst-fglrx-98-drivers-fedora-11/
except that I used the version 10.10 of the ATI Catalyst Display Driver for Linux x86 from here:
http://support.amd.com/us/gpudownload/linux/Pages/radeon_linux.aspx?type=2.4.1&product=2.4.1.3.42&lang=English

Apparently some of the installation steps are no longer needed with version 10.10, but I wasn't completely certain which ones, so I did them all anyway.

===

Get the ATI Stream SDK v2.1 (NOT any later version, according to brocktice), from here: http://developer.amd.com/gpu/ATIStreamSDK/pages/ATIStreamSDK-Archive.aspx

You need two downloads from that page: the Linux SDK (32-bit or 64-bit according to your version of Linux), plus icd-registration.tgz

Untar the SDK anywhere convenient. Add these lines to your .bash_profile file (in your login directory):

Code:
export ATISTREAMSDKSAMPLESROOT=...<some path>.../ati-stream-sdk-v2.1-lnx32
export ATISTREAMSDKROOT=...<some path>.../ati-stream-sdk-v2.1-lnx32
export LD_LIBRARY_PATH=$ATISTREAMSDKROOT/lib/x86:$LD_LIBRARY_PATH

Move icd-registration.tgz into your root directory and (as root) untar it from there. It puts some config files into /etc.

Follow the documentation that is included in the SDK to compile the examples. Execute ati-stream-sdk-v2.1-lnx32/samples/opencl/bin/x86/CLInfo to check that things are working and that your GPU card is detected.

===

Install the Python OpenCL module (PyOpenCL). Broadly, follow the instructions here:
http://wiki.tiker.net/PyOpenCL/Installation/Linux

However, in step 2 I couldn't install the Numpy dependency this way. Instead I ran "System | Administration | Add/Remove Software", then searched for numpy and installed it.

In step 3, the OpenCL headers and libraries weren't found, so I had to use the longer configure.py example and provide explicit paths.

The "Boost C++" libraries are not required for this version of PyOpenCL, but we will need them later (see below).

===

Install the JSON-RPC module for Python. This was straightforward using the instructions here:
http://json-rpc.org/wiki/python-json-rpc

===

Go to m0mchil's Git repository:
https://github.com/m0mchil/poclbm

Click the "Download" button. Download and unpack these files anywhere convenient. Change poclbm.py to executable and check that it's working:

Code:
chmod 744 poclbm.py
./poclbm.py --help

===

Next we need to get bitcoin's dependencies correct.

Install wxWidgets version 2.9.0 (not 2.8 or 2.9.1). You can get version 2.9.0 from here:
http://biolpc22.york.ac.uk/pub/2.9.0/
Follow the instructions in file build-unix.txt from the /src directory of the bitcoin distribution, except that you will need to be root ("su -") for the whole install, not just the "make install" step.

===

The version of OpenSSL that ships with Fedora excludes the elliptic curve cryptography due to patent concerns. Assuming you're in a country without absurd software patent laws, download the source for the latest 0.9.8 version (currently 0.9.8p) of OpenSSL from here:
http://www.openssl.org/source/

Build, test and install it according to the instructions in the download. However, the standard installation doesn't install the static libraries, so I made some symbolic links:

Code:
sudo ln -s `pwd`/libssl.a /usr/lib
sudo ln -s `pwd`/libcrypto.a /usr/lib

===

You need the static version of the Boost C++ development libraries installed. I installed this from package boost-static-1.39.0

===

You need the static version of the Berkeley DB development libraries installed. I installed this from package db4-devel-static-4.7.25

This installed a file libdb_cxx-4.7.a in /usr/lib, but the makefile wanted libdb_cxx.a, so I created a symbolic link:

Code:
cd /usr/lib
sudo ln -s libdb_cxx-4.7.a libdb_cxx.a

===

Go to the GIT repository for m0mchil's bitcoin-getwork patch:
https://github.com/m0mchil/bitcoin-getwork

Notice which SVN revision number the patch is for, and use that number instead of 181 in the following command (which downloads the development version of bitcoin):

Code:
svn co -r 181 https://bitcoin.svn.sourceforge.net/svnroot/bitcoin

Change into the newly-created directory that holds the sources:

Code:
cd bitcoin/trunk

From m0mchil's repository, click "Download" and download the archive. Extract the file getwork-latest.patch into the bitcoin/trunk directory.

Modify the sources by applying the patch:

Code:
patch -p0 -i getwork-latest.patch

It should tell you that it has updated files main.cpp, main.h and rpc.cpp.

===

We need to tweak Bitcoin's makefile, which is the file bitcoin/trunk/build-unix.txt

In the WXLIBS section of the makefile, add the line
-l Xxf86vm
and also add a trailing backslash to the previous line (it's a line-continuation character). A comment in the makefile says you only need to do this if you have wxWidgets 2.9.1, but I had to do it for 2.9.0.

If your version of "Boost" is less than 1.40 (I'm using 1.39), edit bitcoin's makefile (src/build-unix.txt) and add -mt to the end of the name of each of the "Boost" libraries. There are four of these, in the four lines after the line that contains the string "-Bstatic".

===

Built the getwork-modified version of bitcoin:

Code:
make -f makefile.unix

This should build a binary called 'bitcoin' in this directory. Try it out! If you already have another instance of bitcoin running, close it. Type ./bitcoin to check that your newly-compiled instance works. If it works OK, close it and we'll move on to mining.

===

If you don't already have a file bitcoin.conf in your ~/.bitcoin directory, create one and put a username and password in it:

Code:
rpcuser=yourusername
rpcpassword=yourpassword

Go back to the bitcoin/trunk directory and start bitcoin in rpc server mode:

Code:
./bitcoin -server &

Go to the directory where you built poclbm.py and run it:

Code:
./poclbm.py --user=yourusername --pass=yourpassword

It will ask you which device to use. Choose the one that's not your CPU.

Watch the khash/s figures with sweet delight, and enjoy the few moments before the roar of your cpu fan starts up.

Many thanks to m0mchil and the many others who have offered code or helpful tips.
I'm using the SHA hashing rate information from golubev's hash tables. His programs brute force attach md5 and sha algorythm's using GPU's. His numbers are extremely accurate and recently updated. Remember we are running two SHA calculations per try.

http://btco.in/4s

Take his single sha1 speed and devide it by 4.5 And somehow I messed it up really nicely, and I now get the 200 mhash/s as well. Must have been sleeping when I did that before.

The other issue is, we are using SHA-256, not SHA-1. This means that we take a further speed penalty... SHA-256 is both more computationally complex (more steps to run) and more data complex (more memory to need to shuffle around).

Not sure how you got a factor of 4.5. I would estimate 2 (due to needing 2 iterations of SHA-256 instead of 1) multiplied by 1.5 (penalty of using SHA-256 instead of SHA-1). So a factor of 3?

Maybe there is room for optimisation in our SHA-256 program, yet!
Thank you very much for the wonderful miner. Good use of GPU power Smiley

I sent you a donation.

BTW, what about adding an option to get the username/password directly from ~/.bitcoin/bitcoin.conf instead of providing them on the command line. That's a little bit safer, as command line arguments can be seen by everyone on the system:
Code:
def read_config_file(filename):
    '''
    Read a simply = delimited config file.
    Raises IOError if unable to open file, or ValueError
    if an parse error occurs.
    '''
    f = open(filename)
    try:
        cfg = {}
        for line in f:
    line = line.rstrip()
    if line:
        (key, value) = line.split('=', 1)
        cfg[key] = value
    finally:
        f.close()
    return cfg

import os
home = os.getenv("HOME")
if home:
    try:
        cfg = read_config_file(os.path.join(home, '.bitcoin/bitcoin.conf'))
    except (IOError,ValueError):
        pass # Cannot read config file, ignore
    else:
        options.user = cfg['rpcuser']
        options.password = cfg['rpcpassword']
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

wxWidgets 2.9.1 won't work, because debugging has been changed around in 2.9.1.

You can get 2.9.0 here:
http://biolpc22.york.ac.uk/pub/2.9.0/
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

wxWidgets 2.9.1 won't work, because debugging has been changed around in 2.9.1.

You can get 2.9.0 here:
http://biolpc22.york.ac.uk/pub/2.9.0/
Works fine here with 2.9.1, then again, I'm not using debugging. I did have to change the makefile a bit, because the library has been split up:
Quote
  -l wx_gtk2u_core-2.9 \
   -l wx_gtk2u_adv-2.9 \
   -l wx_gtk2u_html-2.9 \
instead of
Quote
-l wx_gtk2ud-2.9 \
Works fine here with 2.9.1

Yes, I just mean that wxWidgets 2.9.1 won't work with the makefile that comes with bitcoin 0.3.15.
Works fine here with 2.9.1

Yes, I just mean that wxWidgets 2.9.1 won't work with the makefile that comes with bitcoin 0.3.15.
Ah, I wouldn't know about that. I had to upgrade bitcoin to SVN trunk version before the getwork patch (from git) could be applied at all.
it's actually all said in this thread, you just have to read it.

1. download (getwork patched client) bitcoin-getwork-* and the miner poclbm_py2exe_*.


2. make sure, you got a bitcoin.conf file at
C:\Users\[username]\AppData\Roaming\Bitcoinitcoin.conf
(or on xp)
C:\Documents and Settings\[username]\Application Data\Bitcoinitcoin.conf

containing
Code:
rpcuser=someone
rpcpassword=secret


3.a start bitcoin -server and wait for connections to get the last block
3.b start poclbm --user=someone --pass=secret
if you only have one GPU, this is it, if there's more, you'd need to specify the device to use for the miner, but it will tell you.
if you don't know how to handle your commandline, just create
a bitcoin.bat containing
Code:
start /DC:\Users\[username]\Desktopitcoin bitcoin.exe -server
and a poclbm.bat containing
Code:
start /DC:\Users\[username]\Desktop\poclbm poclbm.exe --user=someone --pass=secret
to feed your clicking-needs.


4. wait and/or pray Cheesy



Thanks for the guide, although it looks like you left something out. When I start the miner I get the following error:

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.

Edit: Please post links if something needs to be downloaded.

I'm on Windows 7 64bit and have a NVIDIA GeForce 8800 GTS (with "OpenCL 1.0 CUDA 3.1.1 - CU: 12 @ 1188MHz (GPU)").
Wow, I just went from 2000 khash/s to almost 5000 by playing with the -f option Smiley

Edit : this variance changed when going to NV driver  260.19.21, now it's about 5500 and the -f has a lot less influence.
Also, CPU usage of the GPU miner went down with this driver. It was 100% with the old driver, now 2% Smiley
I made a bit of a discovery when testing m0m's latest binaries in -testnet, look at the times when blocks are generated in the miners, and note that they don't all show up in bitcoin's UI:



There seems to be a delay of 1 or more minutes between when they show up in the miner and when bitcoin picks up the transaction, if it picks it up at all.
Is this something to worry about, or just a peculiarity of testnet?
it's actually all said in this thread, you just have to read it.

1. download (getwork patched client) bitcoin-getwork-* and the miner poclbm_py2exe_*.


2. make sure, you got a bitcoin.conf file at
C:\Users\[username]\AppData\Roaming\Bitcoinitcoin.conf
(or on xp)
C:\Documents and Settings\[username]\Application Data\Bitcoinitcoin.conf

containing
Code:
rpcuser=someone
rpcpassword=secret


3.a start bitcoin -server and wait for connections to get the last block
3.b start poclbm --user=someone --pass=secret
if you only have one GPU, this is it, if there's more, you'd need to specify the device to use for the miner, but it will tell you.
if you don't know how to handle your commandline, just create
a bitcoin.bat containing
Code:
start /DC:\Users\[username]\Desktopitcoin bitcoin.exe -server
and a poclbm.bat containing
Code:
start /DC:\Users\[username]\Desktop\poclbm poclbm.exe --user=someone --pass=secret
to feed your clicking-needs.


4. wait and/or pray Cheesy



Thanks for the guide, although it looks like you left something out. When I start the miner I get the following error:

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.

Edit: Please post links if something needs to be downloaded.

I'm on Windows 7 64bit and have a NVIDIA GeForce 8800 GTS (with "OpenCL 1.0 CUDA 3.1.1 - CU: 12 @ 1188MHz (GPU)").

Nobody that can help me? I'm about to give up on running Bitcoins since I could use my CPU for other things, but I would like to use my GPU while I'm doing those other things. Please take a moment and explain how to fix this error.
i'm not sure about that error,
but do you have latest devdriver and cudatoolkit installed on your machine?
I made a bit of a discovery when testing m0m's latest binaries in -testnet, look at the times when blocks are generated in the miners, and note that they don't all show up in bitcoin's UI:
...
There seems to be a delay of 1 or more minutes between when they show up in the miner and when bitcoin picks up the transaction, if it picks it up at all.
Is this something to worry about, or just a peculiarity of testnet?

I had 2 such events with bitcoin-getwork-svn173-win32 in a real network
the miner had the event, but bitcoin did not catch it at all.
I still do not know what happened there and how to to trace it Sad
that's just one of those ~10% "lost blocks",
your miner finds one, your client checks the network, network tells your client it's to late.

within the last weeks i'v been able to "find" 50hashes, only 45 of them have been accepted/shown up in the client-gui/generating coins.
get used to it.
I made a bit of a discovery when testing m0m's latest binaries in -testnet, look at the times when blocks are generated in the miners, and note that they don't all show up in bitcoin's UI:

There seems to be a delay of 1 or more minutes between when they show up in the miner and when bitcoin picks up the transaction, if it picks it up at all.
Is this something to worry about, or just a peculiarity of testnet?

When they show up in the command window, they have zero confirmations. They do not show in the bitcoin UI until they have one confirmation. That delay can be a minute or 10. It is not a bug.

I don't think that is true...some of my blocks have shown up immediately with "0 confirmations" as soon as the miner locates them.




that's just one of those ~10% "lost blocks",
your miner finds one, your client checks the network, network tells your client it's to late.

within the last weeks i'v been able to "find" 50hashes, only 45 of them have been accepted/shown up in the client-gui/generating coins.
get used to it.

That's....not cool  Angry
Quote
That's....not cool
but that's how it is, you can't always win the race.
if your CPU/regular-miner does this, you wouldn't even notice/care, except when checking your debug.log.
updated to SVN 186
updated to SVN 186
Applies cleanly, thanks Smiley
updated to SVN 186
Thanks m0mchil for keeping up on the updates!

GPU miners, please upgrade as soon as possible to shut down the free transaction abuse!  This version has the new priority-based limit on free transaction spam.

Just updated to SVN 181 and fixed getwork patch to wait 60 seconds between rebuilding the block with new transactions. This is actually the behavior of the original client, was forgotten in the patch by mistake.  Fixes heavy CPU usage on every getwork request (this became obvious with recent heavy transaction spam). Please upgrade.
Before SVN 184, compiling transactions into a block used an n^2 algorithm.  The new efficient single-pass algorithm is orders of magnitude quicker.  (O(n) vs O(n^2)/2 algorithm, n=200 maybe 10 to 100 times quicker)
Hi m0mchil, firstly thank you for your work. Is there any way to include getwork patch into official client? I'm using bitcoin on old centos server and compiling is pain here!
A revised version of getwork is now in the official client, but the miners need to be updated a little to use it.