Issue using CPyrit-OpenCL-0.4.0 w/ Debian Squeeze - "Failed to load Pyrit's OpenCL-core" Error

134 views
Skip to first unread message

Hubert Jasper

unread,
Feb 22, 2012, 2:42:37 AM2/22/12
to Pyrit
I'm encountering this error after I run the command 'pyrit list_cores'

"Failed to load Pyrit's OpenCL-core ('Failed to enumerate OpenCL-
platforms (Unknown CLresult)')."

I am using Debian Squeeze 6.0.4 x86-64, Squeeze's fglrx package which
is Catalyst version 10.9, and AMD APP SDK version 2.3 x86-64. I'm
using AMD APP SDK v2.3, because that is what is compatible with
Catalyst v10.9.

These are the steps I did to setup AMD APP SDK v2.3, Pyrit-0.4.0, and
CPyrit-OpenCl-0.4.0. I have gone over these steps multiple times and
tried reinstalling to no avail. I'm sure I have just overlooked
something, but I don't know what.

STEP 1 - I successfully installed Catalyst 10.9, and ran the command
"sudo aticonfig --initial -f" to setup my xorg.

STEP 2 - I downloaded the archived AMD APP SDK v2.3 and unpacked it to
'/home/one/ati-stream-sdk-v2.3-lnx64'.

STEP 3 - As per the installation notes, I added these commands to the
bottome of my ~/.bashrc file:

export ATISTREAMSDKROOT=/home/one/ati-stream-sdk-v2.3-lnx64
export ATISTREAMSDKSAMPLESROOT=/home/one/ati-stream-sdk-v2.3-lnx64/
samples
export LD_LIBRARY_PATH=$ATISTREAMSDKROOT/lib/x86_64:$LD_LIBRARY_PATH

STEP 4 - I created the directory and setup up library links via the
following commands

sudo mkdir -p /usr/lib/OpenCL/vendors
sudo ln -sf /home/one/ati-stream-sdk-v2.3-lnx64/lib/x86/
libatiocl32.so /usr/lib/OpenCL/vendors/libatiocl32.so
sudo ln -sf /home/one/ati-stream-sdk-v2.3-lnx64/lib/x86_64/
libatiocl64.so /usr/lib/OpenCL/vendors/libatiocl64.so

STEP 5 - I built and installed pyrit-0.4.0 successfully. Here are the
associated commands and terminal output:

--> Build Command: sudo python setup.py build
--> Build Output:
svn: '.' is not a working copy
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.6
copying pyrit_cli.py -> build/lib.linux-x86_64-2.6
creating build/lib.linux-x86_64-2.6/cpyrit
copying cpyrit/__init__.py -> build/lib.linux-x86_64-2.6/cpyrit
copying cpyrit/cpyrit.py -> build/lib.linux-x86_64-2.6/cpyrit
copying cpyrit/util.py -> build/lib.linux-x86_64-2.6/cpyrit
copying cpyrit/pckttools.py -> build/lib.linux-x86_64-2.6/cpyrit
copying cpyrit/config.py -> build/lib.linux-x86_64-2.6/cpyrit
copying cpyrit/network.py -> build/lib.linux-x86_64-2.6/cpyrit
copying cpyrit/storage.py -> build/lib.linux-x86_64-2.6/cpyrit
running build_ext
building 'cpyrit._cpyrit_cpu' extension
creating build/temp.linux-x86_64-2.6
creating build/temp.linux-x86_64-2.6/cpyrit
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -
Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c cpyrit/
_cpyrit_cpu.c -o build/temp.linux-x86_64-2.6/cpyrit/_cpyrit_cpu.o -
Wall -fno-strict-aliasing -DVERSION="0.4.0"
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -
Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c cpyrit/
_cpyrit_cpu_sse2.S -o build/temp.linux-x86_64-2.6/cpyrit/
_cpyrit_cpu_sse2.o -Wall -fno-strict-aliasing -DVERSION="0.4.0"
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-
x86_64-2.6/cpyrit/_cpyrit_cpu.o build/temp.linux-x86_64-2.6/cpyrit/
_cpyrit_cpu_sse2.o -lcrypto -lpcap -o build/lib.linux-x86_64-2.6/
cpyrit/_cpyrit_cpu.so
running build_scripts
creating build/scripts-2.6
copying and adjusting pyrit -> build/scripts-2.6
changing mode of build/scripts-2.6/pyrit from 644 to 755

