Go to main content
Oracle® Developer Studio 12.5: Numerical Computation Guide

Exit Print View

Updated: June 2016
 
 

5.4 Compilation Options

Oracle Developer Studio 12.5 compilers accept many options that affect code generation. The following list highlights certain code generation options that are not valid for all programs. In the case of large programs written by many authors over many years, it is often the case that nobody can say with certainty which code transformations do and do not adversely affect the logic of the program, and so the following must be used with care.

–fast

Macro for many different generally useful transformations. It is easier to remember –fast than all its constituents. The definition of –fast varies from release to release. Not all its transformations are legitimate for all programs. If –fast is used, it might be followed by additional options that undo some of its effects, e.g. using –fast –fsimple=0 –fns=no –xvector=no to disable three options discussed below. Compiling with –dryrun is a good way to see which options are actually enabled by a particular compiler's command line options.

–fsimple

Permits certain simplifying assumptions about floating-point modes, exceptions, and roundoff that are not true for all programs. The compilers use these assumptions to justify various value-changing transformations, which vary between releases.–fsimple=0 is the default and is safest. –fsimple=1 is safe for many programs and –fsimple=2 is risky for many. Simply testing program execution with a few inputs is not sufficient to verify suitability of –fsimple=2. Its effects might be beneficial for some input data and not others.

–fns

Does not affect code generation but causes programs to begin execution with nonstandard underflow mode enabled. This is contrary to the IEEE standard and so nonstandard results might be obtained, including invalid results and infinite loops. Many programs run the same no matter how underflow is handled. These programs might run faster with –fns if the run-time hardware is slower for standard underflow. Recent SPARC servers have no performance advantage for nonstandard mode.

–ftrap=common

Does not affect code generation but causes programs to begin execution with traps enabled for overflow, division by zero, and invalid IEEE exceptions; this is contrary to the IEEE standard and might cause early termination of programs that depend on nonstop IEEE exception handling. –ftrap=none is the default for C, C++, and F77, but not F95.

–fnonstd

Macro for –fns and –ftrap=common.

–xvector

Used to enable vector math library transformations with –xvector=lib, and SIMD transformations with –xvector=simd. –xvector=lib will change numerical results as slightly different vector-oriented libmvec implementations of common elementary transcendental functions are used instead of the libm versions. These vector versions assume default rounding is in effect.

–xreduction

Enables a broader range of program loops to be parallelized when parallelization is enabled with –xautopar or –xopenmp. Reduction operations are those like summing a vector or computing the dot product of two vectors; the sums can be taken in any order in exact arithmetic, but will produce slightly different results in finite precision floating-point arithmetic. Indeed, the order of accumulation might not even be deterministic and so results might vary slightly from run to run even with the same program and same data and same hardware.

See the man pages and user's guides of each compiler for more information.