The SunTM Studio Fortran 95 compiler, f95, described here and in the companion Fortran User’s Guide, is available under the SolarisTM operating environment on SPARC®, UltraSPARC®, and x64/x86 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. A separate Fortran 77 compiler is no longer included. See Chapter 5 of the Fortran User’s Guide for information on FORTRAN 77 compatibility and migration issues.
f95 conforms to part one of the ISO/IEC 1539-1:1997 Fortran standards document.
Floating-point arithmetic is based on IEEE standard 754-1985, and international standard IEC 60559:1989.
f95 provides support for the optimization-exploiting features of the SPARC and x86 families of processor architectures: UltraSPARC, SPARC64, AMD64, Pentium Pro, and Xeon Intel®64, on Solaris and Linux platforms.
Sun Studio compilers conform to the OpenMP 2.5 shared memory parallelization API specifications. See the OpenMP API User's Guide for details.
In this document, “Standard” means conforming to the versions of the standards listed above. “Non-standard” or “Extension” refers to features that go beyond these versions of these standards.
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.
The Sun Studio Fortran 95 compiler provides the following features and extensions:
Global program checking across routines for consistency of arguments, commons, parameters, and the like.
Optimized automatic and explicit loop parallelization for multiprocessor systems.
VAX/VMS Fortran extensions, including:
Structures, records, unions, maps
Recursion
OpenMP 2.5 parallelization directives.
Global, peephole, and potential parallelization optimizations produce high performance applications. Benchmarks show that optimized applications can run significantly faster when compared to unoptimized code.
Common calling conventions on Solaris systems permit routines written in C or C++ to be combined with Fortran programs.
Support for 64-bit enabled Solaris environments on UltraSPARC and x64 platforms.
Call-by-value using %VAL.
Compatibility between Fortran 77 and Fortran 95 programs and object binaries.
Interval Arithmetic programming.
Some Fortran 2003 features, including Stream I/O.
See Appendix B of the Fortran User’s Guide for details on new and extended features added to the compiler with each software release.
The following utilities provide assistance in the development of software programs in Fortran:
Sun Studio Performance Analyzer— In depth performance analysis tool for single threaded and multi-threaded applications. See analyzer(1).
asa— This Solaris utility is a Fortran output filter for printing files that have Fortran carriage-control characters in column one. Use asa to transform files formatted with Fortran carriage-control conventions into files formatted according to UNIX line-printer conventions. See asa(1).
fdumpmod— A utility to display the names of modules contained in a file or archive. See fdumpmod(1).
fpp— A Fortran source code preprocessor. See fpp(1).
fsplit — This utility splits one Fortran file of several routines into several files, each with one routine per file. Use fsplit on FORTRAN 77 or Fortran 95 source files. See fsplit(1)
The following debugging utilities are available:
-Xlist— A compiler option to check across routines for consistency of arguments, COMMON blocks, and so on.
Sun Studio dbx—Provides a robust and feature-rich runtime and static debugger, and includes a performance data collector.
The Sun Performance LibraryTM 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.)
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. (Interval arithmetic features are only supported on SPARC/UltraSPARC platforms.)
Online manual (man) pages provide immediate documentation about a command, function, subroutine, or collection of such things. The user's MANPATH environment variable should be set to the path of the installed Sun Studio man directory to access the Sun Studio man pages. Typically this is /opt/SUNWspro/man on Solaris.
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) |
Sun Studio 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 |
The README pages on the Sun Developer Network (SDN) portal (http://developers.sun.com/sunstudio) describe new features, software incompatibilities, bugs, and information that was discovered after the manuals were printed. These README pages are part of the documentation on the portal for this release, and are also linked from the HTML documentation index that is part of the installed software at file:/opt/SUNWspro/docs.
Table 1–1 README Pages of Interest
README Page |
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 |
openmp |
new and changed features in the OpenMP parallelization API |
The URL to the README page for each compiler is displayed by the -xhelp=readme command-line option. For example, the command:
% f95 -xhelp=readme |
displays the URL for viewing the fortran_95 README for this release on the SDN portal.
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. |