Contents
Introduction
About Sun WorkShop 6 f95
New Features
Software Corrections
Problems and Workarounds
Limitations and Incompatibilities
Documentation Errata
Shippable Libraries
Introduction
This document contains last minute information about Sun WorkShop 6 Fortran
95. It describes the software corrections addressed by this release and
lists known problems, limitations, and incompatibilities.
You can invoke the Fortran 95 compiler with either the f95
or f90 command at a shell prompt.
The text version of this document can be viewed by typing the following
at a command prompt:
example% f95 -xhelp=readme
To access the HTML version of this document, point your Netscape(TM) Communicator
4 or compatible browser to:
file:/opt/SUNWspro/docs/index.html
Note: If your Sun WorkShop software is not installed in the standard
/opt
directory, ask your system administrator for the equivalent path on your
system.
For more information about this product, see:
-
Sun WorkShop 6 Release Notes -- This documentation describes installation-related
and late-breaking information about this release. Information in the release
notes overrides information in all readme files.
-
f95(1) man page -- This man page
describes the f95 compiler options.
-
About Sun WorkShop 6 Documentation -- Describes the documentation available
with this Sun WorkShop release and how to access it.
-
What's New In Sun WorkShop 6 -- Describes the new features in this release
These documents are accessible in HTML by pointing your browser to
/opt/SUNWspro/docs/index.html.
in a standard installation of Sun WorkShop.
About Sun WorkShop 6 Fortran 95
Sun WorkShop 6 Fortran 95 (f95 and f90)
runs on SPARC(TM) processors running Solaris(TM) SPARC Platform Edition
versions 2.6, 7 and 8.
Note - Fortran on Solaris Intel IA-32 Platforms Discontinued:
Development of the Fortran compilers (f77 and f95)
and the Sun Performance Library for the Solaris Intel IA-32 platform has
been discontinued. We suggest you contact the Portland Group
(http://www.pgroup.com) about their
development tools for the Solaris IA-32 platform.
New Features
This release of Sun WorkShop 6 Fortran 95 includes the following new features:
Compliance: The Fortran 95 compiler is fully compliant with the
Fortran 95 standard.
New Command: The Fortran 95 compiler is invoked by both the f90
and f95 command. The f95 command is new.
f90
is equivalent to f95.
File Extensions: The compiler will accept source files with .f95
and .F95 extensions as well as .f90 and
.F90
Debugging Optimized Code: The restrictions on compiling with -g
have been relaxed so that it is now possible to compile at -O4
and -O5 and/or any of the parallelization flags (-parallel,
-explicitpar, -autopar) with debugging (-g).
F77 Flags: Most of the Fortran 77 compiler, f77,
compiler flags are now implemented in f95/f90. See
the f95
man page for details. These include:
-
-erroff turn off selected error messages
-
-errtags display error messages with tags
-
-ext_names create external names with/without underscores
-
-fpp specify source
code preprocessor
-
-loopinfo show which loops parallelized
-
-sbfast produce browser table information
-
-silent suppress compiler messages
-
-U allow lower and upper case
-
-u imply IMPLICIT NONE
-
-xcrossfile enable optimization across files
-
-xF allow function-level reordering for Analyzer
-
-xinline compile functions inline
-
-xtypemap specify default data sizes
-
-xprefetch allows automatic and explicit generation
of prefetch instructions on UltraSPARC platforms (-xprefetch=explicit
enables new $PRAGMA SPARC_PREFETCH directives).
New Flags: The following new flags are implemented in f95/f90:
-
-aligncommon align common block elements
to specified byte boundaries
-
-mp=openmp accept OpenMP
directives
-
-openmp
macro combination of options for OpenMP parallelization
-
-r8const
promote single-precision constants to REAL*8
-
-xia
enable interval arithmetic environment
-
-xinterval enable processing of interval
arithmetic extensions
-
-xmemalign specify general alignment of data
elements
-
-xrecursive allow recursive calls without
RECURSIVE
attribute
OpenMP: This release of Fortran 95 implements the OpenMP interface
for explicit parallelization, including a set of source code directives,
run-time library routines, and environment variables. Preliminary documentation
is available in an OpenMP README. The OpenMP
specifications can be viewed at http://www.openmp.org/
(Parallelization features require a Sun WorkShop HPC license.)
Interval Arithmetic Extensions: This release of Fortran 95 also
implements extensions for interval arithmetic computation. See the Fortran
95 Interval Arithmetic Programming Guide, and the README file
interval_arithmetic.html".
FORM="BINARY" I/O Extension: Specifying this new option
in an OPEN(..) statement causes the file to be treated as a sequential
binary (unformatted) file with no record marks. This enables data to be
written and read as a continuous stream of bytes, and provides compatibility
with other vendor systems. It is implemented in both the Fortran 95 (f95/f90)
and Fortran 77 (f77) compilers.
Effect of FORM="BINARY" on I/O operations:
WRITE statement: Data is written to the file in binary,
with as many bytes transferred as there is specified in the output list.
READ statement: Data is read into the variables on the
input list, with as many bytes transferred as demanded by the list. Because
there are no record marks on the file, there will be no "end-of-record"
error detection. The only error detected is end-of-file, or abnormal system
errors.
INQUIRE statement: INQUIRE on a file opened
with FORM="BINARY" returns:
FORM="BINARY"
ACCESS="SEQUENTIAL"
SEQUENTIAL="YES"
DIRECT="NO"
FORMATTED="NO"
UNFORMATTED="YES"
RECL= and NEXTREC= are undefined.
BACKSPACE statement: Not allowed - returns an error.
ENDFILE statement: Truncates file at current position,
as usual.
REWIND statement: Repositions file to beginning of data,
as usual.
Cray-Style Parallelization Directives: The AUTOSCOPE
qualifier has been implemented with Cray-style directives.
Enhanced Array Optimization: The compiler performs aggressive array
optimizations at levels -O4 and -O5. Please
report any problems you may encounter. Note that these optimizations can
be turned off by specifying -qoption f90comp -fenophoenix
Sun WorkShop online help now interprets f95 error
diagnostics in the Building window. Like C compiler error diagnostics,
these f95 error messages have hyperlinks to help pages
that explain the diagnostic message.
Software Corrections
Many of the problems reported with previous releases of the Fortran 95
compiler have been corrected in this release.
Problems and Workarounds
This section discusses the following software bugs that could not be fixed
in time for this release. (Check Hot News for Sun WorkShop 6 , http://www.sun.com/workshop/users/ws.html)
-
Compiler option -vpara does not function reliably and may
issue inaccurate messages.
-
Hollerith constants and character literals cannot be used
to initialize non-character arrays in DATA statements:
REAL PROC(2)
DATA PROC/4HPASS,
4HEXIT/
initializes the array, PROC, with zeros. (4323449).
-
Functions may lose their type information if annotated with $PRAGMA
C. For example:
INTEGER FUNCTION F( )
INTEGER THR_SELF
!PRAGMA C(THR_SELF)
F = THR_SELF()
treates THR_SELF as REAL instead of
INTEGER.
(4316430)
A workaround is to add an EXTERNAL statement and move the PRAGMA
to it:
INTEGER FUNCTION F( )
INTEGER THR_SELF
EXTERNAL THR_SELF
!PRAGMA C(THR_SELF)
F = THR_SELF()
-
MAXLOC with two arguments and MATMUL with
COMPLEX
and REAL(8) arrays sometimes fail without a message. Workaround
is to compile with -O4 or with -qoption f90comp
-fephoenix
(4312318, 4312287)
-
OpenMP: Under some circumstances involving a threadprivate common
block all of whose members have accessibility attribute PRIVATE,
compilation or run-time failures may result due to incorrect processing
of the common block. (4322172)
-
CSHIFT at Optimization Levels -O4 and -O5: Two problems have been
discovered with CSHIFT at higher optimization levels-
-
An expression containing two CSHIFT calls, one with a shift amount
of one, the other with minus one in the same dimension, is not processed
correctly, resulting in runtime errors:
x = cshift(a, shift=1) - cshift(a, shift=-1)
produces incorrect results in x. The workaround is to split the expression
into two statements:
x = cshift(a, shift=1)
x = x - cshift(a, shift=-1)
-
A CSHIFT where the DIM argument is an element of an array
may generate an internal compiler error:
integer, dimension(3)
:: v
integer, dimension(3,2)
:: a,b
integer, dimension(2)
:: dim
a = CSHIFT(b, v,
dim(1))
The workaround is to move the array element into a scalar variable,
and use the scalar instead:
d = dim(1)
a = CSHIFT(b, v,
d)
-
F95 Modules in Archive Libraries Not Included In Executable:
The debugger dbx requires all object files used in the compilation
to be included in the executable file. Usually, programs satisfy
this requirement with no extra work on the part of the user. An exceptional
case arises from the use of archives containing modules. If a program uses
a module, but does not reference any of the procedures or variables in
the module, the resulting object file will not contain references to the
symbols defined in the module. The linker only links with a object file
from an archive if there is a reference to a symbol defined in the object
file. If there is no such reference, the object file will not be
included in the executable file. Dbx will give a warning when it
tries to find the debugging information associated with the module that
was used. It will not be able to provide information about the symbols
whose debugging information is missing.
A user can work around the problem using the -u linker
option . This option takes a symbol as its option argument. It adds
that symbol to the set of undefined linker symbols, so it will have to
be resolved. The linker symbol associated with a module is normally
the module name with all letters in lower case followed by an underscore.
For example, to force the object file containing the module MODULE_1
to be taken from an archive, specify the linker option -u module_1_.
If linking using the f95 command, use the -Qoption
ld -umodule_1_ on the command line. (4314262)
-
Formatted or NAMELIST I/O in Parallelized Loop:
Neither formatted or NAMELIST I/O can be done from
within an explicitly parallelized loop. List-directed and unformatted I/O
are not affected. (4311602)
-
NAMELIST End-of-File Condition: NAMELIST input mishandles end-of-file
conditions on units other than the default input unit (* or 5), causing
other unrelated errors.
-
DBX "whatis" on Generic Functions:
The dbx whatis command on generic functions does not give information
on the specific functions. (4147582)
-
Compiler Does Not Recognize "Restricted Expressions":
F95 greatly expanded the forms allowed in 'restricted expressions'.
A 'restricted expression' is an expression in which each operation
is intrinsic and each primary is, for instance, the variable that
is made accessible by use association or host association or a variable
that is a sub-object of such a variable. (4307312)
-
Derived type, use only, causes internal error:
The workaround is to remove the only clause at the
time of use. (4316282)
Fortran 95 Derived Types and SCCS:
Because of SCCS's use of the percent sign (%) to delimit
single-letter ID keywords, users with Fortran 95 programs that define structure
components with single-letter names may see unexepected results when maintaining
their source code files under SCCS.
This is not necessarily a bug in the compiler, but rather a conflict
between the Fortran 95 language and the SCCS source code control system.
It can be avoided by not using single letter names for structure components
if you plan to manage your source codes with SCCS, or by retrieving the
files with the SCCS get option -k which ignores these
keywords, or by placing blanks around the %, as in X
% Y % Z.
Limitations and Incompatibilities
This section discusses the following incompatibilities between the Sun
WorkShop 6 Fortran 95 Compiler and previous releases.
Linking on SPARC V9 Platforms Under Solaris 7 and 8:
Many static system libraries, such as libm.a and libc.a,
are
not available in Solaris 7 or 8 environments on SPARC V9 platforms. Only
dynamic, shared libraries, libm.so and libc.so,
are provided. This means that -Bstatic and -dn
compiler options may cause linking errors on SPARC V9 platforms with Solaris
7 or 8. Applications must use dynamic libraries in these cases.
To explicitly link with a static version of a user library while linking
dynamically system libraries, use a command line that looks something like:
f95 -o prog prog.f -Bstatic -lxyz -labc -Bdynamic
This will link with libxyz.a and libabc.a,
but all other libraries, including system libraries, will be linked dynamically.
Array Intrinsic Functions Use Global Registers:
The array intrinsic functions ANY, ALL, COUNT, MAXVAL, MINVAL,
SUM, PRODUCT, DOT_PRODUCT, and MATMUL are highly
tuned for the appropriate SPARC platform architectures. As a result, they
use the global registers %g2, %g3, and %g4 as scratch registers.
User code should not assume these registers are available for temporary
storage if calls are made to the array intrinsics listed above. Data in
these registers will be overwritten when the array intrinsics are called.
Documentation Errata
The Fortran User's Guide does not mention generic64 and
native64
as possible settings for -xtarget,
-xarch,
and -xchip. See the f95(1) man page for
details.
Shippable Libraries
If your executable uses a Sun dynamic library listed in the file named
below, your license includes the right to redistribute the library to your
customer.
/opt/SUNWspro/READMEs/runtime.libraries
in a standard install of Sun WorkShop
You may not redistribute or otherwise disclose the header files, source
code, object modules, or static libraries of object modules in any form.
The License to Use appears in the End User Object Code License, viewable
from the back of the plastic case containing the CDROM.
Copyright
2000 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, CA 94303,
U.S.A. All rights reserved.
Sun, Sun Microsystems, the Sun logo, docs.sun.com, and Solaris are
trademarks, registered trademarks, or service marks of Sun Microsystems
Inc. in the U.S. and other countries. |
|