CUDA Code gives n4_disp BSOD

Hello all,

I have been trying to figure out why when I run my CUDA code (I cut it down a bit and is attached), my computer gives me infinite-loop nv4_disp error (Blue Screen Error). It gives it ONLY if I uncomment the line thats mentioned in tmp_kernel.cu (attached) (line 37). I am thinking it might be because of some sort of memory leak.

best_fit is a variable I want to have multiple threads access during runtime and I wasn’t sure if there is some read-write violation I am not taking into account but I don’t think this is the reason I get the infinite loop error

I am quiet new to CUDA and a beginner C programmer so I apologize for any inconvenience.

Thanks.
tmp_kernel.cu.txt (1.21 KB)
tmp.cu.txt (3.26 KB)

I think I figured it out. For those of you wondering, it seems adding a CUT_CHECK_ERROR and proper error handling solved the problem.

Also, this blog entry mentions that having too many blocks than allowed for your card can result in the same error: http://shatterednirvana.wordpress.com/2007…hods-with-cuda/

Thanks.