PGI 6.0 to 6.1: Mnoscalarsse and optimization

We’ve recently upgraded from pgi 6.0 to 6.1 on our Intel Xeon workstations. As noted in the release notes, we do see numerical differences in the output of programs as a result of the compiler upgrade. Adding the -Mnoscalarsse and removing the -O2 optimzation option does ellimate the numerical differences. However, removing optimization is not the ideal solution. Is there a set of compiler options that can be used in 6.1 to mimic -O2, while producing the same results as we would expect from PGI 6.0?

Thank you,
Matthew Johnson

Hi Matthew,

What your seeing with and with “-Mnoscalarsse” is the difference between using the 80-bit X87 floating-point operations versus SSE floating-point operations. We’ve supported the faster SSE operations for some time via the “-Mscalarsse” and “-fastsse” flags, but as you found out, we recently changed the default behavior to use SSE instead of x87 on those systems which support SSE. This can change can cause some numerical differences in your results. We do have a FAQ page which discusses this issue in more depth.

For your specific case, are the numerical differences large? I would expect some differences between 6.0 compiled with “-O2” and 6.1 “-O2 -Mnoscalarsse”, but the differences should be small. Do the answers become more consistent if you add “-Kieee” to both compilations? (Note that the 6.0 answers will change, but I would expect the answers to become more consistent.).