| Fortran User's Guide |
Features Release History
This Appendix lists the new and changed features in this and previous release of
f77andf95:Fortran 95 New Features and Changes
This section lists the new features and behavior changes specific to this Sun WorkShop 6 release of
f95and previous releases.New Features in
f95for Sun WorkShop 6:The following lists the new and changed features in the Fortran 95 compiler released with Sun Performance WorkShop 6:
- Compliance: The
f95is fully compliant with the Fortran 95 standard.- New Command: The Fortran 95 compiler can be invoked by either the
f95orf90command.- Debugging Optimized Code: Restrictions limiting use of
-gwith other options has been relaxed, allowing debugging parallelized and-O4or-O5optimized codes with dbx and the Sun WorkShop debugger.- Source Filename Extensions: The compiler will accept source files with
.f95and.f90filename extensions as well as.F95and.F90.- Interval Arithmetic: This release implements a number of extensions that enable interval arithmetic computations. See the Interval Arithmetic Programming Reference, and
interval_arithmeticREADME for details.- Enhanced Array Optimizations: The compiler now performs aggressive array optimizations at levels
-O4and-O5.- Hyper-Linked Diagnostic Messages: Sun WorkShop online help now interprets
f95error diagnostics in the Building window, creating hypertext links from the error message to descriptive online help.- OpenMP: The compiler accepts OpenMP explicit parallelization directives. The OpenMP specifications can be viewed at
http://www.openmp.org/AUTOSCOPEadded to Cray-styleDOALLparallelization directive.- New/Changed Command-Line Options:
-aligncommonaligns COMMON block elements to specific byte boundaries.-r8constpromotes single-precision data constants toREAL*8.-xintervaland-xiaenable interval arithmetic extensions.-xmemalignspecifies general alignment in memory of data elements.-mp=openmpand-openmpenable native compilation of OpenMP explicit parallelization directives.-xprefetch(for enabling UltraSPARC prefetch instructions) has been expanded to include additional sub-options.-xrecursiveallows recursive calls from subprograms without theRECURSIVEattribute.-xtypemaphas an expanded set of possible data type specifications.-fastextended to set-O5,-fsimple=2,-xvector=yes, and-pad=common.- Use of
f95's parallelization features requires a Sun WorkShop HPC license.New Features Released In
f902.0:The following new and changed features appeared in the
f902.0 compiler released with Sun WorkShop 5.0 over the earlierf901.2 release:
- New options:
- Most
f77options now recognized byf90.-fpoverdetects floating-point overflows in I/O processing.-xcode=code specifies the memory address model on SPARC platforms.-xcommonchkenables runtime checking for inconsistent COMMON block declarations.-xprefetchallows the compiler to generate prefetch instructions on UltraSPARC II platforms.-xvectorallows the compiler to replace certain math library calls within DO loops with single calls to a vectorized math routine.- Changed options:
-xcrossfile[=n]- optional level number added.-fns[={yes|no}]- optional yes/no added.-Ztha- option now ignored.- New Features:
- Compile for the 64-bit Solaris 7 environment on 64-bit SPARC platforms with
-xarch=v9orv9a.- Support in the I/O library for large files (larger than 2 Gigabytes).
- Support for large arrays on 64-bit Solaris operating environments.
- Accepts Sun-style directives by default.
- The
REDUCTIONdirective accepts arrays in the list of variables.- SPARC: A
TASKCOMMONdirective declares variables in COMMON to be private.- New optimization pragma allows setting the compilers optimization level on a routine by routine basis.
- I/O Differences (Comparing
f902.0 against the 1.2 release):
- NAMELIST Output Format:
- 1.2: All variables in a single print statement written to a single line without line breaks. 2.0: Each variable printed to a separate line.
- 1.2: Comma used to separate values. 2.0: Single blank separates values.
- 1.2: Repeated values output using the r* form: 3*8.22 2.0: All repeated values output explicitly: 8.22 8.22 8.22
- 1.2: No trailing zero printing integer floating point: 1. 2.0: Floating point integers print with trailing zero: 1.0
- 1.2: Value printed may not be the same value when read into a variable with the same type: 0.1 when read in will print as 0.100000001 2.0: Prints the minimum number of digits required to ensure that a value written produces the same value when read back in: 0.1 prints as 0.1
- 1.2: As required by the standard, zero value prints in exponent form. But 1.2 prints 0.E+0 2.0: Prints zero as 0.0E+0
- 1.2: Prints a space between the comma and the imaginary part of a complex value: (1., 0.E+0) 2.0: No comma: (1.0,0.0E+0)
- NAMELIST Input Format:
- 2.0: Allow the group name to be preceded by
$or&on input. The&is the only form accepted by the Fortran 90 standard, and is what is written by NAMELIST output.- 2.0: Accepts
$as the symbol terminating input except if the last data item in the group is CHARACTER, in which case it is treated as input data.- 2.0: Allows NAMELIST input to start in the first column of a record.
PRINT *no longer comma-delimits output.OPEN FORM='BINARY'permits I/O of non-standard raw text without record marks: Opening a file withFORM='BINARY'has roughly the same effect asFORM='UNFORMATTED', except that no record lengths are embedded in the file. Without this data, there is no way to tell where one record begins, or ends. Thus, it is impossible toBACKSPACEaFORM='BINARY'file, because there is no way of telling where to backspace to. AREADon a'BINARY'file will read as much data as needed to fill the variables on the input list. See Appendix C or the Fortran 77 Language Reference for details.- Recursive I/O possible on different units (this is because the
f90I/O library is "MT-Warm").- RECL=2147483646 (231-2) is the default record length on sequential formatted, list directed, and namelist output. (Default was 267).
ENCODEandDECODEare recognized and implemented as described in the FORTRAN 77 Language Reference Manual.- Naming of scratch files is the same as with
f77.- Non-advancing I/O is enabled with
ADVANCE='NO', as in:
write(*,'(a)',ADVANCE='NO') 'n= '
read(*,*) n
- Handling of I/O on internal files follows the Fortran 90 standard more closely than was the case with
f901.2. Also, calls to routines that do internal I/O are allowed on I/O lists. This was not allowed with 1.2 (orf77).- Operational Differences:
- Modules are handled differently: Compiling a source code that contains one or more
MODULEunits now causes an information file ( name.mod ) to be generated for each module. The name of this information file is the name of the module, in lower case, with.modsuffix. A.modfile must be available before the module can appear on aUSEstatement. This means that allMODULEfiles must be compiled (and the module information files created) before compiling any file referencing aMODULEin aUSEstatement-ftrap=commonis the default trapping mode.- Routines from the Sun Performance Library are automatically linked to perform array operations.
- New Language Elements:
- Some Fortran 95 elements are implemented:
The attributesPUREandELEMENTALThe enhanced forms ofMAXVALandMINVAL- New data types are recognized:
COMPLEX*32 REAL*16(also
INTEGER*8*1,*2)LOGICAL*8(also*1,*2)- Some data representations have changed from
f901.2:
INTEGER*2is now 2 bytes, not 4
INTEGER*1is now 1 byte, not 4
LOGICAL*2is now 2 bytes, not 4
LOGICAL*1is now 1 byte, not 4
This will affect programs that read binary data files containing these data items that were written withf90programs compiled with the 1.2 compiler. A workaround would be to change the declarations to beINTEGER*4orLOGICAL*4instead of*1or*2when compiling with 2.0.- Call by value,
%VAL, is implemented in the same manner asf77. The only difference is thatf902.0 allowsREAL*8andREAL*16to be passed to C routines as doubles and long doubles.f77and C Interoperability withf902.0:
- To mix
f77andf90object binaries, link with thef77compatibility library,libf77compat, and not withlibF77. For example, perform the link step withf90..files..-lf77compateven if the main program is anf77program.- The structure of
f90COMMON is now compatible withf77.f90scalar pointers are compatible with C pointers.Fortran 77 New Features and Changes
This section lists the new features and behavior changes specific to
f77in this and previous releases.New Features in
f77for Sun WorkShop 6:Sun WorkShop 6 Fortran 77 includes the following new and changed features:
- I/O Extension: Opening a file with
OPEN(FORM='BINARY')treats the file as a sequential binary (unformatted) file with no record marks. See the Fortran 77 Language Reference for details.- Debugging Optimized Code: Restrictions limiting use of
-gwith other options has been relaxed, allowing debugging parallelized and-O4or-O5optimized codes with dbx and the Sun WorkShop debugger.- New/Changed Command-Line Options:
-aligncommonaligns COMMON block elements to specific byte boundaries.-r8constpromotes single-precision data constants to REAL*8-xmemalignspecifies general alignment in memory of data elements.-xprefetch(for enabling UltraSPARC prefetch instructions) has been expanded to include additional sub-options.-xtypemaphas an expanded set of possible data type specifications.-fastextended to set-O5,-fsimple=2,-xvector=yes, and-pad=common.- Use of
f77's parallelization features requires a Sun WorkShop HPC license.- Hyper-Linked Diagnostic Messages: Sun WorkShop online help now interprets
f77error diagnostics in the Building window, creating hypertext links from the error message to descriptive online help.Features in
f775.0:
f775.0 included the following new and changed features:
- New options:
-fpoverdetects floating-point overflows in I/O processing.-xcode=code specifies the memory address model on SPARC platforms.-xcommonchkenables runtime checking for inconsistent COMMON block declarations.-xmaxoptenables theOPT=n pragma and controls the maximum optimization level allowed byOPTpragmas in the source code.-xprefetchallows the compiler to generate prefetch instructions on UltraSPARC II platforms.-xvectorallows the compiler to replace certain math library calls within DO loops with single calls to a vectorized math routine.- Changed options:
-xcrossfile[=n]- optional level number added.-fns[={yes|no}]- optional yes/no added.-Ztha- option now ignored.- New Features:
- Compile for the 64-bit Solaris 7 environment on 64-bit SPARC platforms with
-xarch=v9orv9a.- Support in the I/O library for large files (larger than 2 Gigabytes).
- Support for large arrays on 64-bit Solaris 7 environments.
- Dynamic arrays (local arrays with dynamic size) implemented (see FORTRAN 77 Language Reference Manual).
- The
REDUCTIONdirective accepts arrays in the list of variables.- SPARC: A
TASKCOMMONdirective declares variables in COMMON to be private.- Fortran 90 style constants that allows specification of byte size (for example, 12345678_8 for a 64-bit, 8-byte, constant).
- New optimization pragma allows setting the compilers optimization level on a routine by routine basis.
- Year 2000 safe
date_and_time()library routine.Features in
f774.2:
f774.2 included the following features that were new or changed since the 4.0 release:n
- New options:
-xpp=fpp|cpp
- Changed options:
- Options
-fround, -fsimple, -ftrap, -xprofile=tcov,now available on Intel platforms.
-xspace, -xunroll-xtarget, -xarch, -xchipexpanded for SPARC Ultra and Intel platforms.-vax=expanded to enable selection/deselection of individual VAX/VMS Fortran features.- Default sourcefile preprocessor is fpp(1) rather than cpp(1).
FORTRAN 77 Upward Compatibility
The FORTRAN 77 5.0 source is compatible with earlier releases, except for minor changes due to operating system changes and bug fixes.
Fortran 3.0/3.0.1 to 4.0
Executables (
a.out), libraries (.a), and object files (.o) compiled and linked in Fortran 3.0/3.0.1 under Solaris 2 are compatible with Fortran 5.0 under Solaris 2.BCP: Running Applications from Solaris 1
You must install the Binary Compatibility Package for the executable to run.
Executables compiled and linked in Solaris 1 do run in Solaris 2, but they do not run as fast as when they are compiled and linked under the appropriate Solaris release.
Libraries (
.a) and object files (.o) compiled and linked in Fortran 2.0.1 under Solaris 1 are not compatible with Fortran 5.0.
|
Sun Microsystems, Inc. Copyright information. All rights reserved. Feedback |
Library | Contents | Previous | Next | Index |