Evan Sims <wx3(a)msn.com> writes:
> I am unable to run the gl interop examples. I have pyopencl installed
> and it returns cl.have_gl as TRUE. I am using Jessie with the AMD
> proprietary drivers (I had major problems with this before, but now it
> "just works" as intended) installed from the repository and other
> examples do work. Unless I am mistaken, I installed all the packages
> using pip having started with miniconda.
What version of PyOpenCL do you have? Did you compile it yourself or did
you download a binary? Did you try the fixed version of that demo?
https://github.com/inducer/pyopencl/blob/7866408fa82b4f0b59e40f482b305d5b6b…
Andreas
I am unable to run the gl interop examples. I have pyopencl installed and it returns cl.have_gl as TRUE. I am using Jessie with the AMD proprietary drivers (I had major problems with this before, but now it "just works" as intended) installed from the repository and other examples do work. Unless I am mistaken, I installed all the packages using pip having started with miniconda.
It may be related to this https://github.com/inducer/pyopencl/issues/196
vbo.buffers[0] is not a valid accesor in Pyopengl 3.1
The solution was to change buffers[0] to buffer
It also appears related to this
https://sourceforge.net/p/pyopengl/mailman/message/32863450/
<https://sourceforge.net/p/pyopengl/mailman/message/32863450/>
Where the solution was to use int(<vbo>) instead. This could be a simple fix, but I don't know exactly what is meant by int(<vbo>)
It referes to enja.org but that is currently offline for me.
He is what I get.
python gl_particle_animation.py
Results in:
AttributeError: 'numpy.ndarray' object has no attribute 'buffer'
cl@debian:~/Downloads/pyopencl/examples$ python gl_particle_animation.py
Traceback (most recent call last):
File "gl_particle_animation.py", line 146, in <module>
cl_gl_position = cl.GLBuffer(context, mf.READ_WRITE, int(gl_position.buffer))
File "/home/cl/miniconda3/lib/python3.5/site-packages/OpenGL/arrays/vbo.py", line 277, in __getattr__
return getattr( self.data, key )
AttributeError: 'numpy.ndarray' object has no attribute 'buffer'
Segmentation fault
python gl_interop_demo.py
Results in:
pyopencl.cffi_cl.LogicError: clCreateFromGLBuffer failed: INVALID_CONTEXT
cl@debian:~/Downloads/pyopencl/examples$ python gl_interop_demo.py
Traceback (most recent call last):
File "gl_interop_demo.py", line 82, in <module>
initialize()
File "gl_interop_demo.py", line 52, in initialize
coords_dev = cl.GLBuffer(ctx, cl.mem_flags.READ_WRITE, int(vbo))
File "/home/cl/Downloads/pyopencl/pyopencl/cffi_cl.py", line 2373, in __init__
ptr, context.ptr, flags, bufobj))
File "/home/cl/Downloads/pyopencl/pyopencl/cffi_cl.py", line 649, in _handle_error
raise e
pyopencl.cffi_cl.LogicError: clCreateFromGLBuffer failed: INVALID_CONTEXT
Segmentation fault
I really would like to see this work.
Dear all,
I recently upgraded my computer from debian8 to debian9 and noticed a
"slow-down" in an application I am developing.
The basic "unit" operation used to take <1ms on a hi-end GPU (nvidia
GTX1080Ti) and is now about 8 ms.
On the same computer, with the same Python in two virtual env, I
measured with timeit for two version of pyopencl:
(2015, 2) -> 832 µs / operation
(2016, 2) -> 7.69 ms /operation
This could be related to the cffi migration but I am not sure. I may
profile further down but maybe there is already some litterature which
I was now aware of.
Did you notice anything similar ?
--
Jérôme Kieffer
PS: I can provide the "material" to reproduce the effect if needed.
Hi all,
I've just spent a bit of time writing much better/more helpful
installation instructions for PyOpenCL:
https://documen.tician.de/pyopencl/misc.html#installation
I hope this will help make life with PyOpenCL substantially easier--if
you are a user trying to install it, or if you are a developer
distributing software based on it.
The instructions use binary packages from Conda Forge and leave
potential users not just with PyOpenCL installed, but also help them
install an OpenCL implementation (i.e. an ICD--POCL, in many cases),
using 4-5 easy, copy-pasted commands.
I've tested these instructions on Linux and OS X, and they work for
me. I'd be grateful to receive feedback and suggestions.
Andreas