VAX FORTRAN V5.4 Release Notes
5 December 1989
This document contains information about new features in VAX
FORTRAN V5.4, differences between V5.4 and previous
versions, corrections included in VAX FORTRAN V5.4, and
other topics. Also included is information about changes to
VAX FORTRAN from versions V5.0 through V5.3. This document
is of interest to both system management and application
programmers.
CONTENTS
CHAPTER 1 VAX FORTRAN V5.4 RELEASE NOTES
1.1 Installing VAX FORTRAN V5.4 . . . . . . . . . . . 1-1
1.2 Compatibility . . . . . . . . . . . . . . . . . . 1-1
1.2.1 Source Language . . . . . . . . . . . . . . . . 1-1
1.2.2 VAX FORTRAN Compiler . . . . . . . . . . . . . . 1-2
1.2.3 Object Modules . . . . . . . . . . . . . . . . . 1-3
1.2.4 VAX Language Sensitive Editor . . . . . . . . . 1-4
1.2.5 VAX Source Code Analyzer . . . . . . . . . . . . 1-4
1.2.6 VAX Common Data Dictionary . . . . . . . . . . . 1-4
1.3 Overview Of VAX FORTRAN V5.4 . . . . . . . . . . . 1-4
1.3.1 VAXset Program Design Facility . . . . . . . . . 1-4
1.3.1.1 /DESIGN Compile Command Qualifier . . . . . . . 1-5
1.3.1.2 Comment Analysis . . . . . . . . . . . . . . . . 1-6
1.3.1.3 Placeholder Analysis . . . . . . . . . . . . . . 1-7
1.3.1.3.1 Allowed Contexts For Placeholders . . . . . . . 1-8
1.3.1.4 Source Program Diagnostic Messages . . . . . . . 1-9
1.4 Information About Previous Versions . . . . . . 1-11
1.4.1 Overview Of VAX FORTRAN V5.3 . . . . . . . . . 1-11
1.4.1.1 DECwindows FileView Compile Verb Support . . . 1-11
1.4.2 Overview Of VAX FORTRAN V5.2 . . . . . . . . . 1-12
1.4.3 Overview Of VAX FORTRAN V5.1 . . . . . . . . . 1-12
1.4.4 Overview Of VAX FORTRAN V5.0 . . . . . . . . . 1-12
1.5 Restrictions And Known Problems In VAX FORTRAN
V5.4 . . . . . . . . . . . . . . . . . . . . . . 1-14
1.5.1 Restrictions On Standards Checking . . . . . . 1-14
1.5.2 Using /DML And /PARALLEL Qualifiers . . . . . 1-15
1.5.3 Executing Parallel Applications In Quick
Succession . . . . . . . . . . . . . . . . . . 1-15
1.5.4 Executing Parallel Applications As A Detached
Process . . . . . . . . . . . . . . . . . . . 1-16
1.5.5 Restriction On COMMON Block Names . . . . . . 1-16
1.5.6 Security Exposure . . . . . . . . . . . . . . 1-16
1.5.7 Using PPL$ Run-Time Library Routines . . . . . 1-16
1.5.8 Using The VAX Source Code Analyzer . . . . . . 1-16
1.6 FORSYSDEF Modules . . . . . . . . . . . . . . . 1-17
1.7 Additional Parallel Processing Help . . . . . . 1-17
1.7.1 Tuning Issues For Parallel Processing . . . . 1-17
1.7.1.1 System Parameters . . . . . . . . . . . . . . 1-18
1.7.1.2 User Parameters . . . . . . . . . . . . . . . 1-18
1.7.1.3 Working Set Parameters . . . . . . . . . . . . 1-18
1.7.1.4 Increasing Cache Performance Of Parallel
Applications . . . . . . . . . . . . . . . . . 1-19
1.7.2 Linking Against FORTRAN Parallel Processing
Support . . . . . . . . . . . . . . . . . . . 1-20
1.7.2.1 Using FORRTL2 Shareable Image . . . . . . . . 1-20
1.7.2.2 Using Run-time Object Modules . . . . . . . . 1-21
1.7.2.3 Creating A Shareable Image Using FORTRAN
Parallel Processing Support . . . . . . . . . 1-21
CHAPTER 2 DOCUMENTATION CHANGES
2.1 Changes To The "VAX FORTRAN Language Reference
Manual" . . . . . . . . . . . . . . . . . . . . . 2-1
2.2 Changes To The "VAX FORTRAN V5.0 User Manual" . . 2-5
2.3 Errors In "VAX FORTRAN Installation Guide" . . . 2-15
CHAPTER 3 VAX FORTRAN MAINTENANCE FIXES
3.1 SUMMARY OF MAINTENANCE CHANGES . . . . . . . . . . 3-1
CHAPTER 1
VAX FORTRAN V5.4 RELEASE NOTES
1.1 Installing VAX FORTRAN V5.4
To install VAX FORTRAN V5.4, please refer to the corresponding
"VAX FORTRAN Installation Guide."
Note that this kit will only install on VMS Version 5.2 or later.
1.2 Compatibility
This section summarizes the compatibility issues, if any, between
VAX FORTRAN V5.4 and previous versions of VAX FORTRAN, versions of
VAX/VMS, and versions of other DIGITAL layered products.
1.2.1 Source Language
No new source language changes have been made since VAX FORTRAN V5.0.
However, VAX FORTRAN V5.0 introduced new source language syntax and
some differences in source language semantics that may cause
differences in program behavior from earlier versions of VAX FORTRAN.
VAX FORTRAN also detects some errors in program sources that were not
reported as erroneous in previous versions. This may cause some
programs to generate errors when compiled under VAX FORTRAN V5.4 that
previously compiled without errors.
Some of the more significant errors that are now detected by the
compiler are:
o As of version V5.2, the compiler was changed to diagnose the
improper use of a record field or array element reference in
an adjustable array bound expression. The compiler was
modified to generate an ADJARRBOU error for this case, and
the text of the message was modified to read "adjustable
1-1
VAX FORTRAN V5.4 RELEASE NOTES
array bound contains invalid data item". Furthermore, the
severity of this error was changed to fatal for all cases in
which it occurs.
o As of version V5.4, the compiler was changed to disallow the
use of an assumed-size array as the argument to the %DESCR
built-in function.
VAX FORTRAN V5.0 introduced the new intrinsic functions SIZEOF and
NWORKERS. The names of these functions may conflict with the names of
user-defined functions in existing programs. Such user-defined
functions must either be declared in an EXTERNAL statement or renamed
to avoid conflicting with the new intrinsic function names.
Except as stated above, the source language accepted by the VAX
FORTRAN V5.4 compiler is upward compatible with that accepted by the
V4 compiler.
1.2.2 VAX FORTRAN Compiler
The VAX FORTRAN V5.4 compiler is compatible with all VAX processors
running Version 5.2 or later of the VAX/VMS operating system.
VAX FORTRAN V5.4 can be installed on the same system as VAX
FORTRAN-HPO V1.0 without interference between the two compilers, the
selection being determined by the specification of the /[NO]HPO
qualifier of the FORTRAN DCL command. The command line definition,
compiler error messages, help text and DECwindows Compiler Interface
(DWCI) support supplied with VAX FORTRAN-HPO is a superset of that
provided with VAX FORTRAN V5.4. The VAX FORTRAN V5.4 installation
procedure checks to see if FORTRAN-HPO is already installed, and if
so, provides the option to not overwrite its support files.
The command line definition for the FORTRAN command has changed for
VAX FORTRAN V5.4 and includes the new /DESIGN qualifier. The command
definition provided with VAX FORTRAN V5.4 also defines a /NOHPO
qualifier so that command procedures can be written to invoke VAX
FORTRAN instead of VAX FORTRAN-HPO regardless of whether or not VAX
FORTRAN-HPO is installed. The positive form of the qualifier, /HPO,
is not recognized unless VAX FORTRAN-HPO is installed.
Note that if VAX FORTRAN-HPO is installed, the default is FORTRAN/HPO
or FORTRAN-HPO. To force the selection of VAX FORTRAN V5.4, use
FORTRAN/NOHPO.
After installing VAX FORTRAN V5.4, FORTRAN users must log out and then
in again, or use the DCL command:
$ SET COMMAND /TABLES=SYS$LIBRARY:DCLTABLES
1-2
VAX FORTRAN V5.4 RELEASE NOTES
in order to pick up the new command definition.
It is possible to keep the previous version of VAX FORTRAN available
for use if necessary. To do this, before installing VAX FORTRAN V5.4,
make a copy of SYS$SYSTEM:FORTRAN.EXE using another name. For
example, to save VAX FORTRAN V5.3, use the command:
$ COPY SYS$SYSTEM:FORTRAN.EXE SYS$COMMON:[SYSEXE]FORTRAN-V53.EXE
Then install VAX FORTRAN V5.4 using the procedure given in the
installation guide. After installation, to use the earlier version,
define the logical name FORTRAN to be the name of the saved file. For
example:
$ DEFINE/JOB FORTRAN FORTRAN-V53
Once this is done, the FORTRAN (or FORTRAN/NOHPO) command will invoke
the V5.3 compiler.
1.2.3 Object Modules
When the default /NOPARALLEL command qualifier is used, object modules
from VAX FORTRAN V5.4 can be freely mixed with those from any previous
version of VAX FORTRAN, and with those of VAX FORTRAN-HPO. There are
no known compatibility problems with mixing these object modules with
those of any other DIGITAL compiler.
If any FORTRAN module in the application is compiled with /PARALLEL,
there are no compatibility problems as long as all other modules in
the application have also been compiled by VAX FORTRAN using the
/PARALLEL qualifier.
If an application mixes FORTRAN modules compiled /PARALLEL with those
from other languages, or with FORTRAN modules not compiled with
/PARALLEL (which includes modules compiled with versions of VAX
FORTRAN earlier than V5.0), the following restrictions apply:
o Routines in the "non-parallel" object modules must not pass
arguments to a routine that uses them in a parallel DO-loop.
o Any COMMON blocks declared in the non-parallel modules must
be declared as PRIVATE in the parallel modules.
VAX FORTRAN V5.4 object modules may be linked on VAX/VMS version
V5.0-1 or later systems.
1-3
VAX FORTRAN V5.4 RELEASE NOTES
1.2.4 VAX Language Sensitive Editor
In order to use the new /DESIGN=COMMENTS qualifier, VAX Language
Sensitive Editor (LSEDIT) version V3.0 or later must be installed on
the system where the compilation is performed. The LSEDIT diagnostic
(.DIA) files produced by specifying the /DIAGNOSTICS command qualifier
are compatible with LSEDIT Version V2.0 or later.
1.2.5 VAX Source Code Analyzer
The analysis data (.ANA) files produced by specifying the
/ANALYSIS_DATA command qualifier can only be loaded into an SCA
library by Version V2.0 or later of SCA.
1.2.6 VAX Common Data Dictionary
VAX FORTRAN V5.4 supports Version V3.0 or later of VAX Common Data
Dictionary and Version V4.0 or later of VAX CDD/Plus. VAX CDD/Plus
audit trails are not generated by VAX FORTRAN. For more information,
refer to the CDD documentation.
1.3 Overview Of VAX FORTRAN V5.4
VAX FORTRAN V5.4 is a maintenance release of VAX FORTRAN V5, and
incorporates all bug fixes through edit level V5.3-78. This release
also adds compiler support for the VAXset Program Design Facility,
which is described in the following section.
1.3.1 VAXset Program Design Facility
The VAXset Program Design Facility (PDF) consists of enhancements
to language processors (such as VAX FORTRAN), the VAX Language
Sensitive Editor (LSEDIT), and the VAX Source Code Analyzer (SCA).
PDF provides the ability to embed application design information in
the program source, to have this information analyzed by PDF
components, and to allow for inquiries and reports on the design
information.
VAX FORTRAN's support of PDF lies in two areas:
o The ability to analyze the text of source comments for design
information and to add that information to the SCA analysis
data file for later access through SCA.
1-4
VAX FORTRAN V5.4 RELEASE NOTES
o The ability to allow LSE placeholders, including a new
pseudocode placeholder, to be used in place of certain
FORTRAN language syntax. Information about the use of
placeholders is added to the SCA analysis data file, if
selected.
The following sections will discuss only those portions of PDF
support that are specific to the VAX FORTRAN compiler. For more
information on PDF, see the documentation for the VAX Language
Sensitive Editor and the VAX Source Code Analyzer products.
1.3.1.1 /DESIGN Compile Command Qualifier
A new /DESIGN command qualifier has been added to the definition
of the FORTRAN DCL command:
/[NO]DESIGN[=(option[,...])] D=/NODESIGN
Controls whether the compiler analyzes the program source for
design information in comment text and VAX Language Sensitive
Editor (LSE) placeholders.
By default, if you omit the /DESIGN qualifier entirely, the
compiler does not analyze comment text for design information and
treats LSE placeholders as invalid syntax (equivalent to
/DESIGN=(NOCOMMENTS, NOPLACEHOLDERS)). However, if you specify
/DESIGN without any options, the default is both COMMENTS and
PLACEHOLDERS (equivalent to /DESIGN=ALL).
In addition, if /ANALYSIS_DATA is also specified, information
about design information in comments and placeholders is added to
the analysis data file.
Note that /NODESIGN is equivalent to /DESIGN=NONE.
[NO]COMMENTS Controls whether the compiler analyzes comment
text for program design information, which is
written to the SCA analysis data file if
/ANALYSIS_DATA is also specified. Comment text
is scanned for tags as defined in the current
VAX Language Sensitive Editor environment file,
and information about tags found, text of tagged
and untagged comments, and their location in the
source is included with the SCA analysis data.
Use of /DESIGN=COMMENTS requires that the
optional VAX Language Sensitive Editor product
be installed.
1-5
VAX FORTRAN V5.4 RELEASE NOTES
[NO]PLACEHOLDERS Controls whether the compiler accepts VAX
Language Sensitive Editor placeholders as
replacements for certain VAX FORTRAN language
syntax. If PLACEHOLDERS is in effect and
placeholders are found in a compilation unit, no
diagnostics are generated for the use of those
placeholders; however no object code will be
generated for the compilation unit.
In addition, if /ANALYSIS_DATA is also
specified, information about placeholders and
their uses is included in the analysis data
file.
If NOPLACEHOLDERS is in effect, placeholders are
treated as invalid syntax.
1.3.1.2 Comment Analysis
If comment analysis is enabled, VAX FORTRAN passes the text of each
comment, either full-line or end-of-line, to the PDF comment
processing routines, which then scans the comment text for tags that
may be defined in the current LSEDIT environment file. Certain tags
are predefined by LSEDIT; users can change, add or remove tags as
desired (see the VAX Language Sensitive Editor documentation for more
details.)
If /ANALYSIS_DATA is also specified, the text and location of the
comments and any tags found are written to the analysis data file.
You can then use SCA and LSE commands to retrieve design information
from the SCA library.
Groups of full-line comments are identified by the compiler as
"comment blocks", including lines which consist of whitespace followed
by a "!" comment indicator. Differences in indentation of full-line
comments are ignored for the purposes of grouping comments into
blocks. A comment block is ended when a completely blank line or a
line that is not a full-line comment is found.
For the purposes of comment analysis, compiler directives (if enabled)
and lines beginning with "D" or "d" in column 1 are not considered
comments.
End-of-line comments, where non-blank text is followed by a "!"
comment introducer, are treated as self-contained comment blocks.
Comments from source that is included by means of the INCLUDE or
DICTIONARY statements are also analyzed for design information. The
end of an INCLUDE module or DICTIONARY definition, by itself, does not
end a comment block.
1-6
VAX FORTRAN V5.4 RELEASE NOTES
Any warnings or errors from the comment analysis routines are reported
by the compiler. If the comment analysis routines are not installed,
or if a severe error is reported by the comment analysis routines, the
compilation is aborted.
1.3.1.3 Placeholder Analysis
If placeholder analysis is enabled by means of the
/DESIGN=PLACEHOLDERS command qualifier, the compiler relaxes its
syntax rules to allow LSE placeholders to replace selected FORTRAN
syntax.
There are five types of placeholders defined by LSE that are
recognized by VAX FORTRAN. These are:
{required-placeholder}
{required-list-placeholder}...
[optional-placeholder]
[optional-list-placeholder]...
<<pseudocode-placeholder>>
VAX FORTRAN accepts an alternate form of pseudocode placeholder where
the opening and closing delimiters are the left and right double angle
bracket ("«" and "»", 8-bit characters whose character codes are
decimal 171 and 187). LSEDIT uses these alternate characters by
default when a pseudocode placeholder is inserted.
Note that there is no list form of pseudocode placeholder.
A placeholder must be terminated before the end of the line, and the
closing delimiter must correspond to the opening delimiter. For
example:
[invalid-placeholder}
is an invalid placeholder. Any text may appear inside a delimiter
except for the closing delimiter. There is no ability to "quote" a
closing delimiter in order to allow its inclusion as text. Nesting of
delimiters is not supported.
If placeholder analysis is enabled and a placeholder is used in an
allowed context, the compiler will continue processing the statement
and will not issue any diagnostics for the use of the placeholder.
However, if any placeholders are seen in a given compilation unit,
only the lexical analysis phase of the compiler is run, no object code
is generated, and an informational message is generated at the end of
the unit.
If placeholders are found when placeholder analysis is not enabled, a
1-7
VAX FORTRAN V5.4 RELEASE NOTES
"placeholder not valid without /DESIGN=PLACEHOLDERS" error message
will be generated and the placeholder will be treated as invalid
syntax. If placeholder analysis is enabled, but a placeholder is
found in a disallowed context, a "placeholder not valid in this
context" error message will be generated and the placeholder will be
treated as invalid syntax.
In addition, if /ANALYSIS_DATA is specified, information about
placeholders, their name, type, location and use, is written to the
analysis data file.
1.3.1.3.1 Allowed Contexts For Placeholders
A placeholder may be used to replace either an entire FORTRAN
statement, or to replace a part of a statement. As a replacement for
an entire statement, there are no restrictions as to where a
placeholder may appear. Otherwise, as a replacement for a portion of
a statement, a placeholder is generally treated as an undeclared
identifier whose implicit type is INTEGER. This implicit typing is
unaffected by the IMPLICIT or IMPLICIT NONE statements, but is
affected by the /[NO]I4 command or OPTIONS statement qualifier.
Each occurrence of a placeholder is treated as a unique instance and
is unaffected by earlier uses of a syntactically identical
placeholder. For example, given:
INTEGER [abc]
REAL [abc]
each occurrence of "[abc]" is treated as a never-before-seen
identifier.
The implicit typing of placeholders as INTEGER allows their uses in
most reasonable contexts, but if they are used in contexts where an
integer identifier would not be allowed, semantic error messages will
be generated.
For example, the following statement is invalid:
CHARVAR = CHARVAR // [placeholder]
due to the type mismatch. Like any other undeclared variable,
placeholders are treated as scalars, and cannot be used in a context
that requires that the variable be declared as an array.
Given the above restrictions, placeholders may appear wherever an
identifier is allowed in the following contexts:
1-8
VAX FORTRAN V5.4 RELEASE NOTES
o As a variable name in a type specification statement, in a
CPAR$ CONTEXT_SHARED or CPAR$ PRIVATE directive, or in any of
the following statements: COMMON, DATA, DIMENSION,
EQUIVALENCE, RECORD, SAVE or VOLATILE.
o As the symbolic name in an EXTERNAL or PARAMETER statement
o As an integer expression
o As the target of an assignment statement
o As the name of a subroutine in a CALL statement
o As the name of a function in a function reference
o As an integer variable in an ASSIGN or assigned GOTO
statement
o As the control variable in a DO statement or implied DO list
in an I/O statement
o As the lock variable in a CPAR$ LOCKON or CPAR$ LOCKOFF
directive (the placeholder will be treated as LOGICAL*4 in
these contexts only)
o As an integer variable in an I/O statement other than the
unit or format specifier
Placeholders are not allowed in the following contexts:
o As the symbolic name in a BLOCK DATA, ENTRY, FUNCTION,
INTRINSIC, PROCEDURE, or PROGRAM statement
o As formal (dummy) argument names in an ENTRY, FUNCTION, or
PROCEDURE statement
o As the name of a common block
o As a structure name
o In a NAMELIST statement, either as the group name or as one
of the variables to be included in the group
o As the unit or format specifier in an I/O statement
1.3.1.4 Source Program Diagnostic Messages
The following source program diagnostic messages have been added in
support of the VAXset Program Design Facility
1-9
VAX FORTRAN V5.4 RELEASE NOTES
DESCOMABORT F /DESIGN=COMMENT processing has been aborted due to
an internal error
An unexpected error in the interface between the
compiler and the comment analysis routines was
detected. Additional messages relating to the
error are also displayed. The compilation was
aborted. If this error is seen, it should be
reported through your DIGITAL software support
channels.
DESCOMERR W Error in processing design information
The comment analysis routines detected an error in
the text of a comment, such as an undefined
keyword in a structured tag. Additional messages
relating to the error are also displayed.
DESCOMNOLSE F /DESIGN=COMMENT requires installation of VAX
Language Sensitive Editor
/DESIGN=COMMENTS was specified but the comment
analysis routines, provided with VAX Language
Sensitive Editor, were not found. The compilation
was aborted. Additional messages relating to the
error are also displayed. Use of /DESIGN=COMMENTS
requires that a version of VAX Language Sensitive
Editor, which provides the comment analysis
routines, be installed.
DESCOMSEVERR F A serious error has occurred processing
/DESIGN=COMMENTS
The comment analysis routines detected a severe
error that prevented further comment analysis in
the current compilation. Additional messages
relating to the error are also displayed. The
compilation was aborted.
DESIGNTOOOLD F /DESIGN=COMMENT processing routines are too old
for the compiler
The version of the comment analysis routines
present on the system is not supported by this
version of VAX FORTRAN. The compilation was
aborted. Install a newer version of the VAX
Language Sensitive Editor to obtain the newer
comment analysis routines.
PLACEEOL F Placeholder not terminated before end of line
The closing delimiter of a placeholder was not
1-10
VAX FORTRAN V5.4 RELEASE NOTES
found before the end of the statement field of the
current line.
PLACENODESIGN E Placeholder not valid without /DESIGN=PLACEHOLDERS
A placeholder was found but /DESIGN=PLACEHOLDERS
was not specified on the compile command line.
PLACENODOT E Repetition of pseudocode placeholder not allowed
A pseudocode placeholder was found with three dots
after it, indicating a list placeholder, which is
not supported.
PLACENOOBJ I Placeholders detected - no object code generated
One or more placeholders were found in the current
compilation unit and therefore no object code was
generated for that unit.
PLACENOTVAL E Placeholder not valid in this context
A placeholder was found in a context that is not
supported.
1.4 Information About Previous Versions
This section contains information about changes introduced in previous
versions of VAX FORTRAN that also apply to VAX FORTRAN V5.4.
1.4.1 Overview Of VAX FORTRAN V5.3
VAX FORTRAN V5.3 was a maintenance release of VAX FORTRAN V5 and
incorporated all bug fixes through edit level V5.2-49. No new
features were added to the compiler since version V5.0. The VAX
FORTRAN V5.3 kit also added support for the DECwindows Compiler
Interface (DWCI), as accessed through the DECwindows FileView
"Compile" verb. See the next section for details.
1.4.1.1 DECwindows FileView Compile Verb Support
VAX FORTRAN V5.3 provides an enhancement to the DECwindows
FileView "Compile" verb support in which compile command options can
be selected using a window interface instead of the usual DCL
qualifiers. The compiler defaults are used as the initial
configuration; new configurations with different settings of options
1-11
VAX FORTRAN V5.4 RELEASE NOTES
can be given names, saved, and used for later compilations.
The new interface is used automatically when you use the FileView
"Compile" verb to compile a source file that has a file type of
".FOR". More information is available by using the Help menu in the
"Compile a FORTRAN Program" dialog box.
The DECwindows Compiler Interface (DWCI) for VAX FORTRAN is entirely
separate from the compiler image and is contained in the following
files:
SYS$COMMON:[VUE$LIBRARY.USER]FORTRAN$DWCI.EXE
SYS$COMMON:[VUE$LIBRARY.USER]FORTRAN$DWCI.UID
SYS$COMMON:[SYSHLP]FORTRAN$DWCI.HLB
1.4.2 Overview Of VAX FORTRAN V5.2
VAX FORTRAN V5.2 was a maintenance release of VAX FORTRAN V5 and
incorporated all bug fixes through edit level V5.1-32. No new
features were added.
1.4.3 Overview Of VAX FORTRAN V5.1
VAX FORTRAN V5.1 was a maintenance release of VAX FORTRAN V5 and
incorporated all bug fixes through edit level V5.0-9. No new features
were added.
1.4.4 Overview Of VAX FORTRAN V5.0
VAX FORTRAN V5.0 was a major release of VAX FORTRAN and
incorporated all bug fixes through edit level V4.8-291.
The following list summarizes the new features in the VAX FORTRAN
product. Of these, the most important is support for decomposition of
iterative DO-loops for execution on shared memory, multiprocessor VAX
systems. See the "VAX FORTRAN Language Reference Manual" and the "VAX
FORTRAN User Manual" for more information about these features.
1. Decomposition of iterative DO-loops -- This support allows
users to specify iterative DO-loops to be run in parallel
when the associated program is executed on a multiprocessor
VAX. A special form of comment statement, called a
directive, has been implemented to support decomposition.
The new /PARALLEL qualifier on the FORTRAN command controls
whether the compiler generates code appropriate for executing
a routine as part of a parallel application. The /PARALLEL
1-12
VAX FORTRAN V5.4 RELEASE NOTES
qualifier also controls whether the parallel related
directives are parsed as statements.
2. SEMANTIC switch for /STANDARD qualifier -- This switch
controls whether diagnostic messages are issued whenever a
semantic extension to the FORTRAN-77 standard is encountered
in a source program. Semantic extensions are statements that
conform to the standard, but become nonstandard due to the
way in which they are used. The default when /STANDARD is
specified is (SEMANTIC,SYNTAX). Command files which specify
only /STANDARD on the FORTRAN command will potentially
generate more standard extension messages when they are
invoked using the VAX FORTRAN V5 compiler.
3. New VAXELN switch for the /WARNINGS qualifier -- This switch
controls whether diagnostic messages are issued when language
features not supported by the FORTRAN run-time environment on
a VAXELN system are used in a source program.
4. Behavior change for /CHECK=BOUNDS -- Bounds checking in VAX
FORTRAN Version 5 is now performed on each dimension
specified for an array reference. Version 4 bounds checking
consisted of a test to confirm that the resultant address for
an array reference referred to any valid element of the
array.
5. General-purpose comment directives -- The general-purpose
directives allow the specification of a TITLE and/or SUBTITLE
for listing file headers, allow for the specification of the
identification field to be generated into the object file,
and allow the specification at compile-time of certain PSECT
(COMMON block) attributes, including alignment.
6. SIZEOF intrinsic function -- This function returns the size,
in bytes, of the argument specified.
7. NWORKERS intrinsic function -- This function requires no
arguments and returns an INTEGER*4 value that represents the
total number of processes executing an application. NWORKERS
will be most useful in parallel applications when determining
iteration chunk sizes.
8. Increased nesting depth - The nesting depth level allowed for
DO and IF statement nesting (combined) has been increased
from 20 to 128.
9. Descending indexed keys - Language support for descending
indexed organization keys has been added.
10. Direct access REWRITE - REWRITE is now supported for direct
access files.
1-13
VAX FORTRAN V5.4 RELEASE NOTES
11. UNLOCK on sequential files - UNLOCK operations are now
supported on sequential files.
12. Evaluate PARAMETER constants - Support has been added that
allows PARAMETER constant names to be evaluated while
debugging an application.
13. Improved error messages
. Better diagnostics error reporting is now provided when
default text libraries cannot be opened.
. The actual untyped name is now displayed in the
diagnostic window when the error message "IMPNONE,
untyped name, must be explicitly typed " is generated.
14. Enhanced Compilation Summary - The listing file command
qualifier summary was enhanced to list the output files that
are generated by the compilation.
1.5 Restrictions And Known Problems In VAX FORTRAN V5.4
This section documents restrictions and known problems with VAX
FORTRAN Version V5.4.
1.5.1 Restrictions On Standards Checking
Source statements that do not conform to FORTRAN language
standards are detected by the VAX FORTRAN compiler under the following
circumstances:
o The statements contain ordinary syntax and semantic errors.
o A source program containing non-conforming statements is
compiled with the /STANDARD or /CHECK qualifiers.
Given these circumstances, the compiler is able to detect most
instances of non-conforming usage. It does not, however, detect all
instances because the /STANDARD qualifier does not produce checks for
all non-conforming usage at compile time. In general, the unchecked
cases of non-conforming usage arise from the following situations:
o The standard violation results from conditions that cannot be
checked at compile time.
1-14
VAX FORTRAN V5.4 RELEASE NOTES
o The compile-time checking would be prone to false alarms.
Most of the unchecked cases occur in the interface between calling and
called subprograms. However, other cases are not checked, even within
a single subprogram.
The following list identifies those items that are known to be
unchecked. Section references refer to the FORTRAN 77 standard, ANSI
X3.9-1978.
1. Use of a data item prior to defining it. (6.6)
2. Use of the SAVE statement to ensure that data items or COMMON
blocks retain their values when reinvoked. (8.9)
3. Association of character data items on the right and left
sides of character assignment statements. (10.4)
4. Mismatch in order, number, or type in passing actual
arguments to subprograms. (15.9)
5. Association of one or more actual arguments with a data item
in COMMON when calling a subprogram that assigns a new value
to one or more of the arguments. (15.9.3.6)
1.5.2 Using /DML And /PARALLEL Qualifiers
Because of the restriction on performing I/O operations within a
parallel loop (see Section 15.2.1 in the VAX FORTRAN User Manual),
care must be taken when using parallel loops with data base
applications. In particular, applications using the VAX DBMS product,
especially the /DML qualifier on the FORTRAN command, should not use
the DO_PARALLEL directive for any loop that executes data base
operations. Such use will cause unpredictable results due to
inconsistent I/O control state among the processes executing the loop
iterations.
1.5.3 Executing Parallel Applications In Quick Succession
When executing a parallel processing application multiple times
in succession, there should be a delay between the executions. This
is needed to allow VMS to complete the unmapping of any global
sections used by an application. The unmapping is not completed when
the image is terminated. If there is not enough time between
executions of parallel applications, there may not be enough global
resources (global pages and/or global sections) available to properly
execute additional invocations of parallel applications.
1-15
VAX FORTRAN V5.4 RELEASE NOTES
1.5.4 Executing Parallel Applications As A Detached Process
Images using the FORTRAN parallel processing support cannot run from a
detached process where there is no DCL CLI.
1.5.5 Restriction On COMMON Block Names
The name of any COMMON blocks defined to be shared within a
routine compiled with the /PARALLEL qualifier must not contain more
than 26 characters.
1.5.6 Security Exposure
The FORTRAN compiler echos, exactly as it was entered, the
command line in the compilation summary section of any listing file
that is generated. If an account password is required on an input or
output file, we suggest that a logical name be defined for the
password and that the logical name be used on the command line.
Otherwise, the password will be printed in the command line echo part
of the compilation summary section.
1.5.7 Using PPL$ Run-Time Library Routines
There is a known problem with the interaction between the VAX
FORTRAN parallel processing support, that is, between routines
compiled with /PARALLEL and the VMS Run-Time Library PPL$ routines.
The symptom of this problem is that the FORTRAN parallel processing
application completes, but the subprocesses that are created during
its execution are not properly deleted and are left in a spin loop,
using up CPU time. These subprocesses must be stopped by the user.
The easiest way to stop them is to either log out of the account that
executed the parallel application or explicitly stop them.
1.5.8 Using The VAX Source Code Analyzer
There is a known problem with the VAX Source Code Analyzer when
doing an SCA INSPECT of a FORTRAN module that omits arguments when
calling subroutines or functions, for example:
CALL SUB1 (A,,B)
X = FUNC2()
When an SCA INSPECT is performed for such a module, SCA may fail with
a BADLOGIC error, or it may not correctly check the usage of the
1-16
VAX FORTRAN V5.4 RELEASE NOTES
arguments that were supplied. This problem will be corrected in a
future version of VAX SCA.
As a temporary workaround, use %VAL(0) to indicate an omitted
argument, for example:
CALL SUB1 (A,%VAL(0),B)
X = FUNC2(%VAL(0))
Note that in the specific case of a call to a function that has no
arguments, this workaround causes SCA to report that an extra argument
was passed.
1.6 FORSYSDEF Modules
FORSYSDEF.TLB, the FORTRAN system definition text library, is
built from definitions provided with the VMS operating system. As new
releases of VMS are installed, subsequent VAX FORTRAN installations
will automatically use any new or revised definitions.
To obtain a current list of the modules available in FORSYSDEF.TLB,
use the command:
$ LIBRARY/LIST SYS$LIBRARY:FORSYSDEF.TLB
To ensure that FORSYSDEF.TLB is kept current, you should reinstall the
VAX FORTRAN kit after upgrading to each new version of VMS. The VAX
FORTRAN installation procedure will recommend rebuilding FORSYSDEF.TLB
if the VMS definitions have changed since the last installation. It
is not usually necessary to reinstall the other components of VAX
FORTRAN after installing a new version of VMS.
1.7 Additional Parallel Processing Help
This section gives additional information that will be useful to
users of the FORTRAN parallel processing support.
1.7.1 Tuning Issues For Parallel Processing
Parallel-processing programs may fail to execute because of
insufficient system resources. You may have to adjust some
resource-utilization parameters -- both for the entire system and for
individual user accounts. You may also want to adjust some parameters
in order to achieve better performance for programs executing in
parallel. For more details on these parameters as they relate to the
FORTRAN parallel processing support, refer to the Parallel Processing
1-17
VAX FORTRAN V5.4 RELEASE NOTES
chapter of the "VAX FORTRAN User Manual."
1.7.1.1 System Parameters
When a parallel application is executed, much of the local memory
and many COMMON blocks of the application are mapped to global
sections (VMS's way of sharing data between processes). Users must
ensure that the number of global sections, global pages, and global
pagefile sections required by a parallel application are available.
To allow enough space for this global data, some of the system's
SYSGEN parameters may need to be increased. The three sysgen
parameters that are most important are GBLPAGFIL, GBLPAGES, and
GBLSECTIONS. Note that these parameters are not dynamic; you must
reboot your system in order for any modifications to them to take
effect. You should adjust the parameters one at a time in order to
avoid modifying some of them unnecessarily.
1.7.1.2 User Parameters
One of the authorization quotas, the PGFLQUO quota, may need to
be adjusted for any account that will be running parallel
applications. This quota is shared by all processes in a job and thus
may require an adjustment to allow for the additional processes used
in parallel processing.
You can adjust some programs to reduce their use of pagefile
quota. If a large array has a memory allocation attribute of
context-shared and it is declared within either the main program or a
subprogram that is never invoked from within a parallel loop, it is
advisable to move the array into a COMMON block with an attribute of
shared.
Context-shared variables cause the FORTRAN run-time parallel
processing support to allocate one shared copy and P private copies,
one for each process. These copies use up pagefile quota and often
require the quota to be raised above what would be needed for the
corresponding serial program. If the private copies are never needed,
you can reduce the pagefile quota requirements by changing the
variable from context-shared to shared (which is only allowed for
common blocks).
1.7.1.3 Working Set Parameters
Parallel processing applications typically use large amounts of
memory. To get better performance for an application, you may find it
advisable to make adjustments to the working set size parameters --
1-18
VAX FORTRAN V5.4 RELEASE NOTES
both for the system and for user accounts. Refer to the "Guide to VMS
Performance Management" for information on how to adjust working set
size.
1.7.1.4 Increasing Cache Performance Of Parallel Applications
In a multiprocessor VAX system, each processor contains a cache.
To get the best performance from a FORTRAN program that uses parallel
loops, you should try to access memory in an order that lets the
caches work effectively. As a general rule, an innermost loop should
access memory sequentially, and different iterations of a parallel
loop should access non-adjacent memory locations.
The cache is organized as a collection of "cache blocks" each of
which holds a copy of some set of adjacent memory locations. The size
of a cache block varies by processor type, but is typically 16 to 64
bytes. When a program running on one processor reads a memory
location, the entire cache block is brought into the cache. If the
program next reads an adjacent location on the same processor, the
reference can be satisfied from the fast cache instead of the slower
main memory. For example, in this program:
REAL A(1000,1000)
DO 10 I=1,1000
DO 10 J=1,1000
10 A(I,J) = A(I,J)+1.0
the program reads an element of the array, and then (on the next
iteration of the J loop) reads one 4000 bytes away. It does not come
back to read the adjacent element of the array until it has processed
1000 other elements, and it will not benefit from the cache
organization. You should rewrite such loops like this:
REAL A(1000,1000)
DO 10 J=1,1000
DO 10 I=1,1000
10 A(I,J) = A(I,J)+1.0
so that the leftmost subscript corresponds to the innermost loop.
When a program running on one processor writes to a memory
location and another processor has a cache block containing a copy of
that memory location, the processors cooperate to ensure the cache
block is updated or discarded. Compared to the case where the data is
not in another processor's cache, this can cost extra time, either
when the write happens (for one processor to communicate with the
other) or later (when the second processor tries to access data that
has been discarded from its cache). For example,
REAL A(100,100),B(100,100),C(100,100)
1-19
VAX FORTRAN V5.4 RELEASE NOTES
CPAR$ DO_PARALLEL 1
DO 10 I=1,100
DO 10 J=1,100
DO 10 K=1,100
10 A(I,J) = A(I,J) + B(I,K)*C(K,J)
Here different processors are updating adjacent elements of the array.
To avoid this, remove the "1" from the DO_PARALLEL directive, and
reorder the loops as:
REAL A(100,100),B(100,100),C(100,100)
CPAR$ DO_PARALLEL
DO 10 J=1,100
DO 10 I=1,100
DO 10 K=1,100
10 A(I,J) = A(I,J) + B(I,K)*C(K,J)
Even better would be to ensure all the arrays are accessed
sequentially by rewriting it as:
REAL A(100,100),B(100,100),C(100,100)
CPAR$ DO_PARALLEL
DO 10 J=1,100
DO 10 K=1,100
DO 10 I=1,100
10 A(I,J) = A(I,J) + B(I,K)*C(K,J)
1.7.2 Linking Against FORTRAN Parallel Processing Support
This section briefly describes ways to link against the FORTRAN
run-time parallel processing support.
1.7.2.1 Using FORRTL2 Shareable Image
The FORTRAN run-time parallel processing support shareable image
(SYS$LIBRARY:FORRTL2.EXE), is included in the system default shareable
image library (SYS$LIBRARY:IMAGELIB.OLB). To create an executable
image that uses the FORTRAN parallel processing support, you simply
use the regular linker command. If your application uses the FORTRAN
parallel processing support, the FORRTL2.EXE shareable image is
automatically included in your image since the linker searches
IMAGELIB by default.
1-20
VAX FORTRAN V5.4 RELEASE NOTES
1.7.2.2 Using Run-time Object Modules
Please note that the FORTRAN run-time parallel processing support
references a global symbol CTL$GL_PSTFLAGS defined in the system
symbol table (SYS$SYSTEM:SYS.STB).
If you prefer to include the FORTRAN parallel processing run-time
object modules (included in SYS$LIBRARY:STARLET.OLB) in your image,
you need to include the system symbol table as input in your linking
operation.
The following is an example of a linking operation:
$ LINK/NOSYSSHR MY_OBJECT.OBJ,SYS$SYSTEM:SYS.STB
1.7.2.3 Creating A Shareable Image Using FORTRAN Parallel Processing
Support
To create a shareable image that uses the FORTRAN parallel
processing support, you need to include the following object modules
from STARLET.OLB other than the FORRTL2 shareable image itself:
(modules from the SYS$LIBRARY:STARLET.OLB)
FOR$INISHR,
LIB$INITIALIZE, and
SYS$P1_VECTOR
The following is an example of a linker option file:
SYS$LIBRARY:STARLET.OLB/INCLUDE=(FOR$INISHR,-
LIB$INITIALIZE,-
SYS$P1_VECTOR)
SYS$LIBRARY:FORRTL2.EXE/SHAREABLE
1-21
CHAPTER 2
DOCUMENTATION CHANGES
2.1 Changes To The "VAX FORTRAN Language Reference Manual"
Order Number: AA-D034E-TE (June 1988)
Note than an asterisk (*) appears in front of the page number
references for those documentation changes added since the V5.3
release of VAX FORTRAN. All of the other changes are repeats of
those contained in the release notes issued with V5.3.
Page xv
The page number for Figure 1-3 is incorrect. The correct page
number is 1-11, not 1-12.
Page 2-3
Table 2-1 should include an entry for the CHARACTER data type
(with a storage requirement of 1 byte).
Page 2-19
In the examples at the top of the page, the second "invalid"
example should not have a space between the two quote marks. As
shown, the example is valid.
In the last sentence on the same page, "hollerith" should be
capitalized (Hollerith).
2-1
DOCUMENTATION CHANGES
Page 4-7
In the last bulleted item on the page, the reference to Table 3-1
is incorrect. The correct reference is Table 2-1.
Page 4-14
Add a new section between Section 4.2.3.2 and Section 4.2.3.3
(which becomes Section 4.2.3.4):
4.2.3.3 Scratch Files
Scratch files are created by specifying STATUS='SCRATCH' on an
OPEN statement. By default, the files are created on the
user's default disk (SYS$DISK) and are not placed in a
directory or given a name that is externally visible (that is,
accessible using the DCL command DIRECTORY).
You can create scratch files on a disk other than the default
disk using the FILE keyword on the OPEN statement.
Also, you can use an INQUIRE statement (NAME specifier) to
acquire the name of any scratch file that is connected to a
given logical unit.
Page 4-22
The first sentence in the description of the data type specifier
in an IMPLICIT statement is incorrect. It implies that all of the
data type specifiers listed in Table 2.1 are allowed. This is
true, except for the CHARACTER*(*) data type specifier, which is
not allowed. (The CHARACTER*(*) data type specifier is used for
passed-length character arguments.)
Page 5-7
In Section 5.3.1.2, the last sentence in the first paragraph
should be phrased as follows:
Nested loops can share a labeled terminal statement (except
for END DO statements, which cannot be shared).
The wording of the sentence in the published version of the manual
is slightly ambiguous.
2-2
DOCUMENTATION CHANGES
*Page 7-46
The first sentence in the last paragraph on this page refers to
only indexed and sequential READ statements. Direct access READ
statements are also valid in this context.
Page 8-3
The sentence comprising the second bulleted item at the top of the
page should read as follows:
If a character-constant format includes apostrophes, those
apostrophes must each be represented by two consecutive
apostrophes (''), with no spaces or characters between them.
*Page 9-19 The first two sentences in the first paragraph on this page
(immediately following Table 9-2) should be replaced with the
following text:
RECL is mandatory when opening new files (STATUS='NEW' or
'UNKNOWN' or 'SCRATCH') and one or more of the following
conditions exists:
o The record format is fixed length (RECORDTYPE='FIXED').
o The file organization is relative or indexed
(ORGANIZATION='RELATIVE' or 'INDEXED').
o The file is opened for direct access (ACCESS='DIRECT').
RECL is optional in all other cases.
(As VAX FORTRAN extensions to the FORTRAN-77 standard, the first
two items in this list should appear in blue ink.)
*Page 9-19
Table 9-3 should appear as follows:
RECORDTYPE value RECL value
---------------- ----------
'FIXED' none; value must be explicitly specified
All other types 133 bytes (for formatted records)
511 longwords (for unformatted records)
2-3
DOCUMENTATION CHANGES
Page 9-19
The following changes should also be made on this page:
o In Table 9-2, the record size limits shown for relative and
indexed files are incorrect. The limits are 32234 bytes for
formatted records and 8058 longwords for unformatted records.
o The following item should be added to the bulleted list at the
bottom of the page:
If the file contains segmented records, RECL specifies the
maximum length for any segment (including the two
segment-control bytes).
(As a VAX FORTRAN extension to the FORTRAN-77 standard, this
item should appear in blue ink.)
Page 9-22
Add the following paragraph in front of the NOTE at the end of
Section 9.1.25:
Scratch files (STATUS='SCRATCH') are created on the user's
default disk (SYS$DISK) and are not placed in a directory or
given a name that is externally visible.
*Page 9-29
The last sentence on the page should be replaced with the
following text:
The value that is assigned is always valid for use with the
FILE keyword in an OPEN statement -- unless the value has been
truncated in a way that makes it unacceptable. (Values are
truncated if the declaration of nme is too small to contain
the entire value.)
For information on the maximum possible size of file
specifications, see the appropriate manual in the
documentation set for the system you are using.
Pages 10-8 and 10-9
The examples on Pages 10-8 and 10-9 each contain a ENDDO statement
that is mistyped as "ENDO".
2-4
DOCUMENTATION CHANGES
Page D-28
The word "type" is omitted from the first line on the top of the
page. The line should appear as follows:
type [*n]v[*n][clist][,v[*n][/clist/]]
Pages D-38 and D-41
Formatting problems occur in column one in the descriptions of the
Fix function (D-38) and the Bitwise Complement and Bitwise Shift
functions (D-41).
Page D-40
The parenthetical note with the "maximum" function should state
that it returns the maximum value. (The note that appears in the
manual simply states that a value is returned.)
INDEX
Several typographical errors and incorrect page numbers occur in
the index. These errors include the following:
o Index-3: "ATAND2D" is a typo for "ATAN2D".
o Index-7: One of the secondary index entry under "Dummy
Arguments" should read "unsubscripted", not "unsubscribed".
o Index-11: "IBTSET" is a typo for "IBSET", and "IDIMintrinsic"
is a typo for "IDIM intrinsic".
o Index-17: The page reference for the RAN function, under the
index entries "Random Number Generator" and "RAN Function",
should be D-49, not D-50.
2.2 Changes To The "VAX FORTRAN V5.0 User Manual"
Order Number: AA-D035E-TE (June 1988)
Page 1-11
In the first sentence in Section 1.2.3.7, "qualfier" is a
typographical error for "qualifier".
2-5
DOCUMENTATION CHANGES
*Page 1-17
The section on the /LIBRARY qualifier should include the following
information:
The depth of a page in a listing file is 66 lines by default.
To modify the default, assign the new number to the logical
name SYS$LP_LINES using the DCL command DEFINE. For example,
the following DCL command sets the page depth at 88 lines:
$ DEFINE SYS$LP_LINES 88
The minimum number is 30; the maximum is 255. The definition
can be applied to the entire system by using the command
DEFINE/SYSTEM.
Page 1-19
The last line on the page should refer to Appendix F, not Appendix
B.
Page 1-28
LOGICAL*1 arrays are used to replace CDDL fields with data types
that are not supported by VAX FORTRAN, not CHARACTER fields as
indicated in the first paragraph in Section 1.4.3.
The second paragraph should appear as follows:
If a data definition contains a field declared with an
unsupported data type, VAX FORTRAN replaces the field with one
declared as an inner STRUCTURE containing a single unnamed
field (%FILL field) that is a LOGICAL*1 array with an
appropriate dimension.
The example that follows the first paragraph should appear as
follows:
STRUCTURE FIELD1
LOGICAL*1 %FILL(4)
END STRUCTURE
Page 6-4
The last sentence in Table 6-2 is misleading. It should read as
follows:
At run time, before the call, the calling program allocates
enough storage to contain the result and places the storage
2-6
DOCUMENTATION CHANGES
address in the descriptor.
Page 6-23
The last entry on the page, in Table 6-5, is incorrect. The VMS
data type of mask_byte requires a VAX FORTRAN declaration of
LOGICAL*1 (or BYTE), not INTEGER*1.
Page 6-24
Several entries in column one are formatted incorrectly on this
page; the entries should appear on one line instead of being
broken across two lines.
Page 7-15
The name of several FORSYSDEF modules are incorrect: $XAB should
be $XABDEF; $XABDAT should be $XABDATDEF; and $XABPRO should be
$XABPRODEF.
Also, the RECORD statement in the example at the bottom of the
page should refer to XABDEF, not XABDATDEF.
Page 11-3
The second sentence on the page contains a typographical error.
The word "choose" should appear instead of "chose".
Page 11-26
The optimized code in the second example on the page is incorrect.
The code should appear as follows:
ADDF3 C-4[R0], B-4[R0], A-4[R0]
The code in the manual contains "K-4" instead of "C-4".
Page 11-35
In Section 11.4.4.6, the example of optimized code should appear
as follows:
MOVF #0,A
In object code in the manual contains an extra character ("MOVF
#40 A").
2-7
DOCUMENTATION CHANGES
Page 11-37
The example of a FORMAT statement in Section 11.4.5.1 should
appear as follows:
100 FORMAT (25(' ',25F5.2/))
(In the example in the manual, a "1" appears instead of a "/"
(slash).)
Page 11-38
The second paragraph from the bottom of the page should read as
follows:
When run-time formatting is not used, the first step is
performed at compile time. The compiler parses the FORMAT
string and reduces it....
Page 11-40
The OPEN statement at the top of the page should be indented one
space to avoid any confusion about the continuation characters in
the next two lines (see the last example on this page for an
example of the proper indentation).
Page 11-49
In the notes to Example 11-2, note 9 should refer to line 13, not
line 7.
Page 15-6
Several sentences for the third item in the list on this page are
misleading. The last three sentences should read as follows:
All variables are context-shared by default. The memory
allocation attribute of context-shared variables varies: a
context-shared variable referenced in a subprogram called from
within a parallel DO loop is treated as private; in all other
instances, it is treated as shared. Note that loop control
variables must always be explicitly declared as private.
Page 15-9
In the bulleted list at the top of the page, the first sentence
for the fifth item should read as follows:
2-8
DOCUMENTATION CHANGES
If an actual argument declared outside a parallel DO loop is
associated with a dummy argument referenced inside a parallel
DO loop, the actual argument must be shared.
The bulleted list should also include the follow item:
o Unless data is read-only data, it cannot be shared between an
AST routine and code executing in parallel within a parallel
DO loop.
Page 15-11
In the bulleted list at the bottom of the page, the first sentence
for the first item should read as follows:
Actual arguments that are declared outside a parallel DO loop
must be accessible to all processes, that is, be declared as
shared, if they are associated with dummy arguments referenced
inside a parallel DO loop.
Page 15-17
The second paragraph from the bottom of the page should read as
follows:
Actual arguments that are declared outside a parallel DO loop
must be accessible to all processes, that is, be declared as
shared, if they are associated with dummy arguments referenced
inside a parallel DO loop.
Page 15-25
In the second sentence in the last paragraph in Section 15.3.2.2,
the "I" subscripts should be "1" subscripts. That is, the correct
references are A(1), B(1), and C(1) -- not, for example, A(I).
Page 15-32
Add the following text to the end of Section 15.4.2:
You can adjust some programs to reduce their use of pagefile
quota. If a large array has a memory allocation attribute of
context-shared and is declared within either the main program
or a subprogram that is never invoked from within a parallel
loop, it may be advisable to move the array into a COMMON
block with an attribute of shared.
2-9
DOCUMENTATION CHANGES
Context-shared variables cause the RTL to allocate one shared
copy and P private copies, one for each process. These copies
use up pagefile quota and often require the quota to be raised
above what would be needed for the corresponding serial
program. If the private copies are never needed, you can
reduce the pagefile quota requirements by changing the
variable from context-shared to shared (which is only allowed
for common blocks).
Page 15-40
The following information will be merged into the section entitled
"Linear Recurrences" in a future version of the User Manual.
Modifying Loops with Recurrences to Run in Parallel
Sometimes the original programmer of a serial loop introduces
a recurrence as a faster approximation of some function of the
loop control variable. For example, the following program
uses sines and cosines:
THETA = 2.*PI/N
DO 10 I=0,N-1
S = SIN(I*THETA)
C = COS(I*THETA)
.
. <use S & C>
.
10 CONTINUE
Using a recurrence to approximate the sines and cosines can
make the serial loop run faster (with some loss of accuracy),
but it prevents the loop from running in parallel:
THETA = 2.*PI/N
STH = SIN(THETA)
CTH = COS(THETA)
S = 0.0
C = 1.0
DO 10 I=0,N-1
.
. <use S & C>
.
S = S*CTH + C*STH
C = C*CTH - S*STH
10 CONTINUE
To make the loop safe for parallel execution, you could
eliminate the recurrence by substituting the original SIN and
COS calls, but this results in the loss of the performance
improvement gained from using the recurrence. Another
2-10
DOCUMENTATION CHANGES
approach is to split the loop into an outer parallel loop and
an inner serial loop. Each iteration of the outer loop
reinitializes the recurrence, and the inner loop uses it.
CPAR$ CONTEXT_SHARED THETA,STH,CTH,LCHUNK
CPAR$ PRIVATE ISTART,I,S,C
THETA = 2.*PI/N
STH = SIN(THETA)
CTH = COS(THETA)
LCHUNK = (N + NWORKERS()-1) / NWORKERS
CPAR$ DO_PARALLEL
DO 10 ISTART = 0,N-1,LCHUNK
S = SIN(ISTART*THETA)
C = COS(ISTART*THETA)
DO 10 I = ISTART, MIN(N,ISTART+LCHUNK-1)
.
. <use S & C>
.
S = S*CTH + C*STH
C = C*CTH - S*STH
10 CONTINUE
Page 15-55
The last paragraph on this page should read as follows:
By using NWORKERS as a variable in the calculation to
establish iteration segment size, the segment size adjusts
automatically when your application is run on systems with
varying numbers of available processors.
Page B-5 and B-6
Two modules in FORSYSDEF.TLB are not listed. The modules omitted
are $PSMMSG and $SMBMSG. Both modules contain symbiont messages
and can be included by users writing their own symbionts.
*Page B-5 and B-6
The following modules should be included in the listing of
FORSYSDEF.TLB modules:
$DDTMDEF $PR8NNDEF
$DTIDEF $PR8PSDEF
$DVSDEF $PR8SSDEF
$EPMMDEF $PR9CCDEF
$EPMVDEF $PR9RRDEF
$FDLDEF $PROMDEF
$JBCMSGDEF $PROVDEF
2-11
DOCUMENTATION CHANGES
$LMFDEF $PRUV1DEF
$MAILDEF $PRUV2DEF
$MHDDEF $PSCANDEF
$MT2DEF $PSMMSGDEF
$MTADEF $SDFMDEF
$NSADEF $SDFVDEF
$PR009DEF $SMBMSGDEF
$PR410DEF $TT3DEF
$PR420DEF $UAIDEF
$PR60DEF $USRIDEF
$PR650DEF $VAERDEF
$PR670DEF $VPSRDEF
$PR790DEF $XABITMDEF
$XABRUDEF
PPL$MSG
Page C-7
The second item in the bulleted list for Note 3 should specify a
length of 24, not 21.
Page C-15
The second comment in the example source program on this page
should refer to "row 2, column 15," not "row 5, column 15."
*Appendix F, Table F-1
The following source-program diagnostic messages were added to the
V5.0 compiler after the Version 5.0 documentation was submitted
for printing and are not contained in the "VAX FORTRAN User
Manual."
EXTBADCONT I Extension to FORTRAN-77: nonstandard
continuation character
A nonstandard character was used as a
continuation indicator.
EXTCONT19 I Extension to FORTRAN-77: more than 19
continuation lines
More than 19 continuation lines were
defined for the statement.
EXTINTRIN I Extension to FORTRAN-77: nonstandard
intrinsic function
A nonstandard intrinsic function was used.
2-12
DOCUMENTATION CHANGES
EXTLSTINF I Extension to FORTRAN-77: nonstandard list
directed internal
A nonstandard list directed internal read
or write statement was used.
Page F-6
The compiler source program diagnostic message ADJARRBOU has had
its text changed to "Adjustable array bound contains invalid data
item" and its severity is now F. The explanation has been changed
as follows:
A dimension declarator expression for an adjustable array
contained an operand that is not one of the following:
o A constant
o A variable in a common block
o A variable associated with a subprogram dummy argument
Page F-18
The following source program diagnostic message was added in
Version 5.1:
EXTUSECCON I Extension to FORTRAN-77: Nonstandard use of
character constant
A character constant was used in an assignment
statement where a numeric value is required.
Page F-23
INCOMPNSYSL should be spelled INCOPNSYSL and thus should appear on
Page F-24. Also, the text of the error message shown in the
manual is incorrect and should be as follows:
INCOPNSYSL W Open error opening include file
SYS$LIBRARY:FORSYSDEF.TLB
In an attempt to include a module from
VAX FORTRAN's symbolic definition
library (FORSYSDEF), the compiler was
unable to locate the library. (FORSYSDEF
contains VAX FORTRAN source definitions
2-13
DOCUMENTATION CHANGES
for related groups of system symbols.)
Page F-31
The description of the MULDECNAM error message should be as
follows:
A name appears in two or more inconsistent declaration
statements or a dummy argument is specified in an EQUIVALENCE
statement.
Page F-34
The name, text, and explanation for the SAVPRICONF error message
are incorrect. The correct name, text, and explanation are as
follows:
SAVPRICONF E PRIVATE variable or common block must
not be declared SAVE.
Symbols and common blocks cannot be
declared in both a SAVE statement and a
PRIVATE directive or common block.
Page F-36
The second sentence in the description of the UNSUPPTYPE error
message should appear as follows:
The VAX FORTRAN compiler makes the data type accessible by
declaring it as an inner structure containing a single unnamed
field (%FILL field) that is a LOGICAL*1 array with an
appropriate dimension.
Page F-58
The last sentence on the page should refer to Table F-1, not Table
F-3.
*Page Index-17
The page number reference for the RAN function is incorrect. It
should be D-49, not D-50.
2-14
DOCUMENTATION CHANGES
2.3 Errors In "VAX FORTRAN Installation Guide"
Order Number: AA-H953G-TE (August 1989)
*Page 15
The "INSTALL>" prompts and the "RETURN" indicators should not be
present in the second example on this page. The example
represents the contents of a .COM file, not a DCL-level
interaction.
CHAPTER 3
VAX FORTRAN MAINTENANCE FIXES
The following list contains a short descriptive summary of each change
made for this update of the VAX FORTRAN compiler. The edit level
number, which appears at the end of the compiler version number, is
incremented by one for each change. The version number is printed at
the top of each page of source listing generated by the compiler. The
edit level appearing to the left of each description was the level
number after that change was made. Thus, any compiler versions with
level numbers equal to or greater than the one given for a certain
change, contain that change.
3.1 SUMMARY OF MAINTENANCE CHANGES
Version Change Description
V5.0-1 Initial release of V5.0 compiler. It incorporates
corrections up to V4.8-291.
V5.1-10 Maintenance update Version V5.1 compiler.
V5.2-33 Maintenance update Version V5.2 compiler.
V5.3-50 Maintenance update Version V5.3 compiler.
V5.3-51 The compiler was confusing multiple calls to SIN/COS when
those calls were inside an IF-THEN-ELSE structure. The
result was code that returned an incorrect value for
SIN/COS. The compiler has been modified to generated the
correct code in this case.
VAX FORTRAN MAINTENANCE FIXES
SUMMARY OF MAINTENANCE CHANGES
V5.3-52 The compiler generated bad code under certain circumstances
involving an IOSTAT specifier. The circumstances are that
the specifier must be an array element, the routine must be
compiled with bounds checking requested, and there must be
an implied-DO loop in the I/O list. The compiler has been
modified to generate the correct code under these
circumstances.
V5.3-53 The compiler was failing with an access violation under
certain situations involving the use of adjustable arrays in
variable format expressions. This problem existed when two
different adjustable arrays, which have the same dimension
declarators, are used in variable format expressions. The
compiler was corrected to handle these cases properly.
V5.3-54 The compiler was aborting with an RMS "record too big" error
if a source file contained a record longer than 132 bytes.
The compiler was corrected to silently truncate the source
record to the appropriate statement field width, as
determined by the setting of the /EXTEND_SOURCE command
qualifier or OPTIONS statement qualifier.
V5.3-55 The compiler was failing with an access violation under
certain circumstances involving an IOSTAT specifier. The
circumstances include the following: the specifier must be
an array element, the I/O statement must be labeled, there
must be an unconditional transfer to the label somewhere
within the routine, and there must not be an ERR= or END=
specified in the I/0 statement. The compiler has been
modified to generate the correct code under these
circumstances.
V5.3-56 The compiler generated bad code under certain circumstances
involving the invocation of an external function from within
a statement function. The potential for bad code being
generated exists if the external function modifies an actual
argument to it and the actual argument is not declared
within a common block, is not named in an EQUIVALENCE
statement, and is not an argument to the statement function.
The compiler has been modified to generate the correct code
under these circumstances.
V5.3-57 The compiler was failing with a bugcheck under certain
circumstances involving character substring bound checking.
To encounter this problem, a routine must contain numerous
substring specifications and be compiled requesting bounds
VAX FORTRAN MAINTENANCE FIXES
SUMMARY OF MAINTENANCE CHANGES
checking. The compiler was modified to correctly handle
this case.
V5.3-58 The compiler was improperly diagnosing as an extension to
the FORTRAN-77 standard a function where the function result
value became defined only by means of the function name
appearing as an actual argument inside the function. The
compiler was corrected to recognize this case as conforming
to the standard.
V5.3-59 The compiler was improperly allowing an assumed-size array
to be specified as an argument to the %DESCR built-in
function, and was building an incorrect descriptor for the
array. The compiler was corrected to issue an INVPERARG
diagnostic message for this case.
V5.3-60 The compiler was failing with a bugcheck under certain
circumstances under which an assignment is made to a complex
variable that is equivalenced. The final operation
evaluated on the right hand side of the assignment must be
either an add or subtract that has one operand whose data
type is real and one operand whose data type is complex.
The real operand must also be equivalenced. The compiler
was modified to correctly handle this case.
V5.3-61 The compiler was improperly issuing a "missing variable"
diagnostic when a PARAMETER constant was later declared
again. The compiler was corrected to issue a "multiple
declaration" diagnostic for this case.
V5.3-62 The compiler was emitting erroneous SCA information for
numerous cases. The compiler was corrected to emit proper
SCA information for these cases.
V5.3-63 The compiler was failing with an access violation under
certain circumstances when a CHARACTER item was erroneously
declared. The compiler was corrected to properly handle
these situations.
V5.3-64 The compiler was failing with an access violation under
certain circumstances involving a logical expression as the
first statement within a DO-loop. Both operands of the
logical expression must themselves be logical expressions.
Due to value propagation, the left operand expression is
VAX FORTRAN MAINTENANCE FIXES
SUMMARY OF MAINTENANCE CHANGES
always false and thus is eliminated. Also, due to value
propagation, the first operand of the right operand
expression always evaluates to true. A few other conditions
must also exist for this problem to occur. The compiler has
been modified to generate the correct code under these
circumstances.
V5.3-65 The compiler generated bad code under certain circumstances
involving a DO-loop nested within a parallel DO-loop. The
circumstances are that the /NOOPTIMIZE command line
qualifier must be specified and that the incremental
parameter for the nested DO-loop must not be a constant.
The compiler has been modified to generate the correct code
under these circumstances.
V5.3-66 The compiler generated bad code under certain circumstances
involving PRIVATE local symbols. The compiler was ignoring
the PRIVATE declaration for local symbols that were also
specified in an EQUIVALENCE statement. The compiler has
been modified to generate the correct code under these
circumstances.
V5.3-67 The compiler failed with an internal consistency failure
under some circumstances. The only circumstance that can be
categorized is that the routine being compiled must contain
numerous DO-loops and IF-THEN blocks. The compiler was
modified to correctly handle this case.
V5.3-68 The compiler was improperly issuing an "ILLBRANCH, Illegal
branch into or out of parallel DO-loop" diagnostic under
certain circumstances one of which includes DO-loops nested
at least two levels deep within a parallel DO-loop. The
compiler was corrected to only issue this diagnostic for
valid error cases.
V5.3-69 The compiler was not writing, to the listing file, error
messages caused by errors in INCLUDE files or DICTIONARY
source if listing of those sources was suppressed. The
compiler was corrected to always write such error messages
to the listing file.
V5.3-70 The compiler was emitting erroneous debugger and/or
diagnostic file information if a source file contained more
than 65535 records. The compiler was corrected to properly
handle source files of any size.
VAX FORTRAN MAINTENANCE FIXES
SUMMARY OF MAINTENANCE CHANGES
V5.3-71 The compiler was not properly counting source lines which
consisted of a single byte containing a form-feed character.
The compiler was corrected to properly count these lines and
also to display them properly in the listing file. This
change has the effect of changing the listing and error line
numbers associated with lines in sources that contain
form-feed records.
V5.3-72 The compiler did not have the ability to tell SCA that an
integer constant was being passed as an actual argument,
which would enable SCA to relax its type checking and allow
such constants to be passed to dummy arguments of differing
size. SCA was enhanced to provide such an option and the
compiler was enhanced to use it. Now SCA will only report a
type mismatch error when the integer constant passed is too
large to be represented in the type of the receiving dummy
argument.
V5.3-73 The compiler would sometimes fail with an unpredictable
error or would write a corrupted SCA analysis data file if a
CDD path name or placeholder longer than 32 characters was
present in the source file and /ANALYSIS_DATA was specified.
The compiler was corrected to properly handle these longer
values when emitting the SCA name table.
V5.3-74 The compiler was generating incorrect debug symbol table
output for DICTIONARY statements. The compiler was
corrected to generate the correct output for this case.
V5.3-75 Under some conditions, the compiler could generate an
invalid SCA name table, where the number of blocks in the
name table given to SCA was one greater than the actual
number of blocks. The compiler was corrected to produce the
correct name table output under all conditions.
V5.3-76 The compiler did not allow INCLUDE statements in structure
declarations. The compiler was corrected to allow INCLUDE
statements within structure declarations.
V5.3-77 The compiler was not generating correct code for arithmetic
IF statements with certain simple expressions. These
expressions had to contain the constants 1, 0, or -1. The
compiler was fixed to generate code which branches
correctly.
VAX FORTRAN MAINTENANCE FIXES
SUMMARY OF MAINTENANCE CHANGES
V5.3-78 When the name of a function or an identifier declared
EXTERNAL appeared in a type declaration statement, the
compiler was describing the name to SCA as a variable. The
compiler was corrected to indicate to SCA that the
identifier was either a function implementation or function
specification, as appropriate.
V5.3-79 The compiler was emitting contradictory SCA information
about intrinsic functions and routines. The compiler was
corrected to give SCA consistent and correct information
about intrinsics.