Inconsistent Results with Different Versions of PGI Compiler

Dear Support,

We’ve been using the PGI compiler for quite sometime to compile our MPI application. We’ve been using version 7 since 2007 and we are happy with it even on our newer Intel Nehalem nodes.

We just moved recently to compiler 10.9 and we are having problems.

On the same Intel Nehalem node, if we use the older 7 compiler we get correct results. With 10.9 we are getting wrong results.

We are using the below flags for compilation:

mpif90 -V -w -Kieee -Mextend -pc 64 -Mbyteswapio -Mnoopenmp -Mpreprocess  -Mvect=nosizelimit -DLinux -DPORTLAND

On thing we noticed with 10.9 is that it detects the target processor as nehalem-64 during compilation. On 7 we don’t see any feedback during compilation about the target processor being detected:

PGI 10.9

pgf90 10.9-0 64-bit target on x86-64 Linux -tp nehalem-64

PGI 7

pgf90 7.0-2 64-bit target on x86-64 Linux

We thought it could be an issue related to Nehalem optimization, so we tried setting the flag “-tp px-64” to produce a generic x86-64 binary, however this didn’t help and we were still getting the wrong results. We also tried using “-tp x64” and it didn’t help either.

I would really appreciate any help or suggestions on this, are there any flags or environment variables to be used specifically with Intel Nehalem processors with the newer versions of the compiler?

Thank you for your help.

Hi Mohamed,

There are a number of reasons why this could be happening, though my first thought is that it’s related to vectorization. Vectorization can change results and if we are vectorizing more loops, it’s possible that this is the cause.

What happens if you compile without optimization? (i.e. replace “-Mvect=nosizelimit” with “-O0”). Next try with “-O2”.

With 10.9 we are getting wrong results.

How wrong are the results? Are they within a relatively small tolerance?

On thing we noticed with 10.9 is that it detects the target processor as nehalem-64 during compilation. On 7 we don’t see any feedback during compilation about the target processor being detected:

Yes, release 7 doesn’t recognize Nehalem and is targeting a generic x64 system.

We thought it could be an issue related to Nehalem optimization, so we tried setting the flag “-tp px-64” to produce a generic x86-64 binary, however this didn’t help and we were still getting the wrong results

This is good to know since it rules out new hardware instructions.

Best Regards,
Mat