My program runs well on my machine. A user is getting strange error and currently I have no idea how to debug.
clBuildProgram returns -11 which indicates CL_BUILD_PROGRAM_FAILURE.
Call clGetProgramBuildInfo with CL_PROGRAM_BUILD_STATUS, it returns CL_SUCCESS and the build status is CL_BUILD_SUCCESS.
Call clGetProgramBuildInfo with CL_PROGRAM_BUILD_LOG, it returns CL_SUCCESS and the log is pasted below:
Compilation started
1:817:22: warning: array index -1 is before the beginning of the array
1:315:5: note: array 'event' declared here
1:884:20: warning: array index -1 is before the beginning of the array
1:315:5: note: array 'event' declared here
1:1095:40: warning: use of logical '||' with constant operand
1:1095:40: note: use '|' for a bitwise operation
1:1095:69: warning: use of logical '||' with constant operand
1:1095:69: note: use '|' for a bitwise operation
1:1109:42: warning: use of logical '||' with constant operand
1:1109:42: note: use '|' for a bitwise operation
1:1109:69: warning: use of logical '||' with constant operand
1:1109:69: note: use '|' for a bitwise operation
1:1372:71: warning: use of logical '||' with constant operand
1:1372:71: note: use '|' for a bitwise operation
Compilation done
Linking started
Linking done
Device build started
Device build done
Kernel <sim_iterate> was not vectorized
Done.
As the build log says, compilation & linking are done without any error. So what could be the problem?
The device is Intel(R) Core(TM) i3-3240 CPU @ 3.40GHz.
array index -1 is before the beginning of the array? - doqtor_event_t* p = &event[-1];so I can replaceevent[i-1]withp[i]. Compilers are complaining about this but I don't think this is an error. The definition of the subscript operator[]is thatE1[E2]is identical to(*((E1)+(E2)))(C99 6.5.2.1) - Aean