C H A P T E R  1

Introduction

The Suntrademark Studio Fortran 95 compiler, f95, described here and in the companion Fortran Programming Guide, is available under the Solaris operating environment on SPARC® and UltraSPARC® platforms. The compiler conforms to published Fortran language standards, and provides many extended features, including multiprocessor parallelization, sophisticated optimized code compilation, and mixed C/Fortran language support.

The f95 compiler also provides a Fortran 77 compatibility mode that accepts most legacy Fortran 77 source codes. There is no longer a separate Fortran 77 compiler. See Chapter 5 for information on FORTRAN 77 compatibility and migration issues.


1.1 Standards Conformance

The responsible standards bodies may revise these standards from time to time. The versions of the applicable standards to which these compilers conform may be revised or replaced, resulting in features in future releases of the Sun Fortran compilers that create incompatibilities with earlier releases.


1.2 Features of the Fortran 95 Compiler

The Sun Studio Fortran 95 compiler provides the following features and extensions:

See Appendix B for details on new and extended features added to the compiler with each software release.


1.3 Other Fortran Utilities

The following utilities provide assistance in the development of software programs in Fortran:


1.4 Debugging Utilities

The following debugging utilities are available:


1.5 Sun Performance Library

The Sun Performance Librarytrademark is a library of optimized subroutines and functions for computational linear algebra and Fourier transforms. It is based on the standard libraries LAPACK, BLAS1, BLAS2, BLAS3, FFTPACK, VFFTPACK, and LINPACK generally available through Netlib (www.netlib.org).

Each subprogram in the Sun Performance Library performs the same operation and has the same interface as the standard library versions, but is generally much faster and accurate and can be used in a multiprocessing environment.

See the performance_library README file, and the Sun Performance Library User's Guide for details. (Man pages for the performance library routines are in section 3P.)


1.6 Interval Arithmetic

The Fortran 95 compiler provides the compiler flags -xia and -xinterval to enable new language extensions and generate the appropriate code to implement interval arithmetic computations.

See the Fortran 95 Interval Arithmetic Programming Reference for details.


1.7 Man Pages

Online manual (man) pages provide immediate documentation about a command, function, subroutine, or collection of such things. See the Preface for the proper setting of the MANPATH environment variable for accessing Sun Studio man pages.)

You can display a man page by running the command:

demo% man topic

Throughout the Fortran documentation, man page references appear with the topic name and man section number: f95(1) is accessed with man f95. Other sections, denoted by ieee_flags(3M) for example, are accessed using the -s option on the man command:

demo% man -s 3M ieee_flags

The Fortran library routines are documented in the man page section 3F.

The following lists man pages of interest to Fortran users:

f95(1)

The Fortran 95 command-line options

analyzer(1)

Performance Analyzer

asa(1)

Fortran carriage-control print output post-processor

dbx(1)

Command-line interactive debugger

fpp(1)

Fortran source code pre-processor

cpp(1)

C source code pre-processor

fdumpmod(1)

Display contents of a MODULE (.mod) file.

fsplit(1)

Pre-processor splits Fortran source routines into single files

ieee_flags(3M)

Examine, set, or clear floating-point exception bits

ieee_handler(3M)

Handle floating-point exceptions

matherr(3M)

Math library error handling routine

ild(1)

Incremental link editor for object files

ld(1)

Link editor for object files



1.8 README Files

The READMEs directory contains files that describe new features, software incompatibilities, bugs, and information that was discovered after the manuals were printed. The location of this directory depends on where your software was installed. The path is: /opt/SUNWspro/READMEs/.

TABLE 1-1 READMEs of Interest

README File

Describes...

fortran_95

new and changed features, known limitations, documentation errata for this release of the Fortran 95 compiler, f95.

fpp_readme

overview of fpp features and capabilities

interval_arithmetic

overview of the interval arithmetic features in f95

math_libraries

optimized and specialized math libraries available.

profiling_tools

using the performance profiling tools, prof, gprof, and tcov.

runtime_libraries

libraries and executables that can be redistributed under the terms of the End User License.

performance_library

overview of the Sun Performance Library


The README file for each compiler is easily viewed by the -xhelp=readme command-line option. For example, the command:

% f95 -xhelp=readme

displays the fortran_95 README file directly.


1.9 Command-Line Help

You can view very brief descriptions of the f95 command line options by invoking the compiler's -help option as shown below:

%f95 -help=flags
Items within [ ] are optional. Items within < > are variable parameters.
Bar | indicates choice of literal values.
-someoption[={yes|no}] implies -someoption is equivalent to -someoption=yes
_______________________________________________________________
-a 								Collect data for tcov basic block profiling
-aligncommon[=<a>] Align common block elements to the specified                    boundary requirement; <a>={1|2|4|8|16}
-ansi 								Report non-ANSI extensions.
-autopar           Enable automatic loop parallelization
-Bdynamic          Allow dynamic linking
-Bstatic           Require static linking
-C                 Enable runtime subscript range checking
-c                 Compile only; produce .o files but suppress 
                   linking
...etc.