Kernels fail if they take too long

Hey there,

It seems as though if a kernel takes too long, the clEnqueueReadBuffer function returns CL_INVALID_COMMAND_QUEUE.

You can recreate this bug by changing the code for VectorAdd.cl from this:

[codebox]// add the vector elements

c[iGID] = a[iGID] + b[iGID];[/codebox]

To this:

[codebox]for(int runCount=0;runCount<10000;runCount++)

{

// add the vector elements

c[iGID] = a[iGID] + b[iGID];

}[/codebox]

If you do this, the VectorAdd example fails. You can do something similar for the other examples and make them fail.

Is there a time limit on clEnqueueReadBuffer before it will return -36? Is there a way to adjust this time limit?

Also, when I add that for loop, my screen goes black for a second and I get a windows popup saying my NVIDIA adaptor failed but then came back online. Is there a general rule that kernels should not take more than ms to process?

Jason Gauci

Evolutionary Complexity Research Group

University of Central Florida

This is discussed many times before, search the (whole) forum for “watchdog”.

I thought the watchdog issue was only in windows? I’m running OS/X

No, it will occur on OSX as well.

The watchdog also applies to Linux if you are running X11 on the card.