IntelŪ Fortran Compiler Documentation
Welcome to the IntelŪ Fortran Compiler
Disclaimer and Legal Information
Introduction
What's New in This Release
Product Website and Support
System Requirements
FLEXlm* Electronic Licensing
Related Publications
Building Applications
Introduction
How to Use This Document
Getting Started
Getting Started Overview
How You Can Use the IntelŪ Fortran Compiler
Basic Troubleshooting
Compilation Phases
Preprocess Phase
Assemblers and Linker
Default Behavior of the Intel Fortran Compiler
Input Files and Filename Extensions
File Specifications
Output Files
Temporary Files Created by the Compiler or Linker
Controlling the Compilation Process
Setting and Viewing Environment Variables
Running the Shell Script to Set Up the Environment Variables
Compatibility with Previous Versions of Intel Fortran
Building Applications from the Command Line
Building Applications from the Command Line Overview
Invoking the IntelŪ Fortran Compiler from the Command Line
Examples of the ifort Command
Using Module (.mod) Files
Searching for Include and .mod Files
Configuration Files and Response Files
Specifying Alternative Tool Locations and Options
Predefined Preprocessor Symbols
Redirecting Output to Files
Creating, Running, and Debugging an Executable Program
Creating Shared Libraries
Allocating Common Blocks
Building Applications with Xcode* (Mac OS*)
Building Applications with Xcode* (Mac OS*)
Creating a Project
Selecting the Intel Compiler
Building the Target
Setting Compiler Options
Using Compiler Options
Compiler Options Overview
Option Mapping Tool
Compiler Directives Related to Options
Debugging
Debugging Overview
Introduction to the IntelŪ Debugger (idb)
Preparing Your Program for Debugging
Debugging and Optimizations
Using idb Debugger Commands and Setting Breakpoints
Summary of idb Debugger Commands
Debugging the SQUARES Example Program
Displaying Variables in the Debugger
Expressions in Debugger Commands
Debugging Mixed-Language Programs
Debugging a Program that Generates a Signal
Locating Unaligned Data
Debugging Multithread Programs
Debugging Multithread Programs Overview
Debugging Parallel Regions
Debugging Multiple Threads
Debugging Shared Variables
Data and I/O
Data Representation
Data Representation Overview
Intrinsic Data Types
Integer Data Representations
Integer Data Representations Overview
INTEGER(KIND=1) Representation
INTEGER(KIND=2) Representation
INTEGER(KIND=4) Representation
INTEGER(KIND=8) Representation
Logical Data Representations
Native IEEE* Floating-Point Representations
Native IEEE* Floating-Point Representations Overview
REAL(KIND=4) (REAL) Representation
REAL(KIND=8) (DOUBLE PRECISION) Representation
REAL(KIND=16) (EXTENDED PRECISION) Representation
COMPLEX(KIND=4) (COMPLEX) Representation
COMPLEX(KIND=8) (DOUBLE COMPLEX) Representation
COMPLEX(KIND=16) Representation
File fordef.for and Its Usage
Using the Floating Point Exception Handling (-fpe) Option
Character Representation
Hollerith Representation
Converting Unformatted Data
Converting Unformatted Data Overview
Supported Native and Nonnative Numeric Formats
Limitations of Numeric Conversion
Methods of Specifying the Data Format
Methods of Specifying the Data Format: Overview
Environment Variable FORT_CONVERTn Method
Environment Variable FORT_CONVERT.ext or FORT_CONVERT_ext Method
Environment Variable F_UFMTENDIAN Method
OPEN Statement CONVERT Method
OPTIONS Statement Method
Compiler Option -convert Method
Porting Nonnative Data
Fortran I/O
Fortran I/O Overview
Logical I/O Units
Types of I/O Statements
Forms of I/O Statements
Files and File Characteristics
Files and File Characteristics Overview
File Organization
Internal Files and Scratch Files
Record Types
Record Overhead
Record Length
Accessing and Assigning Files
Default Pathnames and File Names
Using Preconnected Standard I/O Files
Opening Files: OPEN Statement
Obtaining File Information: INQUIRE Statement
Closing a File: CLOSE Statement
Record Operations
Record Operations Overview
Record I/O Statement Specifiers
Record Access
File Sharing
Specifying the Initial Record Position
Advancing and Nonadvancing Record I/O
Record Transfer
User-Supplied OPEN Procedures: USEROPEN Specifier
Format of Record Types
Microsoft* Fortran PowerStation* Compatible Files
Programming with Mixed Languages
Programming with Mixed Languages Overview
Summary of Mixed-Language Issues
Calling Subprograms from the Main Program
Compiling and Linking IntelŪ Fortran/C Programs
Using Modules in Fortran/C Mixed-Language Programming
Calling C Procedures from an Intel Fortran Program
Adjusting Calling Conventions in Mixed-Language Programming
Adjusting Calling Conventions in Mixed-Language Programming Overview
ATTRIBUTES Properties and Calling Conventions
Adjusting Naming Conventions in Mixed-Language Programming
Adjusting Naming Conventions in Mixed-Language Programming Overview
C/C++ Naming Conventions
Procedure Names in Fortran, C, and C++
Reconciling the Case of Names
Fortran Module Names and ATTRIBUTES
Protoyping a Procedure in Fortran
Exchanging and Accessing Data in Mixed-Language Programming
Exchanging and Accessing Data in Mixed-Language Programming Overview
Passing Arguments in Mixed-Language Programming
Using Common External Data in Mixed-Language Programming
Handling Data Types in Mixed-Language Programming
Handling Data Types in Mixed-Language Programming Overview
Handling Numeric, Complex, and Logical Data Types
Handling Fortran Array Pointers and Allocatable Arrays
Handling Integer Pointers
Handling Arrays and Fortran Array Descriptors
Handling Character Strings
Handling User-Defined Types
Error Handling
Error Handling Overview
Run-Time Library Default Error Processing
Handling Run-Time Errors
Locating Run-Time Errors
Signal Handling
Overriding the Default Run-Time Library Exception Handler
Obtaining Traceback Information with TRACEBACKQQ
Creating and Using Libraries
Creating and Using Libraries Overview
Creating Libraries
Libraries Provided by IntelŪ Fortran
Portability Library
Portability Library Overview
Using the Portability Library libifport.a
Portability Routines
Math Libraries
Reference Information
Compile-Time Environment Variables
Run-Time Environment Variables
Key IA-32 and IntelŪ EM64T Compiler Files Summary
Key ItaniumŪ-Based Compiler Files Summary
Compiler Limits
Hexadecimal-Binary-Octal-Decimal Conversions
Run-Time Error Messages
Compiler Options
Introduction
How to Use This Document
New Options
Alphabetical Compiler Options
Overview of Compiler Options
1
4I2, 4I4, 4I8
4L72, 4L80, 4L132
4Na, 4Ya
4Naltparam, 4Yaltparam
4Nb, 4Yb
4Nd, 4Yd
4Nf
4Ns, 4Ys
4R8, 4R16
4Yf
4Yportlib
66
72, 80, 132
align
allow
altparam
ansi-alias
arch
architecture
asmattr
asmfile
assume
auto
auto-scalar
autodouble
automatic
ax
B
Bdynamic
bintext
Bstatic
c
C
CB
ccdefault
check
cm
common-args
compile_only
complex-limited-range
convert
cpp
cxxlib
D
d_lines
dbglibs
DD
debug (Linux*)
debug (Windows*)
debug-parameters
define
dll
double_size
dps
dryrun
dynamic-linker
dynamiclib
dyncom
E
e90, e95
EP
error_limit
exe
extend_source
extfor
extfpp
extlnk
F (Linux*)
F (Windows*)
f66
f77rtl
Fa
FA
falias
fast
fcode-asm
Fe
fexceptions
ffnalias
FI
finline-functions
finline-limit
fixed
fltconsistency
Fm
fmath-errno
fminshared
fno-omit-frame-pointer
fnsplit
Fo
fp-model
fp-port
fp (Linux* and Mac OS)
fp (Windows*)
fpconstant
fpe
fpic
fpp
fpscomp
fpstkchk
FR
fr32
free
fsource-asm
fsyntax-only
ftrapuv
ftz
funroll-loops
fverbose-asm
fvisibility
g
G1, G2, G2-p9000
G5, G6, G7
Ge
gen-interfaces
global-hoist
Gm
Gs
Gz
help
I
i-dynamic
i-static
i2, i4, i8
iface
implicitnone
include
inline
inline-debug-info
inline-factor
inline-forceinline
inline-max-per-compile
inline-max-per-routine
inline-max-size
inline-max-total-size
inline-min-size
intconstant
integer_size
ip
ip-no-inlining
ip-no-pinlining
IPF-flt-eval-method0
IPF-fltacc
IPF-fma
IPF-fp-relaxed
IPF-fp-speculation
ipo
ipo-c
ipo-S
ipo-separate
isystem
ivdep-parallel
Kpic
l
L
LD
libdir
libs
link
logo
lowercase
map
map-opts
mcmodel
MD
MDs
MG
mieee-fp
mixed_str_len_arg
ML
module
mp
mp1
mrelax
MT
mtune
MW
MWs
names
nbs
no-cpprt
nobss-init
nodefaultlibs
nodefine
nofor_main
nostartfiles
nostdinc
nostdlib
nus
o
O
Ob
object
Od
Og
onetrip
Op
openmp
openmp-profile
openmp-report
openmp-stubs
opt-mem-bandwidth
opt-report
opt-report-file
opt-report-help
opt-report-level
opt-report-phase
opt-report-routine
optimize
Os
Ot
Ox
Oy
p
P
pad
pad-source
par-report
par-threshold
parallel
pc
pdbfile
pg
prec-div
prec-sqrt
prefetch
preprocess_only
print-multi-lib
prof-dir
prof-file
prof-format-32
prof-gen
prof-gen-sampling
prof-genx
prof-use
Qansi-alias
Qauto
Qauto-scalar
Qautodouble
Qax
Qchkstk
Qcommon-args
Qcomplex-limited-range
Qcpp
Qd_lines
Qdps
Qdyncom
Qextend_source
Qfp-port
Qfnsplit
Qfpp
Qfpstkchk
Qftz
Qglobal-hoist
QIA64-fr32
QIfist
Qinline-debug-info
Qinline-factor
Qinline-forceinline
Qinline-max-per-compile
Qinline-max-per-routine
Qinline-max-size
Qinline-max-total-size
Qinline-min-size
Qinstall
Qip
Qip-no-inlining
Qip-no-pinlining
QIPF-flt-eval-method0
QIPF-fltacc
QIPF-fma
QIPF-fp-relaxed
QIPF-fp-speculation
Qipo
Qipo-c
Qipo-S
Qipo-separate
Qivdep-parallel
Qlocation
Qlowercase
Qmap-opts
Qnobss-init
Qonetrip
Qopenmp
Qopenmp-profile
Qopenmp-report
Qopenmp-stubs
Qopt-mem-bandwidth
Qopt-report
Qopt-report-file
Qopt-report-help
Qopt-report-level
Qopt-report-phase
Qopt-report-routine
Qoption
qp
Qpad
Qpad-source
Qpar-report
Qpar-threshold
Qparallel
Qpc
Qprec
Qprec-div
Qprec-sqrt
Qprefetch
Qprof-dir
Qprof-file
Qprof-format-32
Qprof-gen
Qprof-gen-sampling
Qprof-genx
Qprof-use
Qrcd
Qrct
Qsafe-cray-ptr
Qsave
Qscalar-rep
Qsfalign
Qsox
Qssp
Qtcheck
Qtrapuv
Qunroll
Quppercase
Quse-asm
Quse_vcdebug
Qvc6
Qvc7
Qvc7.1
Qvc8
Qvec-report
Qx
Qzero
r8, r16
rcd
real_size
recursive
reentrancy
RTCu
S
safe-cray-ptr
save
scalar-rep
shared
shared-libcxa
source
sox
ssp
stand
static
static-libcxa
std
std90
std95
syntax
syntax-only
T
tcheck
Tf
threads
tpp1, tpp2
tpp5, tpp6, tpp7
traceback
tune
u (Linux* and Mac OS*)
u (Windows*)
U
undefine
unroll
uppercase
us
use-asm
v
V (Linux* and Mac OS*)
V (Windows*)
vec-report
vms
w
W0
W1
Wa
warn
watch
WB
what
winapp
Wl
Wp
x
X
Xlinker
y
Z7
Zd
zero
Zi
Zl
Zp
Zs
Cross References of Compiler Options
Deprecated and Removed Compiler Options
Related Options
Optimizing Applications
Introduction
How to Use This Document
Programming for High Performance
Programming for High Performance Overview
Optimizing Performance
Optimizing Performance Overview
Using IntelŪ Performance Analysis Tools
Using Tuning Tools and Strategies
Using a Performance Enhancement Methodology
Applying Performance Enhancement Strategies
Understanding Run-time Performance
Applying Optimization Strategies
Understanding Data Alignment
Timing Your Application
Programming Guidelines
Coding Guidelines for IntelŪ Architectures
Setting Data Type and Alignment
Using Arrays Efficiently
Improving I/O Performance
Improving Run-time Efficiency
Using Intrinsics for ItaniumŪ-based Systems
Compiler Optimizations
Compiler Optimizations Overview
Optimization Options Summary
Optimizing for Specific Processors
Optimizing for Specific Processors Overview
Targeting a Processor
Processor-specific Optimization (IA-32 only)
Automatic Processor-specific Optimization (IA-32 Only)
Processor-specific Run-time Checks for IA-32 Systems
Optimizing the Compilation Process
Optimizing the Compilation Process Overview
Efficient Compilation
Stacks: Automatic Allocation and Checking
Little-endian-to-Big-endian Conversion (IA-32)
Alignment Options
Symbol Visibility Attribute Options (Linux*)
Interprocedural Optimizations (IPO)
Interprocedural Optimizations Overview
IPO Compilation Model
Understanding IPO-Related Performance Issues
Command Line for Creating an IPO Executable
Generating Multiple IPO Object Files
Capturing Intermediate Outputs of IPO
Creating a Multifile IPO Executable
Understanding Code Layout and Multi-Object IPO
Implementing IL Files with Version Numbers
Inline Expansion of Functions
Criteria for Inline Function Expansion
Using Qoption Specifiers
Compiler Directed Inline Expansion of User Functions
Developer Directed Inline Expansion of User Functions
Profile-guided Optimizations (PGO)
Profile-guided Optimizations Overview
Understanding Profile-guided Optimization
Example of Profile-Guided Optimization
Basic PGO Options
Advanced PGO Options
Generating Function Order Lists
PGO API: Profile Information Generation Support
PGO API Support Overview
PGO Environment Variables
Dumping Profile Information
Resetting the Dynamic Profile Counters
Dumping and Resetting Profile Information
Interval Profile Dumping
PGO Tools
PGO Tools Overview
Code-Coverage Tool
Test-Prioritization Tool
Profmerge and Proforder Utilities
Profrun Utility
Software-based Speculative Precomputation (IA-32)
High-level Optimizations (HLO)
HLO Overview
Loop Transformations
Scalar Replacement
Absence of Loop-carried Memory Dependency with IVDEP Directive
Loop Unrolling
Loop Independence
Prefetching with Options
Floating-Point Arithmetic Optimizations
Floating-Point Arithmetic Optimizations Overview
Floating-point Options for Multiple Architectures
Floating-point Options for IA-32 and IntelŪ EM64T
Floating-point Options for ItaniumŪ-based Systems
Improving or Restricting FP Arithmetic Precision
Understanding Floating-Point Performance
Compiler Reports
Compiler Reports Overview
Optimizer Reports
Optimizer Report Generation
High-Level Optimization (HLO) Report
Interprocedural Optimizations (IPO) Report
Software Pipelining (SWP) Report (Linux* and Windows*)
Vectorization Report
Parallel Programming
Parallelism Overview
Parallelization with OpenMP*
Parallelization with OpenMP* Overview
Parallel Processing Thread Model
OpenMP and Hyper-Threading Technology
Programming with OpenMP
Compiling with OpenMP, Directive Format, and Diagnostics
OpenMP Directives and Clauses Summary
OpenMP Support Libraries
OpenMP Environment Variables
OpenMP Run-time Library Routines
Intel Extension Routines/Functions
Examples of OpenMP Usage
OpenMP Directive Descriptions
Combined Parallel and Worksharing Constructs
Parallel Region Directives
Synchronization Constructs
THREADPRIVATE Directive
Worksharing Construct Directives
OpenMP Clause Descriptions
Controlling Data Scope
Data Scope Attribute Clauses Overview
COPYIN Clause
DEFAULT Clause
PRIVATE, FIRSTPRIVATE, and LASTPRIVATE Clauses
REDUCTION Clause
SHARED Clause
Specifying Schedule Type and Chunk Size
Auto-parallelization
Auto-parallelization Overview
Programming with Auto-parallelization
Programming for Multithread Platform Consistency
Auto-parallelization: Enabling, Options, Directives, and Environment Variables
Auto-parallelization: Threshold Control and Diagnostics
Auto-vectorization
Vectorization Overview (IA-32 and IntelŪ EM64T)
Vectorizer Options
Key Programming Guidelines for Vectorization
Loop Parallelization and Vectorization
Types of Loops Vectorized
Statements in the Loop Body
Data Dependency
Loop Constructs
Loop Exit Conditions
Strip-mining and Cleanup
Vectorization Examples
Loop Interchange and Subscripts: Matrix Multiply
Optimization Support Features
Optimization Support Features Overview
Compiler Directives
Compiler Directives Overview
Pipelining for ItaniumŪ-based Applications
Loop Count and Loop Distribution
Loop Unrolling Support
Vectorization Support
Prefetch Support
Optimization Glossary
Optimizing Applications Glossary