Cray Fortran Reference Manual
S-3901-70 - Dec 2008
Documents the Cray Fortran Compiler command-line options and associated directives and environment variables.
Links
- Available formats
- Table of contents
- Software releases this book supports
- Other versions of this book
Available formats
|
S-3901-70.pdf |
|
|
html-S-3901-70 |
Table of contents
Preface1 Introduction
1.1 The Cray Fortran Programming Environment
1.2 Cray Fortran Compiler Messages
1.3 Document-specific Conventions
1.4 Fortran Standard Compatibility
1.4.1 Fortran 95 Compatibility
1.4.2 Fortran 90 Compatibility
1.5 Related Fortran Publications
2 Invoking the Cray Fortran Compiler
2.1 -A module_name [ , module_name ] ...
2.2 -b bin_obj_file
2.3 -c
2.4 -d disable and -e enable
2.5 -D identifier [ = value ]
2.6 -f source_form
2.7 -F
2.8 -g
2.9 -G debug_lvl
2.10 -h arg
2.10.1 -h cache n
2.10.2 -h [no]caf
2.10.3 -h cpu= target_system
2.10.4 -h display_opt
2.10.5 -h [no]dwarf
2.10.6 -h keepfiles
2.10.7 -h [no]msgs
2.10.8 -h [no]negmsgs
2.10.9 -h network= nic
2.10.10 -h [no]omp
2.10.11 -h [no]omp_trace
2.10.12 -h profile_generate
2.10.13 -h [no]second_underscore
2.10.14 -h smp n
2.11 -I incldir
2.12 -J dir_name
2.13 -l libname
2.14 -L ldir
2.15 -m msg_lvl
2.16 -M msgs
2.17 -N col
2.18 -O opt [ , opt ] ...
2.18.1 -O n
2.18.2 -O [no]aggress
2.18.3 -O cache n
2.18.4 -O fp n
2.18.5 -O fusion n
2.18.6 -O inlinelib
2.18.7 -O ipa n and -O ipafrom = source [ :source ] ...
2.18.8 -O [no]modinline
2.18.9 -O [no]msgs
2.18.10 -O [no]negmsgs
2.18.11 -O nointerchange
2.18.12 -O [no]omp
2.18.13 -O [no]overindex
2.18.14 -O [no]pattern
2.18.15 -O scalar n
2.18.16 -O shortcircuit n
2.18.17 -O smp n
2.18.18 -O unroll n
2.18.19 -O vector n
2.18.20 -O [no]zeroinc
2.19 -o out_file
2.20 -p module_site [, module_site ]
2.21 -Q path
2.22 -r list_opt
2.23 -R runchk
2.24 -s size
2.24.1 Different Default Data Size Options on the Command Line
2.24.2 Pointer Scaling Factor
2.25 -S asm_file
2.26 -T
2.27 -U identifier [ , identifier ] ...
2.28 -v
2.29 -V
2.30 -Wa" assembler_opt "
2.31 -Wr" lister_opt "
2.32 -x dirlist
2.33 -X npes
2.34 -Y phase , dirname
2.35 --
2.36 sourcefile [ sourcefile . suffix ... ]
3 Setting Environment Variables
3.1 Compiler and Library Environment Variables
3.1.1 CRAY_FTN_OPTIONS Environment Variable
3.1.2 CRAY_PE_TARGET Environment Variable
3.1.3 FORMAT_TYPE_CHECKING Environment Variable
3.1.4 FORTRAN_MODULE_PATH Environment Variable
3.1.5 LISTIO_PRECISION Environment Variable
3.1.6 NLSPATH Environment Variable
3.1.7 NPROC Environment Variable
3.1.8 TMPDIR Environment Variable
3.1.9 ZERO_WIDTH_PRECISION Environment Variable
3.2 OpenMP Environment Variable
3.3 Run Time Environment Variables
3.3.1 aprun Resource Limits
4 Using Cray Fortran Directives
4.1 Using Directives
4.1.1 Directive Lines
4.1.2 Range and Placement of Directives
4.1.3 Interaction of Directives with the -x Command Line Option
4.1.4 Command Line Options and Directives
4.2 Vectorization Directives
4.2.1 Copy Arrays to Temporary Storage: COPY_ASSUMED_SHAPE
4.2.2 Limit Optimizations: HAND_TUNED
4.2.3 Ignore Vector Dependencies: IVDEP
4.2.4 Specify Scalar Processing: NEXTSCALAR
4.2.5 Request Pattern Matching: [NO]PATTERN
4.2.6 Declare an Array with No Repeated Values: PERMUTATION
4.2.7 Designate Loop Nest for Vectorization: PREFERVECTOR
4.2.8 Conditional Density: PROBABILITY
4.2.9 Allow Speculative Execution of Memory References Within Loops: SAFE_ADDRESS
4.2.10 Allow Speculative Execution of Memory References and Arithmetic Operations: SAFE_CONDITIONAL
4.2.11 Designate Loops with Low Trip Counts: SHORTLOOP , SHORTLOOP128
4.2.12 Provide More Information for Loops: LOOP_INFO
4.2.13 Unroll Loops: [NO]UNROLL
4.2.14 Enable and Disable Vectorization: [NO]VECTOR
4.2.15 Enable or Disable, Temporarily, Soft Vector-pipelining: [NO]PIPELINE
4.3 Inlining Directives
4.3.1 Disable or Enable Cloning for a Block of Code: [NO]CLONE and RESETCLONE
4.3.2 Disable or Enable Inlining for a Block of Code: [NO]INLINE and RESETINLINE
4.3.3 Specify Inlining for a Procedure: INLINEALWAYS and INLINENEVER
4.3.4 Create Inlinable Templates for Module Procedures: [NO]MODINLINE
4.4 Scalar Optimization Directives
4.4.1 Control Loop Interchange: [NO]INTERCHANGE
4.4.2 Control Loop Collapse: [NO]COLLAPSE
4.4.3 Determine Register Storage: NOSIDEEFFECTS
4.4.4 Suppress Scalar Optimization: SUPPRESS
4.5 Local Use of Compiler Features
4.5.1 Check Array Bounds: [NO]BOUNDS
4.5.2 Specify Source Form: FREE and FIXED
4.6 Storage Directives
4.6.1 Permit Cache Blocking: BLOCKABLE Directive
4.6.2 Declare Cache Blocking: BLOCKINGSIZE and NOBLOCKING Directives
4.6.3 Request Stack Storage: STACK
4.7 Miscellaneous Directives
4.7.1 Allocate Cache: CACHE
4.7.2 Non-temporal Reads and Writes: CACHE_NT
4.7.3 Specify Array Dependencies: CONCURRENT
4.7.4 Fuse Loops: [NO]FUSION
4.7.5 Create Identification String: ID
4.7.6 Disregard Dummy Argument Type, Kind, and Rank: IGNORE_TKR
4.7.7 External Name Mapping: NAME
4.7.8 Preprocess Include File: PREPROCESS
4.7.9 Specify Weak Procedure Reference: WEAK
5 Source Preprocessing
5.1 General Rules
5.2 Directives
5.2.1 #include Directive
5.2.2 #define Directive
5.2.3 #undef Directive
5.2.4 # (Null) Directive
5.2.5 Conditional Directives
5.3 Predefined Macros
5.4 Command Line Options
6 Using the OpenMP Fortran API
6.1 Cray Implementation Differences
6.2 OMP_THREAD_STACK_SIZE Environment Variable
6.3 OpenMP Optimizations
6.4 Compiler Options that Affect OpenMP
6.5 OpenMP Program Execution
7 Cray Fortran Defined Externals
7.1 Conformance Checks
8 Cray Fortran Language Extensions
8.1 Characters, Lexical Tokens, and Source Form
8.1.1 Low-level Syntax
8.2 Types
8.2.1 The Concept of Type
8.3 Data Object Declarations and Specifications
8.3.1 Attribute Specification Statements
8.3.2 IMPLICIT Statement
8.3.3 Storage Association of Data Objects
8.4 Expressions and Assignment
8.4.1 Expressions
8.4.2 Assignment
8.5 Execution Control
8.5.1 STOP Code Extension
8.6 Input/Output Statements
8.6.1 File Connection
8.7 Error, End-of-record, and End-of-file Conditions
8.7.1 End-of-file Condition and the END-specifier
8.8 Input/Output Editing
8.8.1 Data Edit Descriptors
8.8.2 Control Edit Descriptors
8.8.3 List-directed Formatting
8.8.4 Namelist Formatting
8.8.5 I/O Editing
8.9 Program Units
8.9.1 Main Program
8.9.2 Block Data Program Units
8.10 Procedures
8.10.1 Procedure Interface
8.10.2 Procedure Definition
8.11 Intrinsic Procedures and Modules
8.11.1 Standard Generic Intrinsic Procedures
8.12 Exceptions and IEEE Arithmetic
8.12.1 The Exceptions
8.13 Interoperability With C
8.13.1 Interoperability Between Fortran and C Entities
8.14 Coarrays
8.15 Compiling and Executing Programs Containing Coarrays
8.15.1 ftn and aprun Options Affecting Coarrays
8.15.2 Using the CrayTools Tool Set with Coarray Programs
8.15.3 Interoperating with Other Message Passing and Data Passing Models
8.15.4 Optimizing Programs with Coarrays
9 Obsolete Features
9.1 IMPLICIT UNDEFINED
9.2 Type statement with *n
9.3 BYTE Data Type
9.4 DOUBLE COMPLEX Statement
9.5 STATIC Attribute and Statement
9.6 Slash Data Initialization
9.7 DATA Statement Features
9.8 Hollerith Data
9.8.1 Hollerith Constants
9.8.2 Hollerith Values
9.8.3 Hollerith Relational Expressions
9.9 PAUSE Statement
9.10 ASSIGN , Assigned GO TO Statements, and Assigned Format Specifiers
9.10.1 Form of the ASSIGN and Assigned GO TO Statements
9.10.2 Assigned Format Specifiers
9.11 Two-branch IF Statements
9.11.1 Two-branch Arithmetic IF
9.11.2 Indirect Logical IF
9.12 Real and Double Precision DO Variables
9.13 Nested Loop Termination
9.14 Branching into a Block
9.15 ENCODE and DECODE Statements
9.15.1 ENCODE Statement
9.15.2 DECODE Statement
9.16 BUFFER IN and BUFFER OUT Statements
9.17 Asterisk Delimiters
9.18 Negative-valued X Descriptor
9.19 A and R Descriptors for Noncharacter Types
9.20 H Edit Descriptor
9.21 Obsolete Intrinsic Procedures
10 Cray Fortran Deferred Implementation and Optional Features
10.1 ISO_10646 Character Set
10.2 Restrictions on Unlimited Polymorphic Variables
10.3 ENCODING= in I/O Statements
10.4 Allocatable Assignment (Optionally Enabled)
11 Cray Fortran Implementation Specifics
11.1 Companion Processor
11.2 INCLUDE Line
11.3 INTEGER Kinds and Values
11.4 REAL Kinds and Values
11.5 DOUBLE PRECISION Kinds and Values
11.6 LOGICAL Kinds and Values
11.7 CHARACTER Kinds and Values
11.8 Cray Pointers
11.9 ENUM Kind
11.10 Storage Issues
11.10.1 Storage Units and Sequences
11.10.2 Static and Stack Storage
11.10.3 Dynamic Memory Allocation
11.11 Finalization
11.12 ALLOCATE Error Status
11.13 DEALLOCATE Error Status
11.14 ALLOCATABLE Module Variable Status
11.15 Kind of a Logical Expression
11.16 STOP Code Availability
11.17 Stream File Record Structure and Position
11.18 File Unit Numbers
11.19 OPEN Specifiers
11.20 FLUSH Statement
11.21 Asynchronous I/O
11.22 REAL I/O of an IEEE NaN
11.22.1 Input of an IEEE NaN
11.22.2 Output of an IEEE NaN
11.23 List-directed and NAMELIST Output Default Formats
11.24 Random Number Generator
11.25 Timing Intrinsics
11.26 IEEE Intrinsic Modules
12 Enhanced I/O: Using the Assign Environment
12.1 Understanding the assign Environment
12.1.1 Assign Objects and Open Processing
12.1.2 assign Command Syntax
12.1.3 Using the Library Routines
12.2 Tuning File Connection Behavior
12.2.1 Using Alternative File Names
12.2.2 Specifying File Structure
12.2.3 Specifying Buffer Behavior
12.2.4 Specifying Foreign File Formats
12.2.5 Specifying Memory Resident Files
12.2.6 Using and Suppressing File Truncation
12.3 Defining the Assign Environment File
12.4 Using Local Assign Mode
13 Using Flexible File I/O (FFIO)
13.1 Understanding FFIO
13.2 Using FFIO Layers
13.2.1 Available I/O Layers
13.2.2 Specifying Layered I/O Options
13.3 Using FFIO with Common File Structures
13.3.1 Reading and Writing Text Files
13.3.2 Reading and Writing Unblocked Files
13.3.3 Reading and Writing Fixed-length Records
13.3.4 Reading and Writing Blocked Files
13.4 Tips for Enhancing I/O Performance
13.4.1 Buffer Size Considerations
13.4.2 Removing Blocking
13.5 Sample Programs
14 FFIO Layer Reference
14.1 Characteristics of Layers
14.2 The bufa Layer
14.3 The cache Layer
14.4 The cachea Layer
14.5 The cos Blocked Layer
14.6 The event Layer
14.7 The f77 Layer
14.8 The fd Layer
14.9 The global Layer (Deferred Implementation)
14.10 The ibm Layer
14.11 The mr Layer
14.12 The null Layer
14.13 The syscall Layer
14.14 The system Layer
14.15 The text Layer
14.16 The user and site Layers
14.17 The vms Layer
15 Creating a user Layer
15.1 Internal Functions
15.1.1 The Operations Structure
15.1.2 FFIO and the stat Structure
15.2 user Layer Example
16 Named Pipe Support
16.1 Piped I/O Example without End-of-file Detection
16.2 Detecting End-of-file on a Named Pipe
16.3 Piped I/O Example with End-of-file Detection
Glossary
Index
List of Tables
List of Figures
List of Examples
Software Releases this book supports
| Product | Version | Sub Product | Release Date |
|---|---|---|---|
| Cray Compiling Environment (CCE) | 7.0 | Fortran Compiler | Dec 2008 |
Other versions of this book
| Publication Number | Release Date | Supported Software Releases |
|---|---|---|
| S-3901-71 | Jun 2009 | Cray Compiling Environment (CCE) 7.1: C/C++/Fortran Compiler |
| S-3901-60 | Sep 2007 | PE 6.0: Fortran Compiler |
| S-3901-56 | Mar 2007 | PE 5.6: Fortran Compiler |
| S-3901-55 | Dec 2005 | PE 5.5: Fortran Compiler |
| S-3901-54 | Mar 2005 | PE 5.4: Fortran Compiler |
| S-3901-52 | Apr 2004 | PE 5.2: Fortran Compiler |
| S-3901-51 | Oct 2003 | PE 5.1: Fortran compiler |
| S-3901-50 | Jun 2003 | PE 5.0: Fortran Compiler |
| S-3901-35 | Jan 2001 | PE 3.5: Fortran Compiler |
| 004-3901-004 | Mar 2000 | PE 3.4: Fortran Compiler |
| 004-3901-003 | Jul 1999 | PE 3.3: General |
| 004-3901-001 | Aug 1998 | unsupported |
| S-3901-36 | Jan 1998 | PE 3.6: Fortran Compiler |
