Bitcoin Forum
November 13, 2024, 02:49:01 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Python OpenCL Miner on Ubuntu not running.  (Read 6112 times)
acidblue (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
June 16, 2011, 09:32:51 PM
 #1


 
Code:
Traceback (most recent call last):
  File "poclbm.py", line 3, in <module>
    import pyopencl as cl
  File "/usr/lib/pymodules/python2.6/pyopencl/__init__.py", line 3, in <module>
    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?
cynikal
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
June 16, 2011, 09:50:34 PM
 #2


 
Code:
Traceback (most recent call last):
  File "poclbm.py", line 3, in <module>
    import pyopencl as cl
  File "/usr/lib/pymodules/python2.6/pyopencl/__init__.py", line 3, in <module>
    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
mjoz
Member
**
Offline Offline

Activity: 61
Merit: 10


View Profile
June 16, 2011, 10:14:36 PM
 #3


 
Code:
Traceback (most recent call last):
  File "poclbm.py", line 3, in <module>
    import pyopencl as cl
  File "/usr/lib/pymodules/python2.6/pyopencl/__init__.py", line 3, in <module>
    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?
acidblue (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
June 16, 2011, 10:56:31 PM
 #4

Where would I find pyopencl.py?
I looked in /usr/lib/pymodules/python2.6/pyopencl
Didn't see it.
hacker
Newbie
*
Offline Offline

Activity: 16
Merit: 0


View Profile
June 16, 2011, 11:05:56 PM
 #5

Looks like OpenCL is not installed or installed incorrectly, try running this and paste the result: -

Code:
sudo apt-get install python-pyopencl
cynikal
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
June 16, 2011, 11:07:07 PM
 #6

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
acidblue (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
June 16, 2011, 11:18:43 PM
Last edit: June 16, 2011, 11:54:21 PM by acidblue
 #7

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 ?



hacker
Newbie
*
Offline Offline

Activity: 16
Merit: 0


View Profile
June 17, 2011, 12:01:22 AM
 #8

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}
acidblue (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
June 17, 2011, 12:06:12 AM
 #9

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

hacker
Newbie
*
Offline Offline

Activity: 16
Merit: 0


View Profile
June 17, 2011, 12:10:22 AM
 #10

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.
acidblue (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
June 17, 2011, 12:11:35 AM
 #11

DOH!
Edited last post.
hacker
Newbie
*
Offline Offline

Activity: 16
Merit: 0


View Profile
June 17, 2011, 12:18:25 AM
 #12

Thanks.  Grin
But I'm still getting the same error.
Code:
Traceback (most recent call last):
  File "poclbm.py", line 3, in <module>
    import pyopencl as cl
  File "/usr/lib/pymodules/python2.6/pyopencl/__init__.py", line 3, in <module>
    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
acidblue (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
June 17, 2011, 12:27:29 AM
 #13

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 <module>
    from BitcoinMiner import *
  File "/home/rocko/BitcoinMiner.py", line 8, in <module>
    from sha256 import *
ImportError: No module named sha256


hacker
Newbie
*
Offline Offline

Activity: 16
Merit: 0


View Profile
June 17, 2011, 12:29:24 AM
 #14

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 <module>
    from BitcoinMiner import *
  File "/home/rocko/BitcoinMiner.py", line 8, in <module>
    from sha256 import *
ImportError: No module named sha256




Code:
wget --no-check-certificate https://github.com/m0mchil/poclbm/raw/master/sha256.py
acidblue (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
June 17, 2011, 12:37:27 AM
 #15

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 <module>
    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 <module>
    platforms = cl.get_platforms()
pyopencl.LogicError: clGetPlatformIDs failed: invalid/unknown error code
hacker
Newbie
*
Offline Offline

Activity: 16
Merit: 0


View Profile
June 17, 2011, 01:00:34 AM
 #16

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 <module>
    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 <module>
    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.
acidblue (OP)
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
June 17, 2011, 01:51:48 AM
 #17

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.
ewibit
Legendary
*
Offline Offline

Activity: 2955
Merit: 1050


View Profile
June 18, 2011, 10: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
Pages: [1]
  Print  
 
Jump to:  

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