Fortran User's Guide

Chapter 1 Introduction

The Sun Fortran compilers, f77 and f90, described in this book (and the companion book Sun Fortran Programming Guide) are available under the Solaris operating environment on the various hardware platforms that Solaris supports. The compilers themselves conform to published Fortran language standards, and provide many extended features, including multiprocessor parallelization, sophisticated optimized code compilation, and mixed C/Fortran language support.

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.

Features of the Fortran Compilers

Sun Fortran compilers provide the following features or extensions:

Other Fortran Utilities

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

Debugging Utilities

The following debugging utilities are available:

Sun Performance Library(TM)

The Sun Performance Library is a library of optimized subroutines and functions for computational linear algebra and Fourier transforms. It is based on the standard libraries BLAS1, BLAS2, BLAS3, LINPACK, LAPACK, FFTPACK, and VFFTPACK.

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 possibly more accurate.

See the performance_library README file for details.

Man Pages

On-line manual (man) pages provide immediate documentation about a command, function, subroutine, or collection of such things.

Sun WorkShop man pages are located in /opt/SUNWspro/man/ after a standard install of the products. Add this path to your MANPATH environment variable to access these Sun WorkShop 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: f77(1) is accessed with man f77. 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 following lists man pages of interest to Fortran user:

f77(1) and f90(1)

The Fortran compilers command-line options 

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 

fsplit(1)

Pre-processor splits Fortran 77 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 

READMEs

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 READMEs in a standard install would appear in: /opt/SUNWspro/READMEs/

Table 1-1 READMEs of Interest

README File 

Describes... 

 fortran_77

new and changed features, known limitations, documentation errata for this release of the FORTRAN 77 compiler, f77.

 fortran_90

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

 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. 

 64bit_Compilers

compiling for 64-bit Solaris 2.7 environments. 

 fpp_white_paper.ps

fpp, the Fortran pre-processor; this is a reference white paper in PostScript(TM) format and can be viewed using imagetool.

 performance_library

the Sun Performance Library 

The READMEs for all compilers are easily accessed by the -xhelp=readme command-line option. For example, the command:

f90 -xhelp=readme

will display the fortran_90 README file directly.

Command-Line Help

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


%f77 -help  -or-  
 f90 -help
_______________________________________________________________
Items within [ ] are optional. Items within < > are variable
parameters.Bar | indicates choice of literal values. For example:
   -someoption[=<yes|no>] implies  -someoption  is  
   -someoption=yes
_______________________________________________________________
-a:            Collect data for tcov basic block profiling
                   (old format)
-ansi:         Report non-ANSI extensions.
-arg=local:    Preserve actual arguments over ENTRY statements
-autopar:      Enable automatic loop parallelization 
                       (requires WorkShop license)
-Bdynamic:     Allow dynamic linking
-Bstatic:      Require static linking
-c:            Compile only - produce .o files, suppress linking
-C:            Enable runtime subscript range checking
-cg89:         Generate code for generic SPARC V7 architecture
-cg92:         Generate code for SPARC V8 architecture
-copyargs:     Allow assignment to constant arguments
...etc.