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

 

 

3.3 Options Summary

 

 

 

 

 

 

 

Function

Option Flag

 

 

 

 

Accept OpenMP API directives. The -xopenmp option flag accepts the

-xopenmp[=keyword]

 

following sub-option keywords: parallel, noopt, and none.

 

 

 

 

 

Recognize reduction operations in loops with automatic parallelization

-reduction

 

 

 

 

Verbose parallelization messages

-vpara

 

 

 

 

Specify that the application will be run in situations where many

-xthroughput

 

processes are simultaneously running on the system

 

 

 

 

 

Source Code:

 

 

 

 

 

Define preprocessor symbol

-Dname[=val]

 

 

 

 

Undefine preprocessor symbol

-Uname

 

 

 

 

Accept extended (250 character) source lines

-e

 

 

 

 

Apply preprocessor to .F and/or .F90 and .F95 files but do not compile

-F

 

 

 

 

Accept Fortran 95 fixed-format input

-fixed

 

 

 

 

Preprocess all source files with the fpp preprocessor

-fpp

 

 

 

 

Accept Fortran 95 free-format input

-free

 

 

 

 

Add directory to include file search path

-Ipath

 

 

 

 

Add directory to module search path

-Mpath

 

 

 

 

Recognize upper and lower case as distinct

-U

 

 

 

 

Tread hollerith as character in actual arguments

-xhasc={yes|no}

 

 

 

 

Select preprocessor, cpp or fpp, to use

-xpp[={fpp|cpp}]

 

 

 

 

Allow recursive subprogram calls

-xrecursive

 

 

 

 

Target Platform:

 

 

 

 

 

Specify data type model, 32 or 64 bits.

-m32 | —m64

 

 

 

 

Specify target platform instruction set for the optimizer

-xarch=a

 

 

 

 

Specify target cache properties for optimizer

-xcache=a

 

 

 

 

Specify target processor for the optimizer

-xchip=a

 

 

 

 

Specify target platform for the optimizer

-xtarget=a

 

 

 

3.3.1Commonly Used Options

The compiler has many features that are selectable by optional command–line parameters. The short list below of commonly used options is a good place to start.

TABLE 6

Commonly Used Options

 

 

 

 

Action

 

Option

 

 

Debug—produce additional symbol table information to enable the dbx and debugging.

–g

 

 

 

Chapter 3 • Fortran Compiler Options

51

3.3 Options Summary

Action

Option

 

 

Performance—invoke the optimizer to produce faster running programs.

–O[n]

 

 

Performance—Produce efficient compilation and run times for the native platform, using a set of

–fast

predetermined options.

 

 

 

Dynamic (–Bdynamic) or static (–Bstatic) library binding.

–Bx

 

 

Compile only—Suppress linking; make a .o file for each source file.

–c

 

 

Output file—Name the executable output file nm instead of a.out.

–o nm

 

 

Source code—Compile fixed format Fortran source code.

-fixed

 

 

3.3.2Macro Flags

Some option flags are macros that expand into a specific set of other flags. These are provided as a convenient way to specify a number of options that are usually expressed together to select a certain feature.

TABLE 7

Macro Option Flags

 

 

 

Option Flag

 

Expansion

 

 

 

-dalign

 

-xmemalign=8s -aligncommon=16

 

 

 

-f

 

-aligncommon=16

 

 

 

-fast

 

See description of —fast for complete current expansion.

 

 

 

-fnonstd

 

-fns -ftrap=common

 

 

 

-xtarget

 

-xarch=a -xcache=b -xchip=c

 

 

 

Settings that follow the macro flag on the command line override or add to the expansion of the macro.

3.3.3Backward Compatibility and Legacy Options

The following options are provided for backward compatibility with earlier compiler releases, and certain Fortran legacy capabilities.

TABLE 8

Backward Compatibility Options

 

 

 

 

Action

 

Option

 

 

Preserve actual arguments over ENTRY statements

-arg=local

 

 

 

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

 

 

3.3 Options Summary

 

 

 

 

 

 

 

Action

Option

 

 

 

 

Allow assignment to constant arguments.

–copyargs

 

 

 

 

Treat hollerith constant as character or typeless in call argument lists.

-xhasc[={yes|no}]

 

 

 

 

Support Fortran 77 extensions and conventions

-f77

 

 

 

 

Nonstandard arithmetic—allow nonstandard arithmetic.

–fnonstd

 

 

 

 

Optimize performance for the host system.

–native

 

 

 

 

DO loops—use one trip DO loops.

–onetrip

 

 

 

 

Allow legacy aliasing situations

-xalias=keywords

 

 

 

Use of these option flags is not recommended for producing portable Fortran programs.

3.3.4Obsolete Option Flags

The following options are considered obsolete and should not be used. They might be removed from later releases of the compiler.

TABLE 9

Obsolete f95 Options

 

 

 

 

Option Flag

 

Equivalent

 

 

 

-native

 

-xtarget=native

 

 

 

-p

 

Profiling. Use -pg or the Performance Analyzer

 

 

 

-silent

 

Ignored.

 

 

-xarch=pentium_pro

Obsolete. Use -xarch=generic instead.

 

 

 

-xarch=sse

 

Obsolete. Use -xarch=generic instead.

 

 

-xarch=amdfam10

Obsolete.

 

 

 

-xchip=T3

 

Obsolete.

 

 

 

-xchip=pentium

 

Obsolete. Use -xchip=generic instead.

 

 

-xchip=pentium_pro

Obsolete. Use -xchip=generic instead.

 

 

-xchip=pentium3

Obsolete. Use -xchip=generic instead.

 

 

 

-xchip=ultraT1

 

Obsolete.

 

 

 

-xchip=ultraT2

 

Obsolete.

 

 

-xchip=ultraT2plus

Obsolete.

 

 

-xchip=sparc64vi

Obsolete.

 

 

-xchip=sparc64vii

Obsolete.

 

 

 

-xpentium

 

Obsolete. Use -xchip=generic instead.

 

 

 

Chapter 3 • Fortran Compiler Options

53

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