Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

MKL in Windows / Linux

Jonathan_O_
Beginner
587 Views

Dear all,

I have developer a program in ifort for windows. The program uses cholesky decomposition (dpotrf), and for that I am using MKL. Recently I had the need to use my program on Linux so I compiled it for Linux and carried out some testing. I observed that I got a substantial difference in results and I have traced this back to the dpotrf routine. 

Long story short: All calculations in the program are consistent to the last digit (double precision) except for dpotrf. I observe the last couple of digits changing. My question is: Is there anyway to get the Windows and Linux code to deliver consistent results? 

I have tried -fp-model precise with no luck. 

Many thanks,

Jonathan

0 Kudos
1 Reply
TimP
Honored Contributor III
587 Views

This subject has been discussed at length several times on this forum.  -fp-model settings would affect only numerical differences due to your driver code, not MKL itself.  -Qimf-arch-consistency:true option could be used to avoid differences between math libraries (also outside of MKL).

You should be using -align array32byte option, as well as looking into MKL Conditional Numerical Reproducibility.  You would want the same CNR instruction set option for both.  Among the possible differences between target instruction sets, even if you set consistent alignments, might be the number of batched partial sums chosen.

Even if your problem is well conditioned, differences in the last binary bit (17th decimal place) aren't significant.

0 Kudos
Reply