different result with intel and pgi workstation

I use the exactly same code and same input parameters on intel workstation and pgi, but I get a different result and the result of pgi is always less than that of intel. I already tried -pc -Kieee etc. these flags, which don’t work. So, can everybody give me any idea about that? thanks

Hi bcsung,

What flags are you using for both compilers?

  • Mat

Hi mat,
these are the flags from two compilers
in intel:-O3 -fpp -xP -ip -ipo -pad -static -fno-alias -warn -stand
in pgi: -O3 -fastsse -Kieee -pc 64 -Mpreprocess
Thanks for your help

Hi bcsung,

Just to make sure I’m understanding you correctly, your original post means that you think the Intel results are correct while those obtained using PGI are incorrect?

In general, Intel is more aggressive at high optimization and will favor speed over accuracy. PGI is in general more conservative and will favor speed only when it does not sacrifice too much accuracy especially when the -Kieee flag is used.

What I’d like you do is rerun using the “-g” flag for both compilers and then “-fastsse -Mfprelaxed -Mipa=fast,inline” for PGI. Next add “-fp-model precise” to the Intel flag set.

The first is to see the result you get without optimization. The results should be the same for both compilers.

The second is the equivalent PGI flag set to the Intel flags you’re using. It favors speed over accuracy.

The third is Intel’s equivalent of our -Kieee flag and should get you more accurate results.

  • Mat

Thanks, Mat. I will check them to see the results

Hi Mat,

I tried these flags you told me, but the result is almost the same as before. So, maybe it’s the code itself not the workstation that caused the problem.
I checked the code and found a binary function ishft(a,b). I tested it on two workstations and found that the result on the pgi was wrong while b is negative. Can you tell me about the function in pgi workstation? Thanks

Bcsung

I checked the code and found a binary function ishft(a,b). I tested it on two workstations and found that the result on the pgi was wrong while b is negative. Can you tell me about the function in pgi workstation?

Can you post a reproducing example or send a report to PGI Customer Service (trs@pgroup.com)?

Thanks,
Mat