On Samstag 21 November 2009, you wrote:
My name is Andrew, I'm PhD student at Voronezh
Russia. I was trying to play with your library PyOpenCL and found that
it crashes whatever example I ran. To investigate this problem I
compiled debug version of PyOpenCL (see attached siteconf.py) and run
it under debugger. After running examples/demo.py under debugger,
there was exception 'vector iterator not dereferencable' at the line
2237, wrap_cl.hpp. It seems that we cannot use constructions like
&event_wait_list.front() for empty vector due to the fact that
vector::front method dereference a begin iterator, which was invalid
in my case. To fix this problem I change all such constructions to
following: event_wait_list.empty( ) ? NULL : &event_wait_list.front().
After this change, all samples started to work perfectly.
Can you integrate this fix into future release of PyOpenCL? It can
safe a lot of time for all people which will face with same problem. I
attached modified wrap_cl.hpp.
Good catch! Thanks for the patch, I've integrated it into PyOpenCL's git tree.
It'll be in the next version. You may want to consider joining the PyOpenCL
mailing list, here:
This is usually the best place for patches and such. I've cc'ed the list on