Author

Topic: Python OpenCL Miner on Ubuntu not running. (Read 6114 times)

legendary
Activity: 2955
Merit: 1049
June 18, 2011, 05:07:05 PM
#18
Code:
[quote author=hacker link=topic=18058.msg229944#msg229944 date=1308272434]

pyopencl.LogicError: clGetPlatformIDs failed: invalid/unknown error code

[/quote]

Hi@all
I have had the same error after trying for now 2 days on now Ubuntu Lucid
now I have this:
-------------------
./poclbm.py
X Error of failed request:  BadRequest (invalid request code or no such operation)
  Major opcode of failed request:  136 ()
  Minor opcode of failed request:  19
  Serial number of failed request:  8
  Current serial number in output stream:  8
-------------------
any hints?
TIA  Smiley
newbie
Activity: 9
Merit: 0
Quote
This is a lot of effort for the 2Mh/s you'll get out of this card.

I agree, just wanted too see if I can get this to work.
newbie
Activity: 16
Merit: 0
Damn this is getting to be a pain.
BTW thanks for the help, but now getting a Logic error.

Code:
Traceback (most recent call last):
  File "poclbm.py", line 27, in
    platforms = cl.get_platforms()
pyopencl.LogicError: clGetPlatformIDs failed: invalid/unknown error code
rocko@nova:~$ python poclbm.py -d 0 --user un --pass pwTraceback (most recent call last):
  File "poclbm.py", line 27, in
    platforms = cl.get_platforms()
pyopencl.LogicError: clGetPlatformIDs failed: invalid/unknown error code


OpenCL seems to be returning a code that pyopencl doesn't like, I'm a bit stumped here but it feels like a driver issue.

This is a lot of effort for the 2Mh/s you'll get out of this card.
newbie
Activity: 9
Merit: 0
Damn this is getting to be a pain.
BTW thanks for the help, but now getting a Logic error.

Code:
Traceback (most recent call last):
  File "poclbm.py", line 27, in
    platforms = cl.get_platforms()
pyopencl.LogicError: clGetPlatformIDs failed: invalid/unknown error code
rocko@nova:~$ python poclbm.py -d 0 --user un --pass pwTraceback (most recent call last):
  File "poclbm.py", line 27, in
    platforms = cl.get_platforms()
pyopencl.LogicError: clGetPlatformIDs failed: invalid/unknown error code
newbie
Activity: 16
Merit: 0
Ok making some progress. After doing sym links and trying again I'm now getting a different error.

Code:
Traceback (most recent call last):
  File "poclbm.py", line 5, in
    from BitcoinMiner import *
  File "/home/rocko/BitcoinMiner.py", line 8, in
    from sha256 import *
ImportError: No module named sha256




Code:
wget --no-check-certificate https://github.com/m0mchil/poclbm/raw/master/sha256.py
newbie
Activity: 9
Merit: 0
Ok making some progress. After doing sym links and trying again I'm now getting a different error.

Code:
Traceback (most recent call last):
  File "poclbm.py", line 5, in
    from BitcoinMiner import *
  File "/home/rocko/BitcoinMiner.py", line 8, in
    from sha256 import *
ImportError: No module named sha256


newbie
Activity: 16
Merit: 0
Thanks.  Grin
But I'm still getting the same error.
Code:
Traceback (most recent call last):
  File "poclbm.py", line 3, in
    import pyopencl as cl
  File "/usr/lib/pymodules/python2.6/pyopencl/__init__.py", line 3, in
    import pyopencl._cl as _cl
ImportError: libOpenCL.so.1: cannot open shared object file: No such file or directory



Lets give these a shot: -

Code:
sudo ln -s /usr/lib/libOpenCL.so /usr/lib/libOpenCL.so.1
sudo ln -s /usr/lib64/libOpenCL.so /usr/lib64/libOpenCL.so.1
newbie
Activity: 9
Merit: 0
DOH!
Edited last post.
newbie
Activity: 16
Merit: 0
Make sure its in the current directory from where you are calling
Code:
python poclbm.py

Code:
find /home -name "poclbm.py" | cd
Will find and put you in the right directory.
newbie
Activity: 9
Merit: 0
Thanks.  Grin
But I'm still getting the same error.
Code:
Traceback (most recent call last):
  File "poclbm.py", line 3, in
    import pyopencl as cl
  File "/usr/lib/pymodules/python2.6/pyopencl/__init__.py", line 3, in
    import pyopencl._cl as _cl
ImportError: libOpenCL.so.1: cannot open shared object file: No such file or directory

newbie
Activity: 16
Merit: 0
Code:
Reading package lists... Done
Building dependency tree      
Reading state information... Done
python-pyopencl is already the newest version.
The following packages were automatically installed and are no longer required:
  mesa-utils python-wxgtk2.8 libglew1.5 zlib-bin freedroid-data
  python-wxversion
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

It appears pyopencl is installed.

The file in question is in fact called _init_.py
This is what it imports:
import pyopencl._cl as _cl
from pyopencl._cl import *
import inspect as _inspect

Running ldd on pyopen_.cl gives "no such file or directory".


Doing whereis libOpenCL.so* gives me :
/usr/lib/libOpenCL.so /usr/lib64/libOpenCL.so

How do I set the LD_LIBRARY_PATH environment variable ?


Code:
export LD_LIBRARY_PATH=/usr/lib64/;${LD_LIBRARY_PATH}
newbie
Activity: 9
Merit: 0
Code:
Reading package lists... Done
Building dependency tree      
Reading state information... Done
python-pyopencl is already the newest version.
The following packages were automatically installed and are no longer required:
  mesa-utils python-wxgtk2.8 libglew1.5 zlib-bin freedroid-data
  python-wxversion
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

It appears pyopencl is installed.

The file in question is in fact called _init_.py
This is what it imports:
import pyopencl._cl as _cl
from pyopencl._cl import *
import inspect as _inspect

Running ldd on pyopen_.cl gives "no such file or directory".


Doing whereis libOpenCL.so* gives me :
/usr/lib/libOpenCL.so /usr/lib64/libOpenCL.so

How do I set the LD_LIBRARY_PATH environment variable ?



newbie
Activity: 14
Merit: 0
Where would I find pyopencl.py?
I looked in /usr/lib/pymodules/python2.6/pyopencl
Didn't see it.

sorry, it might also be called __init__.py if it's within in the pyopencl directory too.. check in there what opencl related modules it imports, chances are one of them is binary, run ldd on that file..

also you probably want to start look where libOpenCL.so* is your filesystem
newbie
Activity: 16
Merit: 0
Looks like OpenCL is not installed or installed incorrectly, try running this and paste the result: -

Code:
sudo apt-get install python-pyopencl
newbie
Activity: 9
Merit: 0
Where would I find pyopencl.py?
I looked in /usr/lib/pymodules/python2.6/pyopencl
Didn't see it.
member
Activity: 61
Merit: 10

 
Code:
Traceback (most recent call last):
  File "poclbm.py", line 3, in
    import pyopencl as cl
  File "/usr/lib/pymodules/python2.6/pyopencl/__init__.py", line 3, in
    import pyopencl._cl as _cl
ImportError: libOpenCL.so.1: cannot open shared object file: No such file or directory

I'm on Ubuntu 10.10 x86_64 using a NVidia 8400GS
I followed this giude: http://forum.bitcoin.org/index.php?topic=2636.0
I would post my question in that forum but being new I have to post here instead.

Everything installed fine, but when I try to run the Miner I get the above error.
Not sure why I'm getting that error.

Can anyone give me a clue?

I think the problem here is you're mining with an Nvidia 8400.  Does it take 4 months to generate a bitcoin?
newbie
Activity: 14
Merit: 0

 
Code:
Traceback (most recent call last):
  File "poclbm.py", line 3, in
    import pyopencl as cl
  File "/usr/lib/pymodules/python2.6/pyopencl/__init__.py", line 3, in
    import pyopencl._cl as _cl
ImportError: libOpenCL.so.1: cannot open shared object file: No such file or directory

I'm on Ubuntu 10.10 x86_64 using a NVidia 8400GS
I followed this giude: http://forum.bitcoin.org/index.php?topic=2636.0
I would post my question in that forum but being new I have to post here instead.

Everything installed fine, but when I try to run the Miner I get the above error.
Not sure why I'm getting that error.

Can anyone give me a clue?

for starters, look at the pyopencl.py file, see what the binary it imports is, and ldd that (you should be able to see what libraries it's dynamicaly linked against, and you'll likely see 'not found' for the opencl one.. then to work-around that, set your LD_LIBRARY_PATH environment variable containing the directory that libOpenCL.so.1 directory.. if you want to fix it more permanently, you'll need to re-compile pyopencl and this time specify a rpath (which hardcodes a path to the library) containing the dir libOpenCL.so is in
newbie
Activity: 9
Merit: 0

 
Code:
Traceback (most recent call last):
  File "poclbm.py", line 3, in
    import pyopencl as cl
  File "/usr/lib/pymodules/python2.6/pyopencl/__init__.py", line 3, in
    import pyopencl._cl as _cl
ImportError: libOpenCL.so.1: cannot open shared object file: No such file or directory

I'm on Ubuntu 10.10 x86_64 using a NVidia 8400GS
I followed this giude: http://forum.bitcoin.org/index.php?topic=2636.0
I would post my question in that forum but being new I have to post here instead.

Everything installed fine, but when I try to run the Miner I get the above error.
Not sure why I'm getting that error.

Can anyone give me a clue?
Jump to: