0

I am running ovencv opencl codes on an arm architecture. I have a two cpp files that I compiled and copied the object file to arm machine so that I can run the object file on arm. The program stops while calling executing kernel and got timeout. Opencv has some wrapper function to execute kernel, to set kernel arguments etc. These functions are defined in modules/ocl/src/initialization.cpp file. I would like to know which function is causing the error. So I want to have some printf statements inside the initialization file so that I can track the function. I added some lines and recompile opencv but when running my program on arm nothing printed from initialization file. Does anyone know how I can make initialization file to print something?

Javier
  • 12,100
  • 5
  • 46
  • 57
Luniam
  • 463
  • 7
  • 21
  • What OpenCL architecture are you targeting? Some of them don't support printf: http://stackoverflow.com/questions/5782388/printf-function-doesnt-work-in-opencl-kernel – Taj Morton Sep 26 '13 at 18:48
  • I am not printing from kernel. I am printing from CPU codes. Initialization.cpp executes on host like any cpp function. So, that should not be a problem but I could not print. – Luniam Sep 26 '13 at 18:57
  • 1
    Ooh I totally missed that. Sometimes `printf()` can be buffered. Have you tried printing to `stderr` with `fprintf()`? `fprintf(stderr, "I will print without buffering!\n");` – Taj Morton Sep 26 '13 at 19:02
  • I tried in normal linux machine and could print everything from initialization file. I am not sure why it is not printing anything when I transferred them to arm machine. – Luniam Sep 26 '13 at 23:10

0 Answers0