PGI v14.10 versus 15.7


Good Morning! I have encountered an interesting problem.

I have a program (model) executable compiled in PGI versions 14.7 and 15.10 which was executed using same inputs. The model results from run using 14.10 versus 15.10 showed considerable variation. I have switched compiler versions before for this program and never seen variation in results more than 1%.

Does any one have any idea why I am seeing this variation? Any assistance in this matter is highly appreciated.

Thank you for your time.

The way you compile and the type of CPU can have an effect.

Also this could be a problem with uninitialized variables.
local variables on older compilers may have been statically allocated,
while the newer compilers use the stack.

Add -Msave to the compile and see if the answers get close again

First compare the results at -O0, then -O1, then -O2,
then -fast, then -fast -Mipa=inline and see where the results

If they do, try adding
-Kieee ! to make sure the operations are done in the same order
the program dictates - also more precision in square root and divides.
-Mnofma ! in case fma has change results slightly.

Then see if the programs are close.