Contidos dentro
Localizar Mais Documentação
Destaques de Recursos de Suporte
| Fazer download desta apostila em PDF (349 KB)
Appendix B Features Release History
This Appendix lists the new and changed features in this and previous release of f77 and f90:
f77 New Features and Changes
This section lists the new features and behavior changes specific to f77 in this and previous releases.
Features in f77 5.0 That are New Since 4.2
f77 5.0 includes the following new and changed features:
-
New options:
-
-fpover detects floating-point overflows in I/O processing.
-
-xcode=code specifies the memory address model on SPARC platforms.
-
-xcommonchk enables runtime checking for inconsistent COMMON block declarations.
-
-xmaxopt enables the OPT=n pragma and controls the maximum optimization level allowed by OPT pragmas in the source code.
-
-xprefetch allows the compiler to generate prefetch instructions on UltraSPARC II platforms.
-
-xvector allows 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=v9 or v9a.
-
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 REDUCTION directive accepts arrays in the list of variables.
-
SPARC: A TASKCOMMON directive 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 f77 4.2 That are New Since 4.0
f77 4.2 includes the following features that are new or changed since the 4.0 release:
-
Changed options:
-
Options -fround, -fsimple,
-ftrap, -xprofile=tcov,
-xspace, -xunroll now available on Intel platforms.
-
-xtarget, -xarch, -xchip expanded 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).
Features in f77 4.0 that are New Since 3.0/3.0.1
f77 4.0 includes the following features that are new or changed since 3.0/3.0.1:
-
The DOSERIAL and DOSERIAL* parallel directives have been added, and the DOALL directive expanded.
-
A directive for unrolling loops has been added.
-
The -Idir option now also affects the f77 INCLUDE statement, not only the preprocessor #include directive.
-
The Incremental Linker is available. It provides faster linking and speeds up development.
-
The -oldstruct command-line option has been deleted.
-
The following new synonyms have been added: -xautopar, -xdepend, -xexplicitpar, -xloopinfo, -xparallel, -xreduction, and
-xvpara.
-
The -stackvar restrictions EQUIVALANCE, NAMELIST, STRUCTURE, and RECORD have been removed.
-
New options have been added (and some changed):
Table B-1 New Features in f77 4.0
Since 3.0/3.0.1
|
-arg=local
|
Pass by value result.
|
|
-copyargs
|
Allow assignment to constant arguments.
|
|
-dbl
|
Double the default size for integers, reals, and so forth.
|
|
-ext_names=e
|
Make external names with or without underscores.
|
|
-fns
|
Turn on SPARC non-standard floating-point mode (SPARC).
|
|
-fround=r
|
Set the IEEE rounding mode in effect at startup (SPARC).
|
|
-fsimple[=n]
|
Allow levels of simple floating-point model.
|
|
-ftrap=t
|
Set the IEEE trapping mode in effect at startup (SPARC).
|
|
-mp=x
|
Use either Sun-style or Cray-style MP directives (SPARC).
|
|
-O5
|
Attempt the highest level of optimization.
|
|
-pad=p
|
Pad local variables or common blocks
|
|
-vax=v
|
Specify a choice of VMS features to use.
|
|
-xarch=a
|
Limit the set of instructions the compiler may use (SPARC).
|
|
-xcache=c
|
Define the cache properties for use by the optimizer (SPARC).
|
|
-xchip=c
|
Specify the target processor for use by the optimizer (SPARC).
|
|
-xhelp=h
|
Show help information for README file or for options (flags).
|
|
-xildoff
|
Turn off the Incremental Linker (SPARC).
|
|
-xildon
|
Turn on the Incremental Linker (SPARC).
|
|
-xprofile=p
|
Collect data for a profile or use a profile to optimize (SPARC).
|
|
-xregs=r
|
Specify the usage of registers for the generated code (SPARC).
|
|
-xsafe=mem
|
Allow compiler to assume no memory-based traps (SPARC).
|
|
-xspace
|
Do no optimizations that increase the code size (SPARC).
|
|
-xtarget=t
|
Specify target system for instruction set (SPARC).
|
|
-ztext
|
Do not make the library if relocations remain.
|
-
DO-loop code is now implemented differently to allow better optimization and loop parallelization. Legal DO-loops behave exactly the same as before; however, illegal DO-loops--zero-step, loop variable modified within the loop--may display different behavior.
-
The following libV77 library routines: date, mvbits, ran, and secnds, are now folded into the libF77 library. That is, you no longer need to compile with the -lV77 option to get these routines.
-
The OPEN statement now contains a new keyword specifier, ACTION=act, where act is READ, WRITE, or READWRITE.
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 in 2
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.
f90 New Features and Changes
This section lists the new features and behavior changes specific to this 5.0 release of f90.
New Features in f90 2.0 Since 1.2:
-
New options:
-
Most f77 options now recognized by f90.
-
-fpover detects floating-point overflows in I/O processing.
-
-xcode=code specifies the memory address model on SPARC platforms.
-
-xcommonchk enables runtime checking for inconsistent COMMON block declarations.
-
-xprefetch allows the compiler to generate prefetch instructions on UltraSPARC II platforms.
-
-xvector allows 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=v9 or v9a.
-
Support in the I/O library for large files (larger than 2 Gigabytes).
-
Support for large arrays on 64-bit Solaris 7 environments.
-
Accepts Sun-style directives by default.
-
The REDUCTION directive accepts arrays in the list of variables.
-
SPARC: A TASKCOMMON directive 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:
-
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.
-
OPEN FORM='BINARY' permits I/O of non-standard raw text without record marks: Opening a file with FORM='BINARY' has roughly the same effect as FORM='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 to BACKSPACE a FORM='BINARY' file, because there is no way of telling where to backspace to. A READ on a 'BINARY' file will read as much data as needed to fill the variables on the input list.
-
Non-advancing I/O is enabled with ADVANCE='NO', as in:
write(*,'(a)',ADVANCE='NO')
'n= '
read(*,*) n
-
Operational Differences:
-
Modules are handled differently: Compiling a source code that contains one or more MODULE units 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 .mod suffix. A .mod file must be available before the module can appear on a USE statement. This means that all MODULE files must be compiled (and the module information files created) before compiling any file referencing a MODULE in a USE statement
-
New Language Elements:
-
Some data representations have changed from f90 1.2:
INTEGER*2 is now 2 bytes, not 4
INTEGER*1 is now 1 byte, not 4
LOGICAL*2 is now 2 bytes, not 4
LOGICAL*1 is now 1 byte, not 4
This will affect programs that read binary data files containing these data items that were written with f90 programs compiled with the 1.2 compiler. A workaround would be to change the declarations to be INTEGER*4 or LOGICAL*4 instead of *1 or *2 when compiling with 2.0.
|