Cannot increase size of 2 Dimensioanl array from 355*355


I am having this strange problem. I am solving heat equation by Finite Difference scheme. For that I made a 2d array of size N*M. The code works well upto N=355 M = 355.but when i increase these values to 356, the execution fails. And I also want to ask that Does Parallel Nsight2.1 first execute the complete code and then debug it? Because when i tried to debug the code with having breakpoints at the starting of the program at main() statement and at the starting of device kernel, the Nsight debugger does not stop there and hangs. I am attaching the code below…
my system information is

CPU: Intel xeon 2.0Ghz
RAM: 6Gb
CUDA: Tesla T10 Processor
Parallel Ngight: 2.1 (2.97 KB)