...
HPF is intended for programming distributed memory machines and introduced ``directives'' (Fortran 90 structured comments) to give hints on how to distribute data (arrays) amongst grids of (non-homogeneous) processors. The idea is to relieve the programmer of the burden of writing explicit message-passing code; the compilation system does this instead. HPF also introduced a small number of executable statements (parallel assignments, side effect free (PURE) procedures) which have been adopted by Fortran 95.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...
Dyadic means ``takes two operands''.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...
``takes one operand''.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...
``takes two operands''.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...
It seem to be a common misconception that Fortran loops always have to be executed once - this came from FORTRAN 66 and is now totally incorrect. Zero executed loops are useful for programming degenerate cases.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...
Note how the DO variable can be greater than < expr2 >.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...manipulation
There is no BIT data type but intrinsics exist for manipulating integers as if they were bit variables.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...
lda is either a PARAMETER or a dummy argument.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...
This makes passing arrays to a procedure written in a different language very difficult indeed
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...
The correct vector equivalent to the original DO-loop can be achieved by using the SUM intrinsic, A(2:15) = (/ (SUM(1:i), i=2,15) /)
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...
This constraint will be relaxed in Fortran 95.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...
This constraint will be relaxed in Fortran 95.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...
The NAg library deals with solving numerical problems and is ideal for engineers and scientists. fl90, the NAg Fortran 90 Mk I library, has just been released as a successor to the well respected and popular FORTRAN 77 library which contains at least 1140 routines.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...
There is an auxiliary Fortran 90 standard known as the ``Varying String'' module. This is to be added to the Fortran 95 standard and will allow users to define and use objects of type VARYING_STRING where CHARACTER objects would normally be used. The Standard has already been realised in a module (by Lawrie Schonfelder at Liverpool University). All the intrinsic operations and functions for character variables have be overloaded so that VARYING_STRING objects can be used in more or less the same way as other intrinsic types.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...
Using COMMON to achieve this is strongly discouraged as this method of global data declaration is considered to be unsafe, obtuse and outmoded.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...
The PURE specifier will be part of the Fortran 95 language.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...
the INTENT attribute should also be given (this has not been covered yet see Section 13.7 for details.)
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...
INCLUDE was an extension to FORTRAN 77 and literally included a specified file at the appropriate place in the code.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...
If the objects are not static then it must be ensured that at least one use of the module is always in operation - this usually means using it in the main program. If the objects are not static and the module is only used in two separate subroutines that are called directly by the main program then the data will disappear after the first use goes out of scope and be redeclared when the second is entered. (This can actually be useful for declaring an identical set of local objects in a number of independent procedures.)
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...
A COMMON block names a specific area of memory and splits it up into areas that can be referred to as scalar or array objects, for a single COMMON block it is possible to specify a different partition of data objects each time the block is accessed, each partition can be referred to by any type, in other words the storage can be automatically retyped and repartitioned with gay abandon - this leads to all sorts of insecurities. Putting the block in a MODULE removes any possibility of the above type of misuse.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...
the bits are counted from right to left
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...
There are other less important specifiers which are not covered here.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...Data
for example, the Cray T3D.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...Data
for example, ICL DAP
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...erroneous
I have not yet found a compiler that checks this constraint!
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...Vienna
major players in the HPFF.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...association
This means that for an assumed-size array element A(i+1) occupies the previous memory location to A(i), this is clearly not true for an HPF program; A(i) and A(i+1) may well be on separate processors - they could feasible even be on opposite sides of the world! HPF programs should not use any sequence associated objects.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...smart
which, currently, most are not!
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...grid
Recall that all processor arrangements in a single HPF program must contain the same number of processors
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...program
Processor subsets are to be included in HPF2.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...mapping
A compiler is at liberty to supply a default (or implicit) mapping for arrays without explicit mapping directives.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

©University of Liverpool, 1997
Wed May 28 20:20:27 BST 1997
Not for commercial use.