The Khronos Group - a non-profit industry consortium to develop, publish and promote open standard, royalty-free media authoring and acceleration standards for desktop and handheld devices, combined with conformance qualification programs for platform and device interoperability.

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Run-time error in clBuildProgram(-11)

Currently in my Fedora 13 Linux system I have two Nvidia cards, a 9400GT and a GTX480. I have installed AMD's ati-stream-sdk-v2.2-lnx64 in my home directory. My goal was to get OpenCL programs to run on the CPU (i7 930). I have installed the Nvidia OpenCL 1.1 compatible driver and the ATI stream v2.2 is OpenCL 1.1 compatible too. When I run the Ruby-OpenCL version of the code (0.7, also OpenCL 1.1 compatible), I can run on the CPU no problems. It's only when I try to run the C++ bindings version of my code that I start to have kernel build problems.

The C++ version of my openclinfo program sees the CPU as a valid OpenCL device and responds that it is a 1.1 capable device. But when it tries to build the kernel I get the following error:

$ ./opencl-ifs
Devices found - 1
Error in clBuildProgram(-11)

Which is the CL_BUILD_PROGRAM_FAILURE error. I have set the $ATISTREAMSDKROOT environment variable and it points to the directory where I installed ati-stream-sdk-v2.2-lnx64. All of the ATI and Nvidia ICDs are installed in the /etc/OpenCL/vendor directory. I have tried to compile the program with two different g++ commands. The first is using the Nvidia includes and lib, the second is using the ATI includes and lib. At least I think that is what is happening, either way they both die with the same error. It's almost like the OpenCL lib isn't picking up the correct libs?

I'm not sure if it would be a problem with the arguments, given that this code works fine on the GPU. I tried to set up the build log code, but I had trouble converting it to C++. It doesn't appear that the C++ bindings will allow this:

I'm getting an error when I try to compile it. I'm new to C++ so it's probably something I'm doing wrong even though it looks like that is what it wants per the spec? Here is the compile error I'm getting:

So I removed the pragma from my kernel code and it was able to run. My only question is, what happened? Why does the pragma difference between the GPU and the CPU matter? I'm still really fuzzy on the ICD stuff, does anyone know a good reference for it? Thanks again,

Re: Run-time error in clBuildProgram(-11)

Re: Run-time error in clBuildProgram(-11)

You just don't have to think about it, it's automatic

When you call clGetPlatformIds, you get all the ICD compliant platforms, because OpenCL.so/dll is a small piece of code (writen by I guess, by the khronos group) that read the ICD Loader Vendor Enumeration (/etc/OpenCL/vendors or windows registry), to retrieve OpenCL vendor implementation (for example nvcuda.so/dll or atiocl.so/dll).

If you want to write your OpenCL implementation, you'll have to follow the ICD spec.