regarding Shared mem

if each MP has at most 16K, since a Block run on only one MP then it has at most 16K .
But if my kernel allocate static shared of 17K , is it cause a problem? should I allocate at most 16K?(I ask that because I m using 9600GT that has total of 128K for 8 MP)

What is the diffrence between static and dynamic Shared mem? what and when its better to use each of them?

Thanks
Miki

If your kernel attempts to use more than 16kB of shared memory (actually a little less, because some of the shared memory is used for block parameters like gridDim and blockDim), you will get a launch failure when you try to call it.

You only need for dynamic shared memory in situations where the amount of shared memory required for your algorithm depends on the inputs to your kernel. If every single call to your kernel requires the same amount of shared memory, there is no need for dynamic allocation.