Reputation: 780
If I accidentally reference a non-existant function in my OpenCL kernel, even if i fix the problem the compiler acts as if i hadn't. For example.
__kernel void doSomething(__global unsigned int *array){
f(array)
}
Clearly f doesn't exist and i will get an error. However if i write the f method, the compiler continues to give this error.
Exception in thread "main" org.jocl.CLException: CL_BUILD_PROGRAM_FAILURE
Build log for device 0:
kernel referenced an external function f, that could not be found.
No matter what i change, i can delete the bodies of any kernels so that the .cl final literally holds no code, and the compiler still results in this error. Even making a new file and copying the contents into it, or changing the program parameters or name has no effect. I'm stuck with this bug. Restarting the computer doesn't work either.
Edit
I am running this on a MacBook Pro, version 10.9
Upvotes: 0
Views: 556
Reputation: 74596
I had a problem with OpenCL caching code in the past and this solved my problem.
// Setting this environment variable forces the OpenCL
// source code to be recompiled every time.
setenv("CUDA_CACHE_DISABLE", "1", 1);
Of course, this is only relevant if you're using an NVIDIA platform.
Upvotes: 1