Sun Logo


Fortran User's Guide

Forte Developer 7

816-2457-10



Contents

Before You Begin

Typographic Conventions

Shell Prompts

Accessing Forte Developer Development Tools and Man Pages

Accessing Forte Developer Documentation

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 Forte Developer 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.2 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

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

-a

-aligncommon[=n]

-ansi

-autopar

-B{static|dynamic}

-C

-c

-cg89

-cg92

-copyargs

-Dname[=def]

-dalign

-dbl_align_all={yes|no}

-depend

-dn

-dryrun

-d{y|n}

-e

-erroff=taglist

-errtags[={yes|no}]

-explicitpar

-ext_names=e

-F

-f

-f77[=list]

-fast

-fixed

-flags

-fnonstd

-fns[={no|yes}]

-fpover[={yes|no}]

-fpp

-free

-fround=r

-fsimple[=n]

-ftrap=t

-G

-g

-hname

-help

-Ipath

-inline=[%auto][[,][no%]f1,...[no%]fn]

-iorounding=mode

-Kpic

-KPIC

-Lpath

-lx

-libmil

-loopinfo

-Mpath

-moddir=path

-mp={%none|sun|cray|openmp}

-mt

-native

-noautopar

-nodepend

-noexplicitpar

-nolib

-nolibmil

-noreduction

-norunpath

-O[n]

-O

-O1

-O2

-O3

-O4

-O5

-o name

-onetrip

-openmp

-PIC

-p

-pad[=p]

-parallel

-pg

-pic

-Qoption pr ls

-qp

-R ls

-r8const

-reduction

-S

-s

-sb

-sbfast

-silent

-stackvar

-stop_status=yn

-temp=dir

-time

-U

-Uname

-u

-unroll=n

-use=list

-V

-v

-vpara

-w[n]

-Xlist[x]

-xa

-xalias[=type_list]

-xarch=isa

-xautopar

-xcache=c

-xcg89

-xcg92

-xcheck=v

-xchip=c

-xcode=addr

-xcommonchk[={no|yes}]

-xcrossfile[=n]

-xdepend

-xexplicitpar

-xF

-xhasc[={yes|no}]

-xhelp=h

-xia[=v]

-xild{off|on}

-xinline=list

-xinterval[=v]

-xipo[={0|1|2}]

-xknown_lib=library

-xlang=f77

-xlibmil

-xlibmopt

-xlic_lib=sunperf

-xlicinfo

-xloopinfo

-xmaxopt[=n]

-xmemalign[=<a><b>]

-xnolib

-xnolibmil

-xnolibmopt

-xOn

-xopenmp

-xpad

-xparallel

-xpg

-xpp={fpp|cpp}

-xprefetch[=a[,a]]

-xprefetch_level=n

-xprofile=p

-xrecursive

-xreduction

-xregs=r

-xs

-xsafe=mem

-xsb

-xsbfast

-xspace

-xtarget=t

-xtime

-xtypemap=spec

-xunroll=n

-xvector[={yes|no}]

-ztext

4. Fortran 95 Features and Differences

4.1 Language Features and Extensions

4.1.1 Continuation Line Limits

4.1.2 Fixed-Form Source Lines

4.1.3 Source Form Assumed

4.1.4 Known Limits

4.1.5 Boolean Type

4.1.6 Abbreviated Size Notation for Numeric Data Types

4.1.7 Size and Alignment of Data Types

4.1.8 Cray Pointers

4.1.9 Other Language Extensions

4.1.10 I/O Extensions

4.2 Directives

4.2.1 Form of Special f95 Directive Lines

4.2.2 FIXED and FREE Directives

4.2.3 Parallelization Directives

4.3 Module Files

4.3.1 Searching for Modules

4.3.2 The -use=list Option Flag

4.3.3 The fdumpmod Command

4.4 Intrinsics

4.5 Forward Compatibility

4.6 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 Fortran 95 New Features and Changes

B.1.1 Forte Developer 7 Release:

C. -xtarget Platform Expansions

D. Fortran Directives Summary

D.1 General Fortran Directives

D.2 Special Fortran 95 Directives

D.3 Sun Parallelization Directives

D.4 Cray Parallelization Directives

D.5 Fortran 95 OpenMP Directives

Index