Hi Alex, Alexander Kläser <[email protected]> writes: > 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: > > ==================== > 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
First of all, your problem seems to be that you've got OpenCL 1.2 headers installed, but an OpenCL library (Nvidia's) that only supports 1.1. Hence the issue. The easiest might be to install AMD's OpenCL library (and headers). That should give you 1.2 support (for CPUs), and it should also work against Nvidia's 1.1 implementation. If you're compiling PyOpenCL yourself, you can alternatively add CL_PRETEND_VERSION = "1.1" to siteconf.py. That should also address your issue. HTH, Andreas _______________________________________________ PyOpenCL mailing list [email protected] http://lists.tiker.net/listinfo/pyopencl
