{Pyrit-Group} support for OpenCL build problem

1,071 views
Skip to first unread message

wujek

unread,
Nov 11, 2010, 4:17:42 PM11/11/10
to Pyrit
Hi!

When I am trying to build a support for OpenCL I get this one:

$ python setup.py build
The headers required to build the OpenCL-kernel were not found. Trying
to continue anyway...
running build
running build_ext
Building modules...
building 'cpyrit._cpyrit_opencl' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -
Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c _cpyrit_opencl.c -
o build/temp.linux-x86_64-2.6/_cpyrit_opencl.o -DVERSION="0.3.0"
_cpyrit_opencl.c:23: fatal error: CL/cl.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1


I am running Ubuntu 10.10 x64 2.6.35-22-generic. My graphic is ATI
Radeon 5650 @ notebook.


What I have done so far?
1. installed up-to-date graphic drivers

2. installed:
*g++
*python-dev
*zlib1g-dev
*libssl-dev
*python-scrapy

3. installed pyrit:
$cd pyrit-0.3.0
$python setup.py build

4. downloaded ATI STREAM SDK and according to this Installation Notes
I have done: (http://developer.amd.com/gpu/ATIStreamSDK/assets/
ATI_Stream_SDK_Installation_Notes.pdf)
$tar -xvzf ati-stream-sdk-v2.2-lnx64.tgz (in ~/Documents/OpenCL)

Added this 3 lines into .bashrc
export ATISTREAMSDKROOT=/home/wujek/Documents/OpenCL/ati-stream-sdk-
v2.2-lnx64
export ATISTREAMSDKSAMPLESROOT=/home/wujek/Documents/OpenCL/ati-stream-
sdk-v2.2-lnx64
export LD_LIBRARY_PATH=$ATISTREAMSDKROOT/lib/x86_64:$LD_LIBRARY_PATH

$cd /
$tar xfz icd-registration.tgz


5. To check if everything is working, I have complied some sample and
then run it:
$ ./HelloCL
HelloCL!
Getting Platform Information
Creating a context AMD platform
Getting device info
Loading and compiling CL source
Running CL program
Done
Passed!

Looks good :)


6. Tried to build a support for OpenCL:
$cd cpyrit-opencl-0.3.0
$python setup.py build
And this is where I have stopped :(

I can see two main problems:
#1. The headers required to build the OpenCL-kernel were not found.
Trying to continue anyway...
#2. _cpyrit_opencl.c:23: fatal error: CL/cl.h: No such file or
directory

I have no idea how to deal with them :( First one is because I don't
have any of this directories:
for path in ('/usr/local/opencl/OpenCL/common/inc', \
'/opt/opencl/OpenCL/common/inc', \
'/usr/local/opencl/include'):
if os.path.exists(path):
OPENCL_INC_DIRS.append(path)
break
else:
print >>sys.stderr, "The headers required to build the OpenCL-
kernel " \
"were not found. Trying to continue anyway..."


PS. Please forgive me if I have done many mistakes, my english isn't
perfect ;)
PS2. I am not also an unix guru, so it is possible that this problem
isn't as complicated as I assume...

Svetozar_Janjic

unread,
Nov 23, 2010, 10:59:08 AM11/23/10
to Pyrit
I have the same problem as your #1. Did you fix that?

james0p...@googlemail.com

unread,
Dec 4, 2010, 4:11:26 AM12/4/10
to Pyrit
I suggest that you type the export:

export ATISTREAMSDKROOT=/home/wujek/Documents/OpenCL/ati-stream-sdk-
v2.2-lnx64
export ATISTREAMSDKSAMPLESROOT=/home/wujek/Documents/OpenCL/ati-stream-
sdk-v2.2-lnx64
export LD_LIBRARY_PATH=$ATISTREAMSDKROOT/lib/x86_64:$LD_LIBRARY_PATH

Just before you run

python setup.py build

I assume you have logged in and out after adding the export commands
to .bashrc. Try that anyway, and if you are building under root rather
than your normal user I suggest you "sudo su" then run the export
commands and then the build.

Hope this helps,

James

On Nov 11, 9:17 pm, wujek <caly...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages