I am just trying to use pgfortran to compile a program for which I have used gfortran to compile in the past. When I ran the program I noticed I was getting both incorrect and NaN output. This was using these compiler flags:
pgfortran -Minfo=ccff -fast
When I recompiled without the ‘-fast’ option, the answers come out corect and identical to the gfortran compiled code.
I am using the 14.3 release.
Any ideas what might be causing this would be great thanks. I am just going to try and change to using double precision rather than single to see if that makes any difference to the output.
EDIT: I replaced -fast with its individual components as follows:
-Mflushz -Mnoframe -Mlre -Mpre -Mcache_align -Mvect=simd -Munroll=c:1 -O2
I tested each flag and found that the last two, -Munroll=c:1 and -O2 each cause the incorrect values and NaN values, all the other flags are fine without either or both of those two. -O1 seems to work fine too.
Any help on the issue would be great, thanks.