You are not logged in.

#1 2011-08-07 16:14:26

der_harm
Member
Registered: 2011-04-12
Posts: 32

OpenCl kernel error after amdstream upgrade

Hi,
I did a system upgrade and a dependency seems to be broken now:

  FATAL kernel error: Failed to load OpenCL kernel!

I am using the phoenix-miner-svn and amdstream from aur to do mathematic calculations with my GPUs (hd 5850) for mining bitcoins.

After the update from amdstream 2.4 to 2.5 the phoenix-miner can't load the OpenCL kernel anymore.
  ./clifo
show all my GPUs, so amdstream seems be be ok

It is a 64bit system.
Maybe the problem has another source, but I couldn't figure it out.

  sudo phoenix-miner
returns the same failure.

Anyone an idea?

Offline

#2 2011-08-07 17:03:50

kralyk
Member
Registered: 2009-04-27
Posts: 72

Re: OpenCl kernel error after amdstream upgrade

Which libcl do you use?
If unsure, issue:

pacman -Q libcl libopencl

Offline

#3 2011-08-08 10:59:56

der_harm
Member
Registered: 2011-04-12
Posts: 32

Re: OpenCl kernel error after amdstream upgrade

Hi,
thanks for answering:)

libopencl is not installed, should it?

python2-pyopencl (required by phoenix-miner-svn) and amdstream require libcl, which is version 1.0-1

If you wouldn't mind, you could test the phoenix-miner-svn wink
Just do:

python2 ./phoenix.py -u http://12a5o5fTSPgZQm1fpPkkFDZdDwVxoYdE3A:x@mining.eligius.st:8337  -k phatk DEVICE=0 VECTORS BFI_INT AGGRESSION=11 FASTLOOP=false WORKSIZE=256

DEVICE=0 should be your GPU

The latest version of the miner maybe has to be run as sudo, but for me it doesn't work neither...

Offline

#4 2011-08-08 11:44:49

der_harm
Member
Registered: 2011-04-12
Posts: 32

Re: OpenCl kernel error after amdstream upgrade

I have checked the libraries:

[root@ArchLinux /]# file /opt/amdstream/lib/*
/opt/amdstream/lib/libamdocl64.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
/opt/amdstream/lib/libGLEW.so:     ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
/opt/amdstream/lib/libglut.so:     ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
/opt/amdstream/lib/libOpenCL.so:   symbolic link to `libOpenCL.so.1'
/opt/amdstream/lib/libOpenCL.so.1: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
[root@ArchLinux /]#
[root@ArchLinux /]# file /usr/lib/libOpenCL.so*
/usr/lib/libOpenCL.so:       symbolic link to `/usr/lib/libOpenCL.so.1'
/usr/lib/libOpenCL.so.1:     symbolic link to `/usr/lib/libOpenCL.so.1.0.0'
/usr/lib/libOpenCL.so.1.0.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
[root@ArchLinux /]#

On a backup (amdstream 2.4) I found this dependencies. I think I set the link from /usr/lib/libOpenCL.so.1 to /apt/amdstream/lib/libOpenCL.so.1 myself but I think not for the other one...

[harm@ArchLinux ~]$ file /opt/amdstream/lib/*
/opt/amdstream/lib/libamdocl64.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
/opt/amdstream/lib/libGLEW.so:     ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
/opt/amdstream/lib/libglut.so:     ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
/opt/amdstream/lib/libOpenCL.so:   symbolic link to `libOpenCL.so.1'
/opt/amdstream/lib/libOpenCL.so.1: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
[harm@ArchLinux ~]$
[harm@ArchLinux ~]$ file /usr/lib/libOpenCL.so*
/usr/lib/libOpenCL.so:   symbolic link to `/opt/amdstream/lib/libOpenCL.so'
/usr/lib/libOpenCL.so.1: symbolic link to `/opt/amdstream/lib/libOpenCL.so.1'
[harm@ArchLinux ~]$

Therefore I tried this, but had no success:

mv /usr/lib/libOpenCL.so /usr/lib/libOpenCL.so_bak
mv /usr/lib/libOpenCL.so.1_bak /usr/lib/libOpenCL.so.1_bak
ln -s /opt/amdstream/lib/libOpenCL.so /usr/lib/libOpenCL.so
ln -s /opt/amdstream/lib/libOpenCL.so.1 /usr/lib/libOpenCL.so.1

Last edited by der_harm (2011-08-08 12:00:02)

Offline

#5 2011-08-08 14:40:56

kralyk
Member
Registered: 2009-04-27
Posts: 72

Re: OpenCl kernel error after amdstream upgrade

Ok, right now, I'm not on a machine with AMD GPU, I'll test the miner later...

To the libOpenCL.so:
that file is provided by both extra/libcl and libopencl from AUR. extra/libcl is nvidia version, libopencl (which also provides libcl) is an alternative the one from AMD (from amdstream).
This is done so that various SDKs can be installed at the same time. In your case, however, I recommend using libopnecl instead of libcl.
Just remove libcl with pacman -Rdd and install libopencl (it has the same source as amdstream, you may copy the source tgz over).

(I should probably put up a wiki page on this)

I know that you have tested this manually, but please do it one more time using libopencl. Also don't let too much orphaned files dwell in your system ;-)

Also, have a look at this: http://bitcointalk.org/index.php?topic=20489.0

Last edited by kralyk (2011-08-08 14:41:15)

Offline

#6 2011-08-08 17:06:55

der_harm
Member
Registered: 2011-04-12
Posts: 32

Re: OpenCl kernel error after amdstream upgrade

Hi again:)
It is still not working...

kralyk wrote:

