We have an OpenCL program that works fine on my OS X machine. We just set up a machine with a Xeon Phi and Intel MPSS. However, even when not using the Phi but the Xeon CPU, the CL_PROGRAM_BUILD_STATUS
we get is CL_BUILD_NONE
.
Unfortunately, we cannot find any documentation on what might cause CL_BUILD_NONE
. Do you have any suggestion on how to debug this?
Thank you in advance!
Versions:
[@memphis:~] $ cat /etc/SuSE-release
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 2
[@memphis:~] $ uname -a
Linux memphis 3.0.13-0.27-default #1 SMP Wed Feb 15 13:33:49 UTC 2012 (d73692b) x86_64 x86_64 x86_64 GNU/Linux
[@memphis:~] 1 $ rpm -qa |grep intel
intel-mic-2.1.6720-15.suse
intel-mic-mpm-2.1.6720-15.suse
opencl-1.2-intel-mic-3.0.67279-1
intel-mic-sysmgmt-2.1.6720-15.suse
intel-mic-kmod-2.1.6720-15.3.0.13.0.suse
intel-mic-gdb-2.1.6720-15.suse
intel-mic-flash-2.1.386-3.suse
intel-mic-cdt-2.1.6720-15.suse
opencl-1.2-intel-devel-3.0.67279-1
intel-mic-micmgmt-2.1.6720-15.3.0.13.0.suse
opencl-1.2-intel-cpu-3.0.67279-1
intel-mic-gpl-2.1.6720-15.suse
intel-mic-crashmgr-2.1.6720-15.suse
Found it. I am not sure why I had
&ret
(cl_int
return value) as the last parameter instead of having it as the return value ofclBuildProgram
. Moving it and setting the last parameter to NULL fixes the problem:I do understand why this problem occured - apparently the compiler / the OpenCL libraries understood that I wanted to use
pfn_notify
and asynchronously build my kernel. I am, however, not sure if this behavior is fully conformant to the OpenCL documentation:In my code, the
pfn_notify
argument was actuallyNULL
, however user_data was (erroneously) not. While my code didn't make any sense, I believe that user_data should be ignored whenpfn_notify
isNULL
.I posted this on the Intel forums to see if they agree with my interpretation of the documentation.