That did it, thanks.
Now I'm getting this:

*Traceback (most recent call last):*
*  File "demo.py", line 10, in <module>*
*    platform = cl.get_platforms()*
*pyopencl.LogicError: clGetPlatformIDs failed: platform not found khr*

>From what I can gather, it seems like it could be a problem with my video
card using Optimus?  (
http://stackoverflow.com/questions/10776230/getplatformids-returns-1001-even-though-nvidia-icd-exists-and-contains-libcu
)

Is there a workaround for this?


On Wed, Nov 21, 2012 at 1:18 PM, Andreas Kloeckner
<[email protected]>wrote:

> Hi Daniel,
>
> Daniel <[email protected]> writes:
> > I'm trying to compile in Fedora 17, and finally managed to do it after
> some
> > adjustments.  However, when trying to run examples/demo.py
> >
> >   File "demo.py", line 1, in <module>
> >     import pyopencl as cl
> >   File
> >
> "/usr/lib64/python2.7/site-packages/pyopencl-2012.1-py2.7-linux-x86_64.egg/pyopencl/__init__.py",
> > line 4, in <module>
> >     import pyopencl._cl as _cl
> > ImportError:
> >
> /usr/lib64/python2.7/site-packages/pyopencl-2012.1-py2.7-linux-x86_64.egg/pyopencl/_cl.so:
> > undefined symbol: clCreateSubDevices
> >
> > I thought that maybe I had compiled with opencl 1.1 and it turned out I
> had
> > (kind of, I had a mixture of files from khronos).  So I downloaded only
> the
> > 1.2 files and recompiled (by untaring again) but I still get the same
> > error.  I'm not sure if the error comes from my previous installation, or
> > if there is something else that I'm doing wrong.
>
> Solution: Add
>
> CL_PRETEND_VERSION = "1.1"
>
> to siteconf.py.
>
> Problem: If you feed PyOpenCL headers for CL 1.2 and then compile
> against an ICD loader that doesn't implement 1.2 functions
> (e.g. clCreateSubDevice), then you get this breakage. The above fixes
> that, by forcing PyOpenCL to ignore 1.2.
>
> Andreas
>
_______________________________________________
PyOpenCL mailing list
[email protected]
http://lists.tiker.net/listinfo/pyopencl

Reply via email to