Optimization /Od /O1 /O2 /Ox Problem with Optimization Option in CUDA

By far, I have tested my code while Optimization in CUDA options has been /O2 (Maximize speed). I had no problem and also I have verified the results.
But when I disabled the Optimization (/Od), my code stopped working. The other way would be more reasonable!

By far, I have tested my code while Optimization in CUDA options has been /O2 (Maximize speed). I had no problem and also I have verified the results.
But when I disabled the Optimization (/Od), my code stopped working. The other way would be more reasonable!

The problem might be due to WDDM TDR (Timeout Detection and Recovery of GPUs through WDDM) for Vista and Win7. Windows, by default, wait 2 sec to get any response from the program. My code probably takes more than 2 sec when in /Od mode. I am going to change that option to see the result

The problem might be due to WDDM TDR (Timeout Detection and Recovery of GPUs through WDDM) for Vista and Win7. Windows, by default, wait 2 sec to get any response from the program. My code probably takes more than 2 sec when in /Od mode. I am going to change that option to see the result