Numerical precision flags

I am using -Kieee flag to ensure consistent results, however, in an OpenMP multi-threaded program I am noticing differences (some time, not always) after the 4th decimal place. Are there any other flags which I could use for strict compliance?

Here are the flags that I am using to compile my OpenMP program:

-O2 -Mpreprocess -fastsse -Mvect=noaltcode -Mipa=fast,inline -mp=nonuma -Kieee

Thanks
Sayan

Hi Sayan,

Are you using reductions or critical sections? These can cause numerical differences due to variances in the order of operations.

  • Mat

Hello Mat,

No I am not, it’s a plain code with OMP DO. If this is not evident, I will try to capture this behavior in a small piece of code and then send it to you if I find a pattern.

Thank you
Sayan

Hi Sayan,

Do you have any divides? We did have an accuracy issue that was fixed in 12.8 where residual operations after a vectorized loop within an OpenMP region gave slightly different answers then the non-vectorized version due to slight differences in how divides were performed. The flag “-Mvect=uniform” fixes this problem but may result in slight slower performance.

If this isn’t it, then yes an example code would be very helpful.

  • Mat