CUDA Toolkit samples: Particles

Hi everyone!

I have started learning CUDA and am trying to modify the Particles sample included in the toolkit. The way it is programmed is quite complicated to me and I am trying to simplify it.

–I have found the section where the interaction of the particles is coded using DEM method: particles_kernel_impl.cuh

It is one of the few parts I can understand what is going on. I tried to modify some lines to see the result but it seems that the program runs independently of that section as I tried the weirdest things that came to my mind to see unusual interaction between the balls. I even once deleted all lines but the code did not care!

Can anybody explain or help me with this problem?
Thanks

you can insert printf statement here to check whether control reaches this point

Thank you for your response

I did it. This is the error I came across but the code runs anyway!:

“Error 1 error : calling a host function(“printf”) from a device function(“collideSpheres”) is not allowed c:\programdata\nvidia corporation\cuda samples\v6.5\5_simulations\particles - copy\particles_kernel_impl.cuh 226 1 particles”

I also altered the relative position calculation but didn’t see the effect!