I noticed a strange behavior; the OpenCL JIT compiler exited badly giving only the word “Aborted” as an error message.
The code was compiling and running smoothly before rewriting it to use 8 components vectors instead of 4 components ones… trying to debug it I discovered that the problem is “one function” since this code is perfectly working:
I don’t know if I can help specifically, especially since I don’t have you code, but the pow() function works for the code below.
__kernel void square (__global int* a, int iNumElements)
{
// find position in global arrays
int iGID = get_global_id(0);
// bound check (equivalent to the limit on a 'for' loop for standard/serial C code
if (iGID >= iNumElements)
return;
// process
a[iGID] = pow((float)a[iGID], 2.0f);
}
And I use the following to print out errors whenever something does not compile. Have you tried the build logs to see exactly why the JIT is failing, or is that what you mean by error message?
In this way the code is working fine also for me… defining “a” as an array of float4 is working too, but not defining “a” as an array of float8…
I have a similar code to printout error messages from the JIT compiler, but my program never reach the “cout”, it simply terminates and print “Aborted”…