--> Install Command: sudo python setup.py install
--> Install Output:
svn: '.' is not a working copy
running install
running build
running build_py
running build_ext
running build_scripts
running install_lib
creating /usr/local/lib/python2.6/dist-packages/cpyrit
copying build/lib.linux-x86_64-2.6/cpyrit/pckttools.py -> /usr/local/
lib/python2.6/dist-packages/cpyrit
copying build/lib.linux-x86_64-2.6/cpyrit/cpyrit.py -> /usr/local/lib/
python2.6/dist-packages/cpyrit
copying build/lib.linux-x86_64-2.6/cpyrit/_cpyrit_cpu.so -> /usr/local/
lib/python2.6/dist-packages/cpyrit
copying build/lib.linux-x86_64-2.6/cpyrit/network.py -> /usr/local/lib/
python2.6/dist-packages/cpyrit
copying build/lib.linux-x86_64-2.6/cpyrit/util.py -> /usr/local/lib/
python2.6/dist-packages/cpyrit
copying build/lib.linux-x86_64-2.6/cpyrit/__init__.py -> /usr/local/
lib/python2.6/dist-packages/cpyrit
copying build/lib.linux-x86_64-2.6/cpyrit/config.py -> /usr/local/lib/
python2.6/dist-packages/cpyrit
copying build/lib.linux-x86_64-2.6/cpyrit/storage.py -> /usr/local/lib/
python2.6/dist-packages/cpyrit
copying build/lib.linux-x86_64-2.6/pyrit_cli.py -> /usr/local/lib/
python2.6/dist-packages
byte-compiling /usr/local/lib/python2.6/dist-packages/cpyrit/
pckttools.py to pckttools.pyc
byte-compiling /usr/local/lib/python2.6/dist-packages/cpyrit/cpyrit.py
to cpyrit.pyc
byte-compiling /usr/local/lib/python2.6/dist-packages/cpyrit/
network.py to network.pyc
byte-compiling /usr/local/lib/python2.6/dist-packages/cpyrit/util.py
to util.pyc
byte-compiling /usr/local/lib/python2.6/dist-packages/cpyrit/
__init__.py to __init__.pyc
byte-compiling /usr/local/lib/python2.6/dist-packages/cpyrit/config.py
to config.pyc
byte-compiling /usr/local/lib/python2.6/dist-packages/cpyrit/
storage.py to storage.pyc
byte-compiling /usr/local/lib/python2.6/dist-packages/pyrit_cli.py to
pyrit_cli.pyc
writing byte-compilation script '/tmp/tmpOMf80F.py'
/usr/bin/python -O /tmp/tmpOMf80F.py
removing /tmp/tmpOMf80F.py
running install_scripts
copying build/scripts-2.6/pyrit -> /usr/local/bin
changing mode of /usr/local/bin/pyrit to 755
running install_egg_info
Writing /usr/local/lib/python2.6/dist-packages/pyrit-0.4.0.egg-info

STEP 6 - I built and installed cpyrit-opencl-0.4.0 successfully. For
this step, I had to edit the setup.py file and on line 55 added "'/
home/one/ati-stream-sdk-v2.3-lnx64/include', \" If I didn't edit the
setup.py file it couldn't find the headers.

Here are the associated commands and terminal output:

--> Build Command: sudo python setup.py build
--> Build Output:
svn: '.' is not a working copy
running build
running build_ext
Building modules...
building 'cpyrit._cpyrit_opencl' extension
creating build
creating build/temp.linux-x86_64-2.6
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -
Wstrict-prototypes -fPIC -I/home/one/ati-stream-sdk-v2.3-lnx64/include
-I/usr/include/python2.6 -c _cpyrit_opencl.c -o build/temp.linux-
x86_64-2.6/_cpyrit_opencl.o -Wall -fno-strict-aliasing -
DVERSION="0.4.0"
creating build/lib.linux-x86_64-2.6
creating build/lib.linux-x86_64-2.6/cpyrit
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-
x86_64-2.6/_cpyrit_opencl.o -lcrypto -lz -lOpenCL -o build/lib.linux-
x86_64-2.6/cpyrit/_cpyrit_opencl.so

--> Install Command: sudo python setup.py install
--> Install Output:
svn: '.' is not a working copy
running install
running build
running build_ext
Building modules...
running install_lib
copying build/lib.linux-x86_64-2.6/cpyrit/_cpyrit_opencl.so -> /usr/
local/lib/python2.6/dist-packages/cpyrit
running install_egg_info
Writing /usr/local/lib/python2.6/dist-packages/cpyrit_opencl-0.4.0.egg-
info

STEP 7 - Reboot
===========================================================================
Conclusion

Those were all the steps I took to install the AMD APP SDK v2.3,
Pyrit-0.4.0, and CPyrit-OpenCL-0.4.0

Here is the complete output when I run "pyrit list_cores"

Failed to load Pyrit's OpenCL-core ('Failed to enumerate OpenCL-
platforms (Unknown CLresult)').
Pyrit 0.4.0 (C) 2008-2011 Lukas Lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

The following cores seem available...
#1: 'CPU-Core (SSE2)'
#2: 'CPU-Core (SSE2)'
#3: 'CPU-Core (SSE2)'
#4: 'CPU-Core (SSE2)'



I would greatly appreciate any help anyone could give me to help me
solve my problem. If it is any help, I'm only running one HD5450..

Thanks for reading.

Hubert Jasper

unread,
Feb 23, 2012, 10:45:06 PM2/23/12
to Pyrit
[SOLVED]

The problem was that the .icd files (icd-registration.tgz) in AMD APP
SDK v2.3 were not extracted to the proper directory.

Both icd files (atiocl32.icd and atiocl64.icd) must be extracted to '/
etc/OpenCL/vendors' for OpenCl to work.
> Pyrit 0.4.0 (C) 2008-2011 Lukas Lueghttp://pyrit.googlecode.com

Jimmy

unread,
Mar 16, 2012, 9:12:20 AM3/16/12
to Pyrit
Reply all
Reply to author
Forward
0 new messages