Ok, right now, I'm not on a machine with AMD GPU, I'll test the miner later...

That would be nice, thanks:) But don't stress yourself, my USB-backup pays itself off very well right now;)

kralyk wrote:

To the libOpenCL.so:
that file is provided by both extra/libcl and libopencl from AUR. extra/libcl is nvidia version, libopencl (which also provides libcl) is an alternative the one from AMD (from amdstream).
This is done so that various SDKs can be installed at the same time. In your case, however, I recommend using libopnecl instead of libcl.
Just remove libcl with pacman -Rdd and install libopencl (it has the same source as amdstream, you may copy the source tgz over).

Thanks for the command, was hesitating to do this;)
But unfortunately this didn't work...

[root@ArchLinux phoenix-miner]# file /usr/lib/libOpenCL.so*
/usr/lib/libOpenCL.so:   symbolic link to `libOpenCL.so.1'
/usr/lib/libOpenCL.so.1: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
[root@ArchLinux phoenix-miner]#
kralyk wrote:

(I should probably put up a wiki page on this)

Good idea:)!

kralyk wrote:

I know that you have tested this manually, but please do it one more time using libopencl. Also don't let too much orphaned files dwell in your system ;-)

do you have something specific in mind;)??

kralyk wrote:

found this thread previously and tried it - though it doesn't make sens to me - didn't work:(

Offline

#7 2011-08-11 12:48:43

der_harm
Member
Registered: 2011-04-12
Posts: 32

Re: OpenCl kernel error after amdstream upgrade

It works now, obviously it was not a problem of amdstream!

Today I did an update of:
community/python2-pytools 2011.3-1
community/python2-pyopencl 2011.1.2-2
community/opencl-headers 1.1.20110526-1

One of them fixed i think;)

But I have a high CPU load on the python processes: 17% instead of 0.6% - no good:-(

Offline

#8 2011-08-11 20:12:19

rewind
Member
Registered: 2011-02-25
Posts: 11

Re: OpenCl kernel error after amdstream upgrade

der_harm wrote:

It works now, obviously it was not a problem of amdstream!

Today I did an update of:
community/python2-pytools 2011.3-1
community/python2-pyopencl 2011.1.2-2
community/opencl-headers 1.1.20110526-1

One of them fixed i think;)

But I have a high CPU load on the python processes: 17% instead of 0.6% - no good:-(

Tried with poclbm, but I got this again:

python2 poclbm/poclbm.py -d 0 http://user:password@bitcoin.host:8332
Traceback (most recent call last):
  File "poclbm/poclbm.py", line 3, in <module>
    from BitcoinMiner import *
  File "/home/teo/poclbm/BitcoinMiner.py", line 4, in <module>
    from log import *
ImportError: No module named log

With phoenix-miner I got this again:

[11/08/2011 22:58:07] FATAL kernel error: Failed to load OpenCL kernel!

Unfortunately this is with and without VECTORS, as was suggested in the thread linked above. And my CPU usage /when it worked last time smile/ was around 100% per core per worker. I got two cards, so I always have more than 190% CPU usage /100% per core/.

There is one miner here /64bit/ called hashkill, but it isn't working right with my cards. But that will be not necessarily be the case with your card/s. You have to set the following:

export LD_LIBRARY_PATH=/opt/amdstream/lib #if you installed it from AUR 
sudo ./install.sh 
hashkill-gpu -p bitcoin user:password:bitcoin.server.com:port

Offline

#9 2011-08-11 20:25:22

kralyk
Member
Registered: 2009-04-27
Posts: 72

Re: OpenCl kernel error after amdstream upgrade

Hmmm... I have a feeling the problem is somewhere in the python layer...

Although it could be amdsteam's fault too... there is one thing you can try:
In amdstream's PKGBUILD I removed all the custom architecture-resolution stuff
because on linux w/ package management it is seriously useless...
But some software might expect it be the way AMD made it, so you can try moving
libs to the x86 or x86_64 subfolder in /opt/amdstream/lib.
Don't forget to edit ICD file accordingly...

It's just a guess though... I honestly don't know why it doesn't work sometimes...

Offline

#10 2011-08-11 20:54:49

rewind
Member
Registered: 2011-02-25
Posts: 11

Re: OpenCl kernel error after amdstream upgrade

kralyk wrote:

Hmmm... I have a feeling the problem is somewhere in the python layer...

Although it could be amdsteam's fault too... there is one thing you can try:
In amdstream's PKGBUILD I removed all the custom architecture-resolution stuff
because on linux w/ package management it is seriously useless...
But some software might expect it be the way AMD made it, so you can try moving
libs to the x86 or x86_64 subfolder in /opt/amdstream/lib.

Tried that, but with no luck.

kralyk wrote:

Don't forget to edit ICD file accordingly...

found mine and edited, but with no luck again

I guess there was a reason for the disappearing of poclbm in AUR. And cgminer returns:

[2011-08-11 23:53:40] Unable to open phatk110722.cl for reading
[2011-08-11 23:53:40] Unable to find VECTORSX in source
[2011-08-11 23:53:40] Failed to init GPU thread 0
[2011-08-11 23:53:40] Unable to open phatk110722.cl for readingSegmentation fault

And actually I'm out of options now smile That was the last miner in AUR.
cgminer works pretty well, but only for those who read it's manual smile

NOW cgminer must be executed in /usr/bin if mining by GPU.
It's a stupid bug which the author may fix later. 

EDIT: Now that's odd, I preinstalled amdstream just to be sure that everything is fine and now I got only one gpu device in clinfo...

Last edited by rewind (2011-08-11 21:22:11)

Offline

Board footer

Powered by FluxBB