John Twilley <[email protected]> writes:

> First, my setup:  I'm running pyopencl out of git (last update Nov 27) on
> an Ubuntu 12.04.1 LTS system with CUDA 5.0 and an NVIDIA GTX 560 Ti
> graphics card.
>
> I have no problems running the examples, and I have written some nearly
> trivial code that works just fine as well.  When I move on to more
> sophisticated solutions, I get the dreaded "out of resources" result which
> really means I have a segmentation fault or something in my code.
>
> My normal mode of debugging problems like this is to use a whole lot of
> printf statements.  That approach doesn't work with OpenCL for obvious
> reasons.  How do you guys debug your OpenCL code if you can't use printf?

Easy fix:

Step 1) Grab/install one of the CPU OpenCL implementations.

- http://software.intel.com/en-us/vcsource/tools/opencl-sdk
- 
http://developer.amd.com/tools/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/#two
- https://bugs.launchpad.net/pocl (if you're feeling lucky)

(The Intel one is better, IMO.)

Step 2) Use printf.

Also note that printf will become much more widespread as it's now part
of the CL 1.2 standard.

HTH,
Andreas


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

Reply via email to