Reduction Algorithm (SUMS) .. segmentation fault

Hi All,

I am testing a program that I developed using some code online. The CUDA code does a sum of 16 values, well, at least it is supposed to. I have tried debugging the code over and over again, but cannot get it to produce the sum of 16 values ( 0 … to 15) . It either gives me a segmentation fault or a “Cuda error in file ‘’ in line 172 : unspecified launch failure” … Please help me debug this code,