VAX FORTRAN V5.2 Release Notes
VAX FORTRAN V5.2 Release Notes
30 March 1989
30 March 1989
This document contains information about new features in VAX
FORTRAN V5.2, differences between V5.2 and previous
versions, corrections included in VAX FORTRAN V5.2, and
other topics. This file is of interest to both system
management and application programmers.
CONTENTS
CHAPTER 1 VAX FORTRAN V5.2 RELEASE NOTES
1.1 INSTALLING VAX FORTRAN V5.2 . . . . . . . . . . . 1-1
1.1.1 HELP Options For VAX FORTRAN V5 . . . . . . . . 1-1
1.1.1.1 Long HELP . . . . . . . . . . . . . . . . . . . 1-1
1.1.1.2 Short HELP . . . . . . . . . . . . . . . . . . . 1-2
1.2 OVERVIEW OF VAX FORTRAN V5 . . . . . . . . . . . . 1-2
1.3 RESTRICTIONS AND KNOWN PROBLEMS IN VAX FORTRAN
V5.2 . . . . . . . . . . . . . . . . . . . . . . . 1-4
1.3.1 Restrictions On Standards Checking . . . . . . . 1-4
1.3.2 Using /DML And /PARALLEL Qualifiers . . . . . . 1-5
1.3.3 Error In FORDEF.FOR . . . . . . . . . . . . . . 1-5
1.3.4 Executing Parallel Applications In Quick
Succession . . . . . . . . . . . . . . . . . . . 1-5
1.3.5 Executing Parallel Applications As A Detached
Process . . . . . . . . . . . . . . . . . . . . 1-6
1.3.6 Restriction On COMMON Block Names . . . . . . . 1-6
1.3.7 Security Exposure . . . . . . . . . . . . . . . 1-6
1.3.8 Using PPL$ Run-Time Library Routines . . . . . . 1-6
1.4 FORSYSDEF MODULES . . . . . . . . . . . . . . . . 1-6
1.5 ADDITIONAL PARALLEL PROCESSING HELP . . . . . . . 1-7
1.5.1 Tuning Issues For Parallel Processing . . . . . 1-7
1.5.1.1 System Parameters . . . . . . . . . . . . . . . 1-7
1.5.1.2 User Parameters . . . . . . . . . . . . . . . . 1-7
1.5.1.3 Working Set Parameters . . . . . . . . . . . . . 1-8
1.5.1.4 Increasing Cache Performance Of Parallel
Applications . . . . . . . . . . . . . . . . . . 1-8
1.5.2 Linking Against FORTRAN Parallel Processing
Support . . . . . . . . . . . . . . . . . . . 1-10
1.5.2.1 Using FORRTL2 Shareable Image . . . . . . . . 1-10
1.5.2.2 Using Run-time Object Modules . . . . . . . . 1-10
1.5.2.3 Creating A Shareable Image Using FORTRAN
Parallel Processing Support . . . . . . . . . 1-10
1.6 COMPATIBILITY ISSUES INVOLVING VAX FORTRAN V4 AND
V5 . . . . . . . . . . . . . . . . . . . . . . . 1-11
1.6.1 Source Compatibility . . . . . . . . . . . . . 1-11
1.6.2 Object Compatibility . . . . . . . . . . . . . 1-12
1.6.3 Image Compatibility . . . . . . . . . . . . . 1-12
1.7 INTERFACING VAX FORTRAN V5 WITH THE COMMON DATA
DICTIONARY . . . . . . . . . . . . . . . . . . . 1-12
CHAPTER 2 DOCUMENTATION CHANGES
2.1 CHANGES TO THE "VAX FORTRAN V5.0 LANGUAGE
REFERENCE MANUAL" . . . . . . . . . . . . . . . . 2-1
2.2 CHANGES TO THE "VAX FORTRAN V5.0 USER MANUAL" . . 2-4
2.3 ERRORS IN "VAX FORTRAN V5.0 INSTALLATION GUIDE" 2-13
CHAPTER 3 VAX FORTRAN MAINTENANCE FIXES
3.1 SUMMARY OF MAINTENANCE CHANGES . . . . . . . . . . 3-1
CHAPTER 1
CHAPTER 1
VAX FORTRAN V5.2 RELEASE NOTES
VAX FORTRAN V5.2 RELEASE NOTES
1.1 INSTALLING VAX FORTRAN V5.2
To install VAX FORTRAN V5.2, please refer to the corresponding
"VAX FORTRAN Installation Guide."
Note that this kit will only install on Version 5.0-1, or later,
of VAX/VMS software.
The command line for VAX FORTRAN V5 contains a new qualifier and
additional qualifier values that did not exist with Version 4 of VAX
FORTRAN. FORTRAN users on the system when the installation of FORTRAN
is performed must log out and then log back on to obtain the new
command line definition.
1.1.1 HELP Options For VAX FORTRAN V5
During the installation procedure, you are given the choice of
selecting either an expanded version or a short version of VAX FORTRAN
HELP. It is suggested that, should you have sufficient space, you
install the long HELP.
1.1.1.1 Long HELP -
The expanded version of HELP consists of approximately 650 blocks
and contains text for VAX FORTRAN language elements as well as
information on the VAX FORTRAN command line and the command
qualifiers. Language element subtopics include built-in functions,
character sets, data, error messages, format specifications, intrinsic
functions, parameter constants, source format, and statements.
1-1
VAX FORTRAN V5.2 RELEASE NOTES
VAX FORTRAN V5.2 RELEASE NOTES
1.1.1.2 Short HELP -
The short version of HELP consists of approximately 50 blocks and
contains information on the VAX FORTRAN command line and command
qualifiers.
1.2 OVERVIEW OF VAX FORTRAN V5
This section briefly describes the new and changed items
associated with VAX FORTRAN V5.
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 (item 1 in the list) 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
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
which 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
1-2
VAX FORTRAN V5.2 RELEASE NOTES
VAX FORTRAN V5.2 RELEASE NOTES
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 which 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.
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-3
VAX FORTRAN V5.2 RELEASE NOTES
VAX FORTRAN V5.2 RELEASE NOTES
VAX FORTRAN Version V5.0 incorporates all bug fixes through edit
level V4.8-291. See section 2 for a description of bug fixes to
update releases of VAX Fortran Version 5.0.
1.3 RESTRICTIONS AND KNOWN PROBLEMS IN VAX FORTRAN V5.2
This section documents restrictions and known problems with VAX
FORTRAN Version V5.2.
1.3.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.
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)
1-4
VAX FORTRAN V5.2 RELEASE NOTES
VAX FORTRAN V5.2 RELEASE NOTES
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.3.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 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 unpredicatable results due to inconsistent I/O control
state among the processes executing the loop iterations.
1.3.3 Error In FORDEF.FOR
Prior to the availability of FORSYSDEF.TLB (see below), several
separate source files were included with VMS systems (in SYS$LIBRARY)
to define system symbols for use by Fortran programmers. These were
FORDEF.FOR, MTHDEF.FOR, SIGDEF.FOR, and FORIOSDEF.FOR. Although
Digital continues to include these files in VMS V5.0 for compatibility
reasons, using FORSYSDEF is now the recommended method for accessing
symbol names, although Digital does continue to update these files
with new symbols as they are added in update releases.
During an attempt to update FORDEF.FOR to reflect symbols added
in VMS V5, a coding error was committed (missing comma). This
incorrect version was inadvertantly included with the VMS V5.0
release, and a corrected version will be included in an update release
of VMS. In the meantime, if you wish to continue to use FORDEF.FOR, a
workaround is for the system manager to edit the file to include the
missing comma (following the definition for the symbol
FOR$_ADJARRDIM).
1.3.4 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
1-5
VAX FORTRAN V5.2 RELEASE NOTES
VAX FORTRAN V5.2 RELEASE NOTES
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.3.5 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.3.6 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.3.7 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.3.8 Using PPL$ Run-Time Library Routines
There is a known problem with the interaction between the VAX
FORTRAN parallel processing support, i.e. routines compiled with
/PARALLEL, and the run-time library PPL$ routines. The result 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.4 FORSYSDEF MODULES
Additional modules have been added to FORSYSDEF.TLB, the FORTRAN
system definition text library, for V5. For a list of the modules
available in FORSYSDEF.TLB, refer to Appendix B of the "FORTRAN User
1-6
VAX FORTRAN V5.2 RELEASE NOTES
VAX FORTRAN V5.2 RELEASE NOTES
Manual" or perform a library listing of FORSYSDEF:
$LIBRARY/LIST SYS$LIBRARY:FORSYSDEF.TLB
One module which is contained in FORSYSDEF but is not documented in
Appendix B is PPL$MSG. This module contains messages for the Parallel
Processing Library facility.
1.5 ADDITIONAL PARALLEL PROCESSING HELP
This section gives additional information that will be useful to
users of the FORTRAN parallel processing support.
1.5.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
chapter of the "VAX FORTRAN User Manual."
1.5.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
page file 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.5.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
1-7
VAX FORTRAN V5.2 RELEASE NOTES
VAX FORTRAN V5.2 RELEASE NOTES
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.5.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 --
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.5.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
1-8
VAX FORTRAN V5.2 RELEASE NOTES
VAX FORTRAN V5.2 RELEASE NOTES
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)
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-9
VAX FORTRAN V5.2 RELEASE NOTES
VAX FORTRAN V5.2 RELEASE NOTES
1.5.2 Linking Against FORTRAN Parallel Processing Support
This section briefly describes ways to link against the FORTRAN
run-time parallel processing support.
1.5.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.5.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.5.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:
1-10
VAX FORTRAN V5.2 RELEASE NOTES
VAX FORTRAN V5.2 RELEASE NOTES
SYS$LIBRARY:STARLET.OLB/INCLUDE=(FOR$INISHR,-
LIB$INITIALIZE,-
SYS$P1_VECTOR)
SYS$LIBRARY:FORRTL2.EXE/SHAREABLE
1.6 COMPATIBILITY ISSUES INVOLVING VAX FORTRAN V4 AND V5
The following sections describe the compatibility among source
programs that are compiled, linked, and run using different versions
of VAX FORTRAN and different versions of VAX/VMS.
1.6.1 Source Compatibility
The following semantic changes may cause some differences in
program behavior after recompilation under VAX FORTRAN V5.
o VAX FORTRAN V5 contains 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.
o The following error diagnostics report problems accessing
default text libraries. These errors are more descriptive
than the V4 mechanism of reporting that the module name
specified was not found in any library.
1. FORT-W-INCOPNFORT Unable to open text library defined by
FORT$LIBRARY
Unable to OPEN the text library associated with the
logical name FORT$LIBRARY.
2. FORT-W-INCOPNSYSL Unable to open system definition text
library SYS$LIBRARY:FORSYSDEF.TLB
Unable to OPEN the system definition file
SYS$LIBRARY:FORSYSDEF.TLB.
Except for these cases, the source language accepted by the VAX
FORTRAN V5 compiler is upward compatible with that accepted by the V4
compiler.
1-11
VAX FORTRAN V5.2 RELEASE NOTES
VAX FORTRAN V5.2 RELEASE NOTES
1.6.2 Object Compatibility
Objects created by the VAX FORTRAN V5 compiler with the default
qualifier /NOPARALLEL are fully compatible with V4 object files and
can be freely mixed with them in the same executable image.
Objects created with /PARALLEL can be freely mixed with V4 objects if
the following conditions are met:
o The V4 objects do not pass arguments to a routine that uses
them in a parallel DO-loop.
o The COMMON blocks declared in the V4 objects are to be
treated as PRIVATE in the parallel application.
1.6.3 Image Compatibility
The images linked with VAX FORTRAN V5 object modules are
executable only on V5.0-1, and later, versions of VMS V5.
1.7 INTERFACING VAX FORTRAN V5 WITH THE COMMON DATA DICTIONARY
VAX FORTRAN V5 supports VAX Common Data Dictionary definitions in
DMU format only. It does not support the CDO format available in VAX
CDD/Plus V4.0. For more information, refer to the CDD documentation.
1-12
CHAPTER 2
DOCUMENTATION CHANGES
2.1 CHANGES TO THE "VAX FORTRAN V5.0 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.1
release of VAX FORTRAN. All of the other changes are repeats of
those contained in the release notes issued with V5.1.
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 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 following changes should 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 In Table 9-3, the RECL value for 'SEGMENTED' should be 2044,
not 2048.
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.
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-3
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-4
DOCUMENTATION CHANGES
*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
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.
2-5
DOCUMENTATION CHANGES
*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 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 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").
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 "/"
2-6
DOCUMENTATION CHANGES
(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:
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:
2-7
DOCUMENTATION CHANGES
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.
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
2-8
DOCUMENTATION CHANGES
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
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
2-9
DOCUMENTATION CHANGES
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 the new 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 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."
2-10
DOCUMENTATION CHANGES
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.
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:
An adjustable array dimension declarator expression contained
an operand that was 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.
2-11
DOCUMENTATION CHANGES
*Page F-23
INCOMPNSYSL should be spelled INCOPNSYSL and should thus 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
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.
2-12
DOCUMENTATION CHANGES
*Page F-58
The last sentence on the page should refer to Table F-1, not Table
F-3.
2.3 ERRORS IN "VAX FORTRAN V5.0 INSTALLATION GUIDE"
Order Number: AA-H953F-TE (June 1988)
Page 15
The reference to "SYS$MANAGER:SYSTARTUP.COM" at the bottom of the
page is incorrect. "SYS$MANAGER:SYSTARTUP_V5.COM" is the correct
reference.
Page 16
The first DCL statement on this page is redundant and should be
omitted. It re-establishes a system default.
Page 26
The errors on Pages 15 and 16 (see above) are repeated on this
page.
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.1-11 The compiler fails with an access violation when a
subprogram contains a DO loop whose control variable is a
dummy argument to that subprogram. The compiler was
corrected to avoid the error in this case.
V5.1-12 The compiler generated bad code under certain rare
situations involving passed length characters. The problem
was that the compiler was generating a movzwl instruction to
a temporary memory location that was only allocated 2 bytes
when it actually needed a longword. This problem has been
VAX FORTRAN MAINTENANCE FIXES
SUMMARY OF MAINTENANCE CHANGES
corrected in the compiler.
SPR Number: MST-6627
V5.1-13 The compiler requires an inordinate amount of compilation
time when a large array is initialized with a DATA
statement. The compiler was modified to avoid the
unnecessary processing that was causing this delay.
V5.1-14 The compiler fails with an access violation under certain
situations involving the use of an array element in an
IOSTAT specification. The compiler was modified to
correctly handle this case.
SPR Number: ICA-19118
V5.1-15 The compiler fails with an access violation when a cross
reference listing is requested and a constant is specified
as the argument to the built-in function %LOC. The compiler
was modified to correctly handle this case.
V5.1-16 The compiler generates an improper "DATA statement out of
order" diagnostic when a DATA statement is followed by an
ENTRY or NAMELIST statement. The compiler was modified to
correctly handle these cases.
V5.1-17 The compiler improperly generates an "illegal directive
specification" when it encounters an assignment statement
where the left-hand-side of the assignment begins with
"PSECT". The compiler was modified to correctly handle this
case.
V5.1-18 The compiler bugchecks when using complicated record
references in a statement function. The compiler was
modified to correctly handle this case.
V5.1-19 The compiler incorrectly treats as a continuation line a
statement that begins with a "D" in column 1 and has an
exclamation point in column 7, if the program is compiled
with the /D_LINES qualifier. The compiler was modified to
correctly handle this case.
V5.1-20 The compiler was generating debug symbol table information
VAX FORTRAN MAINTENANCE FIXES
SUMMARY OF MAINTENANCE CHANGES
for every PARAMETER constant declared in a routine. In many
instances, this was causing object files to grow
considerably in size. The compiler was modified to only
generate debug symbol table information for PARAMETER
constants which are referenced in a routine.
SPR Number: ICA-19949
V5.1-21 The compiler was not placing the correct PARAMETER constant
name in the debug symbol table entry when multiple PARAMETER
constants have the same constant value. The compiler was
modified to place the correct PARAMETER constant name in the
debug symbol table entry.
V5.1-22 The compiler was not generating debug symbol table
information for PARAMETER constants when the /DEBUG/LIST
command line qualifiers were requested and cross reference
information was not requested. The compiler was modified to
correctly generate debug symbol table information for
PARAMETER constants when this combination of qualifiers is
specified.
V5.1-23 The compiler was mistakenly generating a "branch into loop"
error message. This occurred when the
/DIA/STANDARD=SEMANTIC switches were both used in the
compilation. This behavior has been corrected.
V5.1-24 A group of optimizations were lost during V5 development
involving the use of BYTE, INTEGER*2, and LOGICAL*2
expressions as subscripts in array references. These
optimizations were restored.
SPR Number: ICA-20658
V5.1-25 The compiler was generating incorrect code for LEN function
references under some circumstances. The circumstances were
that the LEN reference was to a data item whose length was
known at compile time; the LEN was used in an actual
argument list; and two or more of such LEN references to the
same quantity appeared in the routine. The compiler was
modified to process the LEN references properly in these
cases.
SPR Number: ICA-19689
VAX FORTRAN MAINTENANCE FIXES
SUMMARY OF MAINTENANCE CHANGES
V5.1-26 The compiler was generating an invalid SCA analysis data
file when there were references to any of the following
intrinsic subroutines: DATE, IDATE, ERRSNS, EXIT, TIME, or
MVBITS. The compiler was corrected to generate valid
analysis data for these cases.
V5.1-27 The compiler fails with an access violation when all of the
executed code within a parallel DO-loop can be eliminated
and thus the parallel DO-loop itself may be evaporated.
There also must be references to private variables after the
parallel DO-loop. The compiler was modified to correctly
handle this case.
V5.1-28 The compiler was generating an incorrect subscript out of
range error at run-time when different subscript bound
expressions were used to define different adjustable arrays.
The compiler was modified to properly handle bounds checking
of adjustable arrays.
V5.1-29 The compiler failed with an internal consistency failure
under certain situations involving the value propagation of
an array reference. Additionally, the store being
propagated from is a dead store, thus it can be eliminated.
The compiler was modified to correctly handle this case.
V5.1-30 The compiler failed with an internal consistency failure
when the same name was used as the name of a PARAMETER
constant and as a field within a structure declaration. The
compiler was modified to correctly handle this case.
V5.1-31 The compiler was failing to diagnose the improper use of a
record field or array element reference in an adjustable
array bound expression, and would generate incorrect code in
this situation. The compiler was modified to generate an
ADJARRBOU error for this case, and the text of the message
was modified to read "adjustable array bound contains
invalid data item". Furthermore, the severity of this error
was changed to fatal for all cases in which it occurs.
V5.1-32 The compiler was failing with an ACCVIO when a program was
compiled /ANA and included a record statement that specified
%FILL instead of a record name. The compiler was modified
to correctly handle this case.
VAX FORTRAN MAINTENANCE FIXES
SUMMARY OF MAINTENANCE CHANGES
V5.1-33 The compiler was failing to diagnose the improper use of a
generic intrinsic function name that was not also a specific
function name as an actual argument. The functions in this
category are: DBLEQ, IZEXT, JZEXT, LOG, LOG10, MAX, MIN,
QEXT, QEXTD, QFLOAT, SIZEOF, ZEXT. The compiler was
corrected to generate an INVACTARG error for this situation.