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

different optimization level, different output data

woshiwuxin
Novice
410 Views
Hi!
I've tried to compile a package with different optimization levels, e.g. -O0, -O1, -O2 and -O3. However, the printed numerical values are slightly different in the last several digits. It's not very significantly, but annoying. I just want to know which optimization level can generate morerobustand safer binary, if we don't consider the execution time of the binary.
Thanks!
0 Kudos
1 Reply
mecej4
Honored Contributor III
410 Views
There is no magic combination of floating point options that guarantee the best compromise between speed and accuracy for all applications and users. Read about the several available FP related options in the User Guide and try a few.

o Have you established that higher optimization levels correlate with lower accuracy?

o Can you rule out bugs in your code?

o Is it possible that the conditioning of the algorithm you used is at odds with your expectations as to accuracy?

0 Kudos
Reply