Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

'binaries' was not found as a program info attribute or as a kernel name #40

Open
fbettag opened this Issue · 3 comments

4 participants

@fbettag

$ ./poclbm.py http://user:pass@pit.deepbit.net:8332
26/07/2011 19:51:20, Setting server (user @ pit.deepbit.net:8332)
Exception in thread Thread-1:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 530, in bootstrap_inner
self.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 483, in run
self.__target(self.__args, *self.__kwargs)
File "/Volumes/Daten/Downloads/poclbm/BitcoinMiner.py", line 63, in mining_thread
self.load_kernel()
File "/Volumes/Daten/Downloads/poclbm/BitcoinMiner.py", line 179, in load_kernel
binaryW.write(self.miner.binaries[0])
File "/Library/Python/2.7/site-packages/pyopencl-2011.1.2-py2.7-macosx-10.7-intel.egg/pyopencl/__init
.py", line 419, in getattr
"info attribute or as a kernel name" % attr)
AttributeError: 'binaries' was not found as a program info attribute or as a kernel name

pit.deepbit.net:8332 26/07/2011 19:51:21, LP connected to pit.deepbit.net:8332

on osx as well as linux..

@dragos240

A very similar error here as well on a new computer with gentoo linux and a 9500gt.
25/08/2011 22:42:46, Setting server (dragos240_1 @ uscentral.btcguild.com:8332)
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib64/python2.7/threading.py", line 530, in bootstrap_inner
self.run()
File "/usr/lib64/python2.7/threading.py", line 483, in run
self.__target(self.__args, *self.__kwargs)
File "/home/harley/poclbm/BitcoinMiner.py", line 63, in mining_thread
self.load_kernel()
File "/home/harley/poclbm/BitcoinMiner.py", line 179, in load_kernel
binaryW.write(self.miner.binaries[0])
File "/usr/lib64/python2.7/site-packages/pyopencl/__init
.py", line 448, in getattr
"info attribute or as a kernel name" % attr)
AttributeError: 'binaries' was not found as a program info attribute or as a kernel name

uscentral.btcguild.com:8332 25/08/2011 22:42:47, LP connected to uscentral.btcguild.com:8332

@tydel

Same here, using an Amazon EC2 GPU Cluster instance (Tesla M2050):

python poclbm.py -v -w 256 --device 0 http://tydel@tydel.com_0:XXXXXX@deepbit.net:8332

10/09/2011 14:17:56, Setting server (tydel@tydel.com_0 @ deepbit.net:8332)
deepbit.net:8332 10/09/2011 14:17:58, LP connected to deepbit.net:8332
/usr/lib64/python2.6/site-packages/pyopencl-2011.1.2-py2.6-linux-x86_64.egg/pyopencl/init.py:155: UserWarning: Build succeeded, but resulted in non-empty logs:
Build on succeeded, but said:

: Considering profile 'compute_20' for gpu='sm_20' in 'cuModuleLoadDataEx_4'
: Retrieving binary for 'cuModuleLoadDataEx_4', for gpu='sm_20', usage mode=' '
: Considering profile 'compute_20' for gpu='sm_20' in 'cuModuleLoadDataEx_4'
: Control flags for 'cuModuleLoadDataEx_4' disable search path
: Ptx binary found for 'cuModuleLoadDataEx_4', architecture='compute_20'
: Ptx compilation for 'cuModuleLoadDataEx_4', for gpu='sm_20', ocg options=' '
warn("Build succeeded, but resulted in non-empty logs:\n"+message)
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib64/python2.6/threading.py", line 532, in bootstrap_inner
self.run()
File "/usr/lib64/python2.6/threading.py", line 484, in run
self.__target(self.__args, *self.__kwargs)
File "/home/ec2-user/poclbm/BitcoinMiner.py", line 63, in mining_thread
self.load_kernel()
File "/home/ec2-user/poclbm/BitcoinMiner.py", line 179, in load_kernel
binaryW.write(self.miner.binaries[0])
File "/usr/lib64/python2.6/site-packages/pyopencl-2011.1.2-py2.6-linux-x86_64.egg/pyopencl/__init
.py", line 456, in getattr
"info attribute or as a kernel name" % attr)
AttributeError: 'binaries' was not found as a program info attribute or as a kernel name

Any ideas?

@theappleman

I came across this issue and decided to take a look at it.

The main problem above is pyOpenCL not exporting the info class variables; see here and here.

Changing line 179 in BitcoinMiner.py to:

should fix the issue.

However, while that is easily remedied, it exposes bigger problems. These problems may be inherent only to my setup, but if you get something similar (or not) please tell me :)

The main big problem is a type incompatibility between pyOpenCL and the boost library providing the bindings to python concerning the pyopencl.Program.build() method.

build's options argument (or more precicely, _build which is called from build) needs to be a string type. However, pyopencl.Program.build converts strings to lists.

I modified line 465 in pyopencl/\__init\__.py to:
```self._prg._build(' '.join(options), devices)```
which converts it back into a string.
@theappleman theappleman referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@theappleman theappleman referenced this issue from a commit in theappleman/poclbm
@theappleman theappleman Reorganise binary kernel logic
Also, fix #40.
f682ef7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.