Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
E77790.pdf
Скачиваний:
2
Добавлен:
16.05.2024
Размер:
1.29 Mб
Скачать

3.3 Options Summary

Source files, object files, and libraries are compiled and linked in the order in which they appear on the command line.

3.3Options Summary

In this section, the compiler options are grouped by function to provide an easy reference. The details will be found on the pages in the following sections, as indicated.

Note that not all options are available on both SPARC and x64/x86 platforms. Check the detailed reference section for availability.

The following table summarizes the f95 compiler options by functionality. The table does not include obsolete and legacy option flags. Some flags serve more than one purpose and appear more than once.

TABLE 5

Compiler Options Grouped by Functionality

 

 

 

 

Function

 

Option Flag

 

 

Compilation Mode:

 

 

 

Compile only; do not produce an executable file

-c

 

 

Show commands built by the driver but do not compile

-dryrun

 

 

Support Fortran 77 extensions and compatibility

-f77

 

 

Do not replace a module file whose content is not changed by the

-keepmod

compilation of the associated Fortran module

 

 

 

Retains the temporary files that are created during compilation.

-keeptmp

 

 

Specify path for writing compiled .mod Module files

-moddir=path

 

 

Specify name of object, library, or executable file to write

-o filename

 

 

Compile and generate only assembly code

-S

 

 

Strip symbol table from executable

-s

 

 

Suppress compiler messages, except error messages

-silent

 

 

Define path to directory for temporary files

-temp=path

 

 

Show elapsed time for each compilation phase

-time

 

 

Show version number of compiler and its phases

-V

 

 

Verbose messages

-v

 

 

Specify non-standard aliasing situations

-xalias=list

 

 

Compile with multiple processors

-xjobs=n

 

 

Generate make dependencies

-xM

 

 

 

Chapter 3 • Fortran Compiler Options

47

3.3 Options Summary

Function

Option Flag

 

 

(Oracle Solaris) Link debug information from object files into

-xs

executable

 

 

 

Compiled Code:

 

 

 

Add/suppress trailing underscores on external names

-ext_names=x

 

 

Inline specified user functions

-inline=list

 

 

Compile position independent code

-KPIC/-kpic

 

 

Inline certain math library routines

-libmil

 

 

(x86) Save copies of register-based function arguments in the stack

-preserve_argvalues

 

 

STOP returns integer status value to shell

-stop_status[=yn]

 

 

Specify code address space

-xcode=x

 

 

Equivalent to -inline

-xinline

 

 

Manually change the heuristics used by the compiler for deciding when

-xinline_param

to inline a function call

 

 

 

Generate a report written to standard output on the inlining of functions

-xinline_report

by the compiler

 

 

 

Enable prefetch instructions

-xprefetch[=x]

 

 

Specify use of optional registers

-xregs=x

 

 

Specify default data mappings

-xtypemap=x

 

 

Data Alignment:

 

 

 

Specify alignment of data in COMMON blocks

-aligncommon[=n]

 

 

Force COMMON block data alignment to allow double word fetch/

-dalign

store

 

 

 

Force alignment of all data on 8-byte boundaries

-dbl_align_all

 

 

Align COMMON block data on 8-byte boundaries

-f

 

 

Support file sharing between little-endian and big-endian platforms.

-xfilebyteorder

 

 

Specify memory alignment and behavior

-xmemalign[=ab]

 

 

Debugging:

 

 

 

Enable runtime subscript range checking

-C

 

 

Compile for debugging with dbx

-g

 

 

Flag use of undeclared variables

-u

 

 

Check !$PRAGMA ASSUME assertions

-xassume_control=check

 

 

Check for stack overflow at runtime

-xcheck=stkovf

 

 

Enable runtime task common check

-xcommonchk

 

 

Control compression of the debug section.

-xcompress

 

 

Specify format of compression of the debug section.

-xcompress_format

 

 

Control how much debugging and observability information is emitted

-xdebuginfo

 

 

48 Oracle Developer Studio 12.6: Fortran User's Guide • July 2017

3.3 Options Summary

Function

Option Flag

 

 

Compile for Performance Analyzer

-xF

 

 

