is there any possibility to completely turn off those optimizations, that produce the “value optimized out” errors when printing a variable while debugging with cuda-gdb? I tried
nvcc -g -G -O0 -Xcicc -O0 -Xptxas -O0 -maxrregcount 0
an I wrote “volatile” before every variable declaration in the code but I’m still getting “value optimized out” in the debugger. Is it correct, that this message appears because the variable value isn’t “live” (= stored in registers)? And how can I prevent the compiler from storing variable values in registers then?
Thx in advance