Hello,

I have run across a quite strange problem with getting data from OpenCL
device. Currently it is Intel CPU, but the problem seems to persist also on
nVidia GPU.

The thing is that figures in OpenCL code which are written to output arrays
differ significantly from ones received on host-side. There is a graph
illustrating the situation: http://ghost.net/41372977/image.png (black line
corresponds precisely to theoretical one). I thought about it being a
synchronization issue in device code, but I have put barriers in almost all
suspicious places.

Here is Python code which fills the buffers (maybe the problem is in wrong
buffer parameters):
https://github.com/yl3dy/Plasma-Particles/blob/master/model/opencl.py#L33
And here is OpenCL code:
https://github.com/yl3dy/Plasma-Particles/blob/master/cl/main.cl#L6
Basically, it accepts 4 main arrays (2 for electrons, 2 for ions), and
device performs 2 iterations on itself, swapping pairs of arrays. After
that the control is returned to host, and it writes 1 electron and 1 ion
arrays to disk.

Versions and soft: Arch GNU/Linux x86_64, Python 2.7.3, PyOpenCL 2012.1,
Intel OpenCL SDK 2012, nVidia drivers 304.60 and GPU toolkit 5.0.35.
Hardware: Intel Core i5-2410M, nVidia GeForce GT 540M.

So how to fix the output?

Regards,
Alex
_______________________________________________
PyOpenCL mailing list
[email protected]
http://lists.tiker.net/listinfo/pyopencl

Reply via email to