I am trying to run an executable that uses an OpenCL code to render an image.
In compilation, it does not give any error, but when I run the executable, it returns the error number “-44” from the function clBuildProgram():
Input: ./clrenderer warp.cl
Output: failed to build program: -44
The program is written in C code. I am using a Virtual Machine with Ubuntu 18.04 and I have installed the Intel SDK as platform for OpenCL.
I attach the github link to the project I refer below: https://github.com/pimpale/c-opencl-raymarcher
Thanks in advance
llvm-dev list is probably not the best place to ask general questions about OpenCL
(unless a question is about OpenCL compiler internals). Stackoverflow or Intel
forum (since you use Intel OpenCL SDK) are better resources for this kind of questions.
Anyway, -44 is a code for CL_INVALID_PROGRAM. It means that the cl_program pointer
you pass to clBuildProgram is invalid. This is often an indication that one of the previous
OpenCL API calls failed (clCreateProgramWithSource is this case).
Make sure to always check an error code from every OpenCL API function. When you get
an error, check the OpenCL specification1 to find out a list of possible reasons.