"Titus Robroek" <ties.robroek(a)student.ru.nl> writes:
I have a pyopencl application passing along pointers for the memory buffers and the
context to a C opencl program which is called within the same python script. This worked
perfectly in a mockup dummy project, but actually implementing it within my actual library
has surfaced a roadblock.
Taking the pointer from pyopencl and passing it along to my opencl code works perfectly
fine and doesn't break anything (using copies of buffers initialised in the C opencl
code itself). Sharing the buffers to circumvent these extra memory operations breaks the
program. The buffers initialised in opencl are initialised as both read and write
My clFinish() with just my kernel queued returns an error 36:
INVALID_COMMAND_QUEUE. I've also tried sharing the command queue from
pyopencl; this doesn't change anything. I've additionally checked
both dimensionality and dtype/nbytes of my buffers. The ones
initialised in (and passed on from) pyopencl are in this sense
identical to those I made in my C code itself, in the test that does
not share the buffers (which works).
It would be good to know what architecture you are targeting, I am
suspecting you are using an Nvidia GPU. If that's the case, "invalid
command queue" is the GPU's way of telling you that your code
crashed. You can likely find further evidence of this in your (OS)
kernel log. oclgrind might be a helpful tool for debugging your code.