Am 14.04.2013 23:08, schrieb Tomasz Rybak:
Dnia 2013-04-14, nie o godzinie 22:05 +0200, Alexander Kläser pisze:
Dear all,
I am curious whether anyone could give me a hint what I could do to use
PyOpenCL in Ubuntu 12.10 with my NVIDIA card?
I have an Asus laptop with Optimus technology (i.e., with two graphic
cards: one simple Intel graphic card for saving energy and one NVIDIA).
After installing bumblebee, I can access the NVIDIA card using the
optirun command (e.g., "optirun ipython" for the output below). However,
it seems that the proprietary NVIDIA driver does not support OpenCL 1.2,
but only OpenCL 1.1:
Yes - NVIDIA supports only OpenCL 1.1.
I have not tested on Kepler, but Fermi and lower have only 1.1 support.
:/
====================
In [1]: import pyopencl
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-63105a952239> in <module>()
----> 1 import pyopencl
/usr/lib/python2.7/dist-packages/pyopencl/__init__.py in <module>()
2
3 try:
----> 4 import pyopencl._cl as _cl
5 except ImportError:
6 import os
ImportError: /usr/lib/python2.7/dist-packages/pyopencl/_cl.so: symbol
clRetainDevice, version OPENCL_1.2 not defined in file libOpenCL.so.1
with link time reference
====================
When forcing Python to use the library ocl-icd-libopencl1, instead I run
in to a differen error:
====================
In [1]: import pyopencl
In [2]: pyopencl.get_platforms()
---------------------------------------------------------------------------
LogicError Traceback (most recent call last)
<ipython-input-2-2a778713b183> in <module>()
----> 1 pyopencl.get_platforms()
LogicError: clGetPlatformIDs failed: platform not found khr
That's strange.
Part of this problem might be related to OpenCL version mismatch:
ocl-icd supports OpenCL 1.2 while NVIDIA 1.1 - I've had problems
with PyOpenCL and images under NVIDIA.
BTW - have you recompiled PyOpenCL after switching to ocl-icd?
I did try to recompile, it did not help, the problem remained. Well,
currently, I have the nvidia-current package side by side with ocl-icd -
as bumblebee needs nvidia-current to access the NVIDIA card :/ . I am
not sure how the optimal setup would look like in my case.
A dumb question, it would not make sense to go back to a pyopencl
version that supports OpenCL 1.1, would it?
Also, have you built ocl-icd from source, or is it packaged
for Ubuntu?
I tried Ubuntu's packaged version. But you are right, the current
project version seems to be 2.0.2 (vs. 1.3 Ubuntu version). I could give
this a try. Thanks for the hint!
====================
For Ubuntu 13.04, it seems that the same problem will persist. Does
anyone have a hint how to circumvent this problem?
There's been some changes in Ubuntu regarding NVIDIA drivers
and running programs on them, mostly related to CUDA,
but maybe they've changed something relating to OpenCL:
https://bugs.launchpad.net/bugs/950963
You might want to look at this bug, and related ones.
AFAIK, CUDA does not affect OpenCL or did I misunderstand their
relation? (I'm fairly new to this topic.) Yes, Ubuntu 13.04 does include
an updated version of nvidia-current, however, from what I found on the
net, it still does not seem to support OpenCL 1.2 :/ .
thanks a lot for your response and best regards
Alex
_______________________________________________
PyOpenCL mailing list
[email protected]
http://lists.tiker.net/listinfo/pyopencl