Extern __shared__ memory size limited to 64

Hi Guys,

I try to use sth like extern float shared sdata;
but if I assign memory larger than 64 I get

Signal name : CUDA_EXCEPTION_5
Signal meaning : Warp Out-of-range Address

does anyone have idea how to use extern shared correctly? Thanks in advance

A common error is to forget to provide the necessary allocation at kernel launch time:

my_kernel<<<grid,block,size_of_shared_memory_in_bytes>>>(...);
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

this example shows proper/improper usage of extern __shared__ memory.

Thanks Robert, thats what I exactly did. However I got this warp out of range error. Have you ever had this problem?

Nope. Not with properly designed code. Maybe the warp out of range problem is due to something else (some other issue in your code, unrelated to shared memory). Or maybe you made some other mistake.