I have a piece of code which behaves differently if I turn optimization (-fast) on (infact, it crashes). I would like to be able to selectively blank out which bits of code are being optimized in order to find the offending code.
I can disable loop unrolling and vectorization using:
!pgi$r nounroll !pgi$r novector
However there are still a bunch of optimizations I’d like to disable (I am not quite sure what some of them do):
1. FUNCTION reduction inlined 2. Memory zero idiom, loop replaced by call to __c_mzero8 3. Memory set idiom, loop replaced by call to __c_mset8 4. Memory copy idiom, array assignment replaced by call to pgf90_mcopy8 5. Copy in and copy out of X in call to Y
Can anyone tell me which are the directives to prevent these optimizations, effectively meaning that I can remove “all optimization” on a routine by routine basis?