EMUDEBUG AND RELEASE MODE - HELP PLEASE!

Guys, I have some issues regarding a routine that I implemented in CUDA. I get different results between EMUDEBUG and RELEASE mode. From a reference I read that : “When a memory location is accessed in multiple threads within the grid at potentially the same time, the results when running in device emulation mode potentially differ from the results when running on the device, since in emulation mode threads execute sequentially”. Actually this is what is most likely to occur in my functions. What should I do then?

If this is about reads, it’s not a problem. If it’s about writes, then you need to make your code thread safe.