too many resources requested for launch

I get the following error.

cutilCheckMsg() CUTIL CUDA error: Kernel execution failed in file <…/…/…/…/grid/gplacer/pswap.cu>, line 1023 : too many resources requested for launch

I checked the amount of resourced consumed and it is. It uses 256 threads.

[codebox]ptxas info : Compiling entry function ‘Z11netCoreTestPiS_S_S_S

ptxas info :Used 16 registers, 5696+3648 bytes smem, 36 bytes cmem[1] [/codebox]

I’m running on a GTX280 (compute capability 1.3).

My machine is: 2493.76MHz Intel® Core™2 Quad CPU Q9300

uname -a gives:

Linux hagrid.eecg 2.6.24-etchnhalf.1-amd64 #1 SMP Tue Oct 14 03:11:45 UTC 2008 x86_64 GNU/Linux

I’ve been playing around to get it to work. If the kernel uses instead

[codebox]ptxas info : Compiling entry function ‘Z11netCoreTestPiS_S_S_S

ptxas info : Used 16 registers, 3648+2624 bytes smem, 36 bytes cmem[1][/codebox]

Then it has no error. Unfortunately, I need to use a lot more shared memory than this.

I’m using this driver: NVIDIA Driver for Linux (SLED) 185.18.14.

If anyone has any ideas, thanks in advance!

Unless I’m mistaken I have 16k of shared memory. And according to nvcc I’m using about 8k.
Does anyone know exactly why there’s a +3648 for the shared memory?

My mistake. I was declaring (statically) shared memory. On top of that in the kernel launch I was allocating dynamic shared memory (which I thought was the allocation for the static). So I double allocated.

It works now that I set the dynamic shared memory to 0.