Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussions

CVF compiler setting for maximizing numerical fidelity

TommyCee
Beginner
690 Views
I now have IVF but part of the task I have involves use of CVF.  One of my big challenges is matching numerical outut via CVF (v6.6C) w/ that from IVF (v.12.1.5).  Let's focus on CVF.

I have been told that CVF settings to maximize fidelity (minimize chances for numerical differences) include the following:

     /tune:host

     /fltconsistency

     /fpe[:0-3]           (default is /fpe:3)

     /fpconstant

     /nooptimize          (choices are /optimize[:0-5])

     /notransform_loops

     /noinline

     /assume:accuracy_sensitive



Within the CVF IDE, I have been able to find all of them except /assume:accuracy_sensitive

Does anyone know where this switch might be in the CVF IDE?
0 Kudos
3 Replies
Steven_L_Intel1
Employee
690 Views
According to the CVF documentation this is under Optimizations > Allow Reordering of Floating Point Operations. Note that not all compiler options have IDE equivalents - you can always specify options under Command Line.
0 Kudos
TommyCee
Beginner
690 Views
You were right Steve.  Though the name next to the check box bears no resemblance to the switch name added to the command line.

I just tested this switch and I must disagree with the advice that it aids numerical precision.  Au contaire.

In fact, the CVF dropdown note for this switch says:
The numeric results can be slightly different because of the way intermediate results are rounded when this option is not selected.


So, don't use /assume:accuracy_sensitive is you're interested in numerical fidelity.  For numerical fidelity, the best overall command line is probably:

/assume:minus0 /browser:"Debug/" /check:bounds /compile_only /dbglibs /debug:full /fltconsistency /fpconstant /fpe:0 /nologo /traceback /tune:host /warn:argument_checking /warn:nofileopt /warn:unused /module:"Debug/" /object:"Debug/" /pdbfile:"Debug/DF60.PDB"



0 Kudos
Steven_L_Intel1
Employee
690 Views
I think you misunderstand the description.  /assume:accuracy_sensitive disables optimizations that are not value-safe, such as reassociation.  Your list of options has a lot that have no effect on "numerical fidelity" and are taken from a debug configuration.
0 Kudos
Reply