Control globalization of file static variables but not functions

-xglobalize

 

 

Keep definitions of unreferenced functions and variables

-xkeep_unref

 

 

Enable debugging without object files

-xs

 

 

Diagnostics:

 

 

 

Flag use of non-standard extensions

-ansi

 

 

Suppress named warning messages

-erroff=

 

 

Display error tag names with error messages

-errtags

 

 

Show summary of compiler options

-flags, -help

 

 

Show version number of the compiler and its phases

-V

 

 

Verbose messages

-v

 

 

Verbose parallelization messages

-vpara

 

 

Show/suppress warning messages

-wn

 

 

(Oracle Solaris) Link debug information from object files into

-xs

executable

 

 

 

Linking and Libraries:

 

 

 

Allow/require dynamic/static libraries

-Bx

 

 

Allow only dynamic/static library linking

-dy, -dn

 

 

Build a dynamic (shared object) library

-G

 

-shared

 

 

Assign name to dynamic library

-hname

 

 

Add directory to library search path

-Lpath

 

 

Link with library libname.a or libname.so

-lname

 

 

Do not build library search path into executable.

-norunpath

 

 

Build runtime library search path into executable

-Rpath

 

 

Disable use of incremental linker, ild

-xildoff

 

 

Link with optimized math library

-xlibmopt

 

 

Reserve an area of memory before the start of each function

-xpatchpadding

 

 

Specify whether the program contains references to dynamically bound

-xunboundsym

symbols

 

 

 

Link editor option

-zx

 

 

Generate pure libraries with no relocations

-ztext

 

 

Numerics and Floating-Point:

 

 

 

Use non-standard floating-point preferences

-fnonstd

 

 

Select non-standard floating point

-fns

 

 

Chapter 3 • Fortran Compiler Options

49

3.3 Options Summary

Function

Option Flag

 

 

Enable runtime floating-point overflow during input

-fpover

 

 

Select IEEE floating-point rounding mode

-fround=r

 

 

Select floating-point optimization level

-fsimple=n

 

 

Select floating-point trapping mode

-ftrap=t

 

 

Specify rounding method for formatted input/output

-iorounding=mode

 

 

Promote single precision constants to double precision

-r8const

 

 

Optimization and Performance:

 

 

 

Analyze loops for data dependencies

-depend

 

 

Optimize using a selection of options

-fast

 

 

Control optimizations that impact interposing on global library

-fsemantic-interposition

functions.

 

 

-fno-semantic-interposition

 

 

Specify that the program does not perform I/O in more than one thread

-fserialio

at a time.

 

 

 

Specify optimization level

-On

 

 

Pad data layout for efficient use of cache

-pad[=p]

 

 

Allocate local variables on the memory stack

-stackvar

 

 

Enable loop unrolling

-unroll[=m]

 

 

Invoke interprocedural optimizations pass

-xipo[=n]

 

 

Reduce compile time by avoiding optimizations during the initial pass

-xipo_build

through the compiler, optimizing only at link time

 

 

 

Set highest optimization level for #pragma OPT

-xmaxopt[=n]

 

 

Enable/adjust compiler generated prefetch instructions

-xprefetch=list

 

 

Control automatic generation of prefetch instructions

-xprefetch_level=n

 

 

Enable generation or use of performance profiling data

-xprofile=p

 

 

Assert that no memory-based traps will occur

-xsafe=mem

 

 

Cause the driver to include a special mapfile on the link line.

-xsegment_align

 

 

Do no optimizations that increase code size

-xspace

 

 

Specify that the application will be run in situations where many

-xthroughput

processes are simultaneously running on the system

 

 

 

Generate calls to vector library functions automatically

-xvector[=yn]

 

 

Parallelization:

 

 

 

Enable automatic parallelization of DO loops

-autopar

 

 

Equivalent to -xopenmp=parallel

-fopenmp

 

 

Show loop parallelization information

-loopinfo

 

 

Compile for hand-coded multithreaded programming

-mt

 

 

50 Oracle Developer Studio 12.6: Fortran User's Guide • July 2017

Соседние файлы в предмете Информационные и сетевые технологии