Error with nVidia, not ATI (Code selection failed to select, i1: add)

Discussion created by omgi on Jun 28, 2011
Latest reply on Jun 28, 2011 by MicahVillmow

I have a problem that only occurs on nVidia platforms. I have managed to trace the problem to a certain piece of my code, i.e. the calling of two functions. The code works under all circumstances on my ATI card, and fails at the same time/place on two nVidia cards. The error arises during the build of the kernel. The strange thing is, that when I greatly reduce the amount of calculations in the functions (less terms in the return statement - see next post for code), it might work some times. If i reduce the calculations slightly but reduce other calculations outside the two functions, it might work too.

Worthy to note is that the code worked when the vectors that the functions operate on are private memory. The error started to occur when I implemented work groups and made the vectors that it operates on to local (this still works on ATI).

I tried updating drivers. I use PyOpenCL and have tried different versions of it. The error still occurs.

Error Message:

Traceback (most recent call last): File "", line 79, in <module> [energy,standardDeviation,acceptanceRate,runTime, binCounts] = getOperatorMean(systemClass, RP, systemOp) File "src/", line 106, in getOperatorMean KE = loadKernel(system, BP, operator) File "src/", line 303, in loadKernel File "/usr/local/lib/python2.6/dist-packages/pyopencl-2011.1.1-py2.6-linux-x86_64.egg/pyopencl/", line 447, in build cache_dir=cache_dir) File "/usr/local/lib/python2.6/dist-packages/pyopencl-2011.1.1-py2.6-linux-x86_64.egg/pyopencl/", line 421, in create_built_program_from_source_cached ctx, src, options, devices, cache_dir) File "/usr/local/lib/python2.6/dist-packages/pyopencl-2011.1.1-py2.6-linux-x86_64.egg/pyopencl/", line 346, in _create_built_program_from_source_cached, [devices[i] for i in to_be_built_indices]) File "/usr/local/lib/python2.6/dist-packages/pyopencl-2011.1.1-py2.6-linux-x86_64.egg/pyopencl/", line 164, in program_build raise err pyopencl.RuntimeError: clBuildProgram failed: build program failure - Build on <pyopencl.Device 'GeForce GTX 470' at 0x251cb70>: Error: Code selection failed to select: 0x2ae6010: i1 = add 0x2b73120, 0x2b6e9e0