Skip to Content
Sun and Oracle
Channel Sun
How to Buy
Log In
Deutsch
docs.sun.com - Startseite
>
Sun Studio 12 Collection
> Sun Studio 12: Fortran User's Guide
Sun Studio 12: Fortran User's Guide
Suchtext Nur in diesem Buch
Suche Hilfe
Sehen Sie dieses Buch:
Andere Sprachen
日本語
简体中文
Innerhalb
Sun Studio 12 Collection
Nach weiteren Dokumenten suchen
Dokumentation nach Titel durchsuchen
Produktdokumentation durchsuchen
Support-Ressourcen
Sun Schulungen
BigAdmin System Administration Portal
Sun Supportcenter
Sun Solve
Dieses Buch im PDF-Format herunterladen (1347 KB)
Sun Studio 12: Fortran User's Guide
Index
Numbers and Symbols
A
B
C
D
E
F
G
H
I
L
M
N
O
P
R
S
T
U
V
W
Book Information
Preface
Typographic Conventions
Shell Prompts
Supported Platforms
Accessing Sun Studio Documentation
Documentation in Accessible Formats
Related Sun Studio Documentation
Accessing Related Solaris Documentation
Resources for Developers
Contacting Sun Technical Support
Sending Your Comments
1. Introduction
1.1 Standards Conformance
1.2 Features of the Fortran 95 Compiler
1.3 Other Fortran Utilities
1.4 Debugging Utilities
1.5 Sun Performance Library
1.6 Interval Arithmetic
1.7 Man Pages
1.8 README Files
1.9 Command-Line Help
2. Using Fortran 95
2.1 A Quick Start
2.2 Invoking the Compiler
2.2.1 Compile-Link Sequence
2.2.2 Command-Line File Name Conventions
2.2.3 Source Files
2.2.4 Source File Preprocessors
2.2.5 Separate Compiling and Linking
2.2.6 Consistent Compiling and Linking
2.2.7 Unrecognized Command-Line Arguments
2.2.8 Fortran 95 Modules
2.3 Directives
2.3.1 General Directives
2.3.1.1 The C Directive
2.3.1.2 The IGNORE_TKR Directive
2.3.1.3 The UNROLL Directive
2.3.1.4 The WEAK Directive
2.3.1.5 The OPT Directive
2.3.1.6 The NOMEMDEP Directive
2.3.1.7 The PIPELOOP=n Directive
2.3.1.8 The PREFETCH Directives
2.3.1.9 The ASSUME Directives
2.3.2 Parallelization Directives
2.3.2.1 OpenMP Parallelization Directives
2.3.2.2 Legacy Sun/Cray Parallelization Directives
2.4 Library Interfaces and system.inc
2.5 Compiler Usage Tips
2.5.1 Determining Hardware Platform
2.5.2 Using Environment Variables
2.5.3 Memory Size
2.5.3.1 Swap Space Limits
2.5.3.2 Increasing Swap Space
2.5.3.3 Control of Virtual Memory
3. Fortran Compiler Options
3.1 Command Syntax
3.2 Options Syntax
3.3 Options Summary
3.3.1 Commonly Used Options
3.3.2 Macro Flags
3.3.3 Backward Compatibility and Legacy Options
3.3.4 Obsolete Option Flags
3.4 Options Reference
3.4.1 –a
3.4.2 –aligncommon[={1|2|4|8|16}]
3.4.3 –ansi
3.4.4 –arg=local
3.4.5 –autopar
3.4.6 –B{static|dynamic}
3.4.7 –C
3.4.8 –c
3.4.9 –cg89
3.4.10 –cg92
3.4.11 –copyargs
3.4.12 –Dname[=def]
3.4.13 –dalign
3.4.14 –dbl_align_all[={yes|no}]
3.4.15 –depend[={yes|no}]
3.4.16 –dn
3.4.17 –dryrun
3.4.18 –d{y|n}
3.4.19 –e
3.4.20 –erroff[={%all|%none|taglist}]
3.4.21 –errtags[={yes|no}]
3.4.22 –errwarn[={%all|%none|taglist}]
3.4.23 –explicitpar
3.4.24 –ext_names=e
3.4.25 –F
3.4.26 –f
3.4.27 –f77[=list]
3.4.28 –fast
3.4.29 –fixed
3.4.30 –flags
3.4.31 -fma={none|fused}
3.4.32 –fnonstd
3.4.33 –fns[={yes|no}]
3.4.34 –fpover[={yes|no}]
3.4.35 –fpp
3.4.36 –fprecision={single|double|extended}
3.4.37 –free
3.4.38 –fround={nearest|tozero|negative|positive}
3.4.39 –fsimple[={1|2|0}]
3.4.40 –fstore
3.4.41 –ftrap=t
3.4.42 –G
3.4.43 –g
3.4.44 –hname
3.4.45 –help
3.4.46 –Ipath
3.4.47 -i8
3.4.48 –inline=[%auto][[,][no%]f1,…[no%]fn]
3.4.49 –iorounding[={compatible|processor-defined}]
3.4.50 –Kpic
3.4.51 –KPIC
3.4.52 –Lpath
3.4.53 –lx
3.4.54 –libmil
3.4.55 –loopinfo
3.4.56 –Mpath
3.4.57 –m32 | –m64
3.4.58 –moddir=path
3.4.59 –mp={%none|sun|cray}
3.4.60 –mt
3.4.61 –native
3.4.62 –noautopar
3.4.63 –nodepend
3.4.64 –noexplicitpar
3.4.65 -nofstore
3.4.66 –nolib
3.4.67 –nolibmil
3.4.68 –noreduction
3.4.69 –norunpath
3.4.70 –O[n]
3.4.71 –O
3.4.72 –O1
3.4.73 –O2
3.4.74 –O3
3.4.75 –O4
3.4.76 –O5
3.4.77 –o name
3.4.78 –onetrip
3.4.79 –openmp
3.4.80 –p
3.4.81 –pad[=p]
3.4.82 –parallel
3.4.83 –pg
3.4.84 –pic
3.4.85 –PIC
3.4.86 –Qoption pr ls
3.4.87 –qp
3.4.88 –R ls
3.4.89 –r8const
3.4.90 –reduction
3.4.91 –S
3.4.92 –s
3.4.93 –sb
3.4.94 –sbfast
3.4.95 –silent
3.4.96 –stackvar
3.4.97 –stop_status[={yes|no}]
3.4.98 –temp=dir
3.4.99 –time
3.4.100 –U
3.4.101 -Uname
3.4.102 –u
3.4.103 –unroll=n
3.4.104 –use=list
3.4.105 –V
3.4.106 –v
3.4.107 -vax=keywords
3.4.108 –vpara
3.4.109 –w[n]
3.4.110 –Xlist[x]
3.4.111 –xa
3.4.112 –xalias[=keywords]
3.4.113 –xarch=isa
3.4.113.1 Special Cautions for x86/x64 Platforms:
3.4.114 –xassume_control[=keywords]
3.4.115 –xautopar
3.4.116 –xbinopt={prepare | off}
3.4.117 –xcache=c
3.4.118 –xcg89
3.4.119 –xcg92
3.4.120 –xcheck=keyword
3.4.121 –xchip=c
3.4.122 –xcode=keyword
3.4.122.1 Position-Independent Code:
3.4.123 –xcommonchk[={yes|no}]
3.4.124 –xcrossfile[={1|0}]
3.4.125 –xdebugformat={dwarf|stabs}
3.4.126 –xdepend
3.4.127 –xexplicitpar
3.4.128 –xF
3.4.129 –xfilebyteorder=options
3.4.129.1 Examples:
3.4.129.2 Notes:
3.4.130 –xhasc[={yes|no}]
3.4.131 –xhelp={readme|flags}
3.4.132 –xhwcprof[={enable | disable}]
3.4.133 –xia[={widestneed|strict}]
3.4.134 –xinline=list
3.4.135 -xinstrument=[%no]datarace
3.4.136 –xinterval[={widestneed|strict|no}]
3.4.137 –xipo[={0|1|2}]
3.4.138 –xipo_archive[={none|readonly|writeback}]
3.4.139 –xjobs=n
3.4.140 –xknown_lib=library_list
3.4.141 –xlang=f77
3.4.142 –xlibmil
3.4.143 –xlibmopt
3.4.144 –xlic_lib=sunperf
3.4.145 –xlicinfo
3.4.146 –xlinkopt[={1|2|0}]
3.4.147 –xloopinfo
3.4.148 –xmaxopt[=n]
3.4.149 –xmemalign[=<a><b>]
3.4.150 –xmodel=[small | kernel | medium]
3.4.151 –xnolib
3.4.152 –xnolibmil
3.4.153 –xnolibmopt
3.4.154 –xOn
3.4.155 –xopenmp[={parallel|noopt|none}]
3.4.156 –xpad
3.4.157 –xpagesize=size
3.4.158 –xpagesize_heap=size
3.4.159 –xpagesize_stack=size
3.4.160 –xparallel
3.4.161 –xpg
3.4.162 –xpp={fpp|cpp}
3.4.163 –xprefetch[=a[,a]]
3.4.163.1 Defaults:
3.4.163.2 Interactions:
3.4.163.3 Warnings:
3.4.164 –xprefetch_auto_type=indirect_array_access
3.4.165 -xprefetch_level={1|2|3}
3.4.166 –xprofile={collect[:name]|use[:name]|tcov}
3.4.167 –xprofile_ircache[=path]
3.4.168 –xprofile_pathmap=collect_prefix:use_prefix
3.4.169 –xrecursive
3.4.170 –xreduction
3.4.171 –xregs=r
3.4.172 –xs
3.4.173 –xsafe=mem
3.4.174 –xsb
3.4.175 –xsbfast
3.4.176 –xspace
3.4.177 –xtarget=t
3.4.177.1 Generic and Native Platforms
3.4.177.2 SPARC Platforms
3.4.177.3 x86 Platforms
3.4.178 –xtime
3.4.179 –xtypemap=spec
3.4.180 –xunroll=n
3.4.181 –xvector[= [[no%]lib, [no%]simd, %none] ]
3.4.182 –ztext
4. Fortran 95 Features and Differences
4.1 Source Language Features
4.1.1 Continuation Line Limits
4.1.2 Fixed-Form Source Lines
4.1.3 Tab Form
4.1.4 Source Form Assumed
4.1.4.1 Mixing Forms
4.1.4.2 Case
4.1.5 Limits and Defaults
4.2 Data Types
4.2.1 Boolean Type
4.2.1.1 Rules Governing Boolean Type
4.2.1.2 Alternate Forms of Boolean Constants
Octal
Hexadecimal
Hollerith
4.2.1.3 Alternate Contexts of Boolean Constants
4.2.2 Abbreviated Size Notation for Numeric Data Types
4.2.3 Size and Alignment of Data Types
4.3 Cray Pointers
4.3.1 Syntax
4.3.2 Purpose of Cray Pointers
4.3.3 Declaring Cray Pointers and Fortran 95 Pointers
4.3.4 Features of Cray Pointers
4.3.5 Restrictions on Cray Pointers
4.3.6 Restrictions on Cray Pointees
4.3.7 Usage of Cray Pointers
4.4 STRUCTURE and UNION (VAX Fortran)
4.5 Unsigned Integers
4.5.1 Arithmetic Expressions
4.5.2 Relational Expressions
4.5.3 Control Constructs
4.5.4 Input/Output Constructs
4.5.5 Intrinsic Functions
4.6 Fortran 2003 Features
4.6.1 Interoperability with C Functions
4.6.2 IEEE Floating-Point Exception Handling
4.6.3 Command-Line Argument Intrinsics
4.6.4 PROTECTED Attribute
4.6.5 Fortran 2003 Asynchronous I/O
4.6.6 Extended ALLOCATABLE Attribute
4.6.7 VALUE Attribute
4.6.8 Fortran 2003 Stream I/O
4.6.9 Fortran 2003 Formatted I/O Features
4.6.10 Fortran 2003 FLUSH I/O Statement
4.7 Additional I/O Extensions
4.7.1 I/O Error Handling Routines
4.7.2 Variable Format Expressions
4.7.3 NAMELIST Input Format
4.7.4 Binary Unformatted I/O
4.7.5 Miscellaneous I/O Extensions
4.8 Directives
4.8.1 Form of Special f95 Directive Lines
4.8.1.1 Fixed-Form Source
4.8.1.2 Free-Form Source
4.8.2 FIXED and FREE Directives
4.8.2.1 Scope
4.8.2.2 Uses
4.8.2.3 Restrictions
4.8.3 Parallelization Directives
4.9 Module Files
4.9.1 Searching for Modules
4.9.2 The -use=list Option Flag
4.9.3 The fdumpmod Command
4.10 Intrinsics
4.11 Forward Compatibility
4.12 Mixing Languages
5. FORTRAN 77 Compatibility: Migrating to Fortran 95
5.1 Compatible f77 Features
5.2 Incompatibility Issues
5.3 Linking With f77-Compiled Routines
5.3.1 Fortran 95 Intrinsics
5.4 Additional Notes About Migrating to the f95 Compiler
A. Runtime Error Messages
A.1 Operating System Error Messages
A.2 f95 Runtime I/O Error Messages
B. Features Release History
B.1 Sun Studio 12 Fortran Release
B.2 Sun Studio 11 Fortran Release
B.3 Sun Studio 10 Fortran Release:
B.4 Sun Studio 9 Fortran Release:
B.5 Sun Studio 8 Fortran Release:
B.6 Sun ONE Studio 7, Compiler Collection (Forte Developer 7) Release:
C. Legacy -xtarget Platform Expansions
D. Fortran Directives Summary
D.1 General Fortran Directives
D.2 Special Fortran 95 Directives
D.3 Fortran 95 OpenMP Directives
D.4 Sun Parallelization Directives
D.5 Cray Parallelization Directives
News Center
About Sun
Contact Sun
Terms of Use
Privacy
Copyright
1994-2009
Sun Microsystems, Inc.