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

Accuracy with -axN and other options, e.g. -mp1 -prec_div

L__D__Marks
New Contributor II
774 Views
I am seeing subtle differences with double precision arithmetic when using the -axN option, errors of the order of 1D-16 which appear a bit large for double precision. Since I presume that this is exploiting 32 bit registers, I wonder if it is fully compatible with higher accuracy (e.g. -mp or -mp1 -prec_div togethor with -pc80-r8 -fpconstant -O3), or whether some issues might be related to flushing to zero. For reference, this appears to also happen when -mtune=pentium-mmxis used.
0 Kudos
3 Replies
Steven_L_Intel1
Employee
774 Views
I don't know what you mean by "a bit large". Double precision is a 64-bit format with a 53-bit fraction, good for typically 15 decimal digits of precision. The magnitude of the value will affect the absolute precision level.

When you use /QxN, you may get some use of the SSE2 instructions which will do arithmetic in the declared precision, rather than the 80-bit format you can sometimes get when using x87 instructions.
0 Kudos
L__D__Marks
New Contributor II
774 Views
If I have -axN (or -mtune=pentium-mmx) some values which should be zero are about 1D-16; if I do not have it I get zero.

From the sounds of your answer, the precision might be a bit lower (despite the presence of an -mp flag or -mp1 -prec_div). I have a suspicion (which I cannot fully verify at the moment since I don't have a really good test) that the -axN is over-riding some of the precision flags. Presumably one can turn off use of the registers, in which case is -axN doing anything more than -O3 (as a follow up question). The documentation does not say what -axN does in any detail.
0 Kudos
Steven_L_Intel1
Employee
774 Views
-axN doesn't "override" things, but it does cause SSE instructions and registers to be used, which won't honor such things as specifying 80-bit floats.
0 Kudos
Reply