Full HTML for

Basic foilset An Introduction to High Performance Fortran

Given by Geoffrey C. Fox(Tomasz Haupt) at CPS615 Basic Simulation Track for Computational Science on Fall Semester 95. Foils prepared 16 Sept 1995
Outside Index Summary of Material


what is HPF, what we need it for, where it came from
why it is called "High Performance"?
what are HPF compiler directives
data mapping in HPF
parallel statements and constructs in HPF
subset HPF
Fortran 90D

Table of Contents for full HTML of An Introduction to High Performance Fortran

Denote Foils where Image Critical
Denote Foils where HTML is sufficient

1 INTRODUCTION TO
HIGH
PERFORMANCE
FORTRAN
-- June 1995

2 Outline of HPF Presentation
3 HPF is an extension of Fortran 90
4 A bit of HPF history ...
5 Goals and Scope of HPF
6 Parallelism in HPF
7 What gives high performance in HPF
8 Compiler directives used in HPF
9 Syntax of HPF Directives
10 Staged Data Mapping in HPF
11 Template in HPF
12 Abstract Processors in HPF
13 Example of Template and Processors
14 Align Directive in HPF
15 Examples of Align Directive
16 Changing Rank in Align Directive
17 Replication in Align Directive
18 General Alignments in HPF
19 Formal Definition of Align Directive
20 More obscure Complicated Examples of Align Directive
21 Distribution Directive in HPF
22 Basic Examples of Distribute Directive
23 Two Dimensional Example of Distribute Directive
24 Example of Distribute Directive with Complex Alignment
25 Advanced Mapping Directives -- ReDistribution and ReAlign
26 Advanced Mapping Directives -- Allocatable arrays and pointers
27 Subprograms in HPF
28 Passing Distributed Arrays as Subprogram Arguments in HPF
29 Inherit Distribution Directive in HPF
30 Summary of Mapping Directives in HPF
31 Fundamental Parallelism Assumption in HPF
32 Parallel statements and Constructs in HPF
33 Parallelism in Fortran 90 array assignments
34 WHERE (masked array assignment) in HPF
35 FORALL Statement in HPF
36 Examples of FORALL statements in HPF
37 Semantics of the FORALL statement in HPF
38 HPF FORALL construct Pictorially
39 !HPF$ INDEPENDENT FORALL Pictorially
40 !HPF$ INDEPENDENT DO Pictorially
41 !HPF$ INDEPENDENT, NEW Variable
42 WHERE...ELSEWHERE / IF...ELSE constructs in HPF
43 Intrinsic functions in HPF
44 HPF library functions
45 HPF Intrinsic EXAMPLE: SUM
46 Extrinsics in HPF
47 Summary: how to express parallelism in HPF
48 Definition of Official High Performance Fortran Subset
49 The Original Syracuse Project --FORTRAN 90D

Outside Index Summary of Material



HTML version of Basic Foils prepared 16 Sept 1995

Foil 1 INTRODUCTION TO
HIGH
PERFORMANCE
FORTRAN
-- June 1995

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
Tom Haupt
NPAC
111 College Place
Syracuse University
Syracuse NY 13244

HTML version of Basic Foils prepared 16 Sept 1995

Foil 2 Outline of HPF Presentation

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
what is HPF, what we need it for, where it came from
why it is called "High Performance"?
what are HPF compiler directives
data mapping in HPF
parallel statements and constructs in HPF
subset HPF
Fortran 90D

HTML version of Basic Foils prepared 16 Sept 1995

Foil 3 HPF is an extension of Fortran 90

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
To express data parallelism
The new HPF language features fall into four categories wrt Fortran 90
  • compiler directives
  • new language features
  • library routines
  • language restrictions

HTML version of Basic Foils prepared 16 Sept 1995

Foil 4 A bit of HPF history ...

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index

HTML version of Basic Foils prepared 16 Sept 1995

Foil 5 Goals and Scope of HPF

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
Data parallel programming
  • single threaded
  • global name space
  • loosely synchronous parallel computation
Top performance on MIMD and SIMD computers with non-uniform memory access costs
  • preserve efficiency for different machines with comparable number of processors
Code tuning for various architectures

HTML version of Basic Foils prepared 16 Sept 1995

Foil 6 Parallelism in HPF

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
Parallelism in HPF is expressed explicitly
  • Fortran 90 array expressions and assignments (including WHERE)
  • Array intrinsics
  • FORALL statement and construct
  • INDEPENDENT assertion on DO loops
Compiler may choose not to exploit information about parallelism
Compiler may detect parallelism in sequential code

HTML version of Basic Foils prepared 16 Sept 1995

Foil 7 What gives high performance in HPF

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
There is tradeoff between parallelism and communication
Programmer defines the data mapping
Underlaying assumptions are that:
An operation on two or more data object is likely to be carried out much faster if they all reside in the same processor,
and that it may be possible to carry out many such operations concurrently if they can be performed on different processors

HTML version of Basic Foils prepared 16 Sept 1995

Foil 8 Compiler directives used in HPF

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
The directives are structured comments that suggest implementation strategies or assert facts about a program to the compiler
They may affect the efficiency of the computation performed, but do not change the value computed by the program
As in Fortran 90 statements, there are both:
  • declarative directives
  • executable directives

HTML version of Basic Foils prepared 16 Sept 1995

Foil 9 Syntax of HPF Directives

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
HPF directives are consistent with Fortran 90 syntax except for the directive prefix:
  • !HPF$
  • CHPF$
  • *HPF$
Two forms of the directives are allowed
  • Specification statements, such as
  • !HPF DISTRIBUTE MYTEMPLATE(BLOCK) ONTO P
  • Equivalent Attributed form, such as,
  • !HPF DISTRIBUTE (BLOCK) ONTO P :: MYTEMPLATE

HTML version of Basic Foils prepared 16 Sept 1995

Foil 10 Staged Data Mapping in HPF

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index

HTML version of Basic Foils prepared 16 Sept 1995

Foil 11 Template in HPF

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
A template is an abstract space of indexed positions (an "array of nothings")
In CMFortran terminology, Template is set of Virtual Processors -- one per data point
A template is declared by the TEMPLATE directive that specifies:
  • name of the template
  • the rank (i.e., number of dimensions)
  • the extent in each dimension
Examples:
  • CHPF$ TEMPLATE T(1000)
  • !HPF$ TEMPLATE FRED(N, 2*N)
  • *HPF$ TEMPLATE, DIMENSION(5,100,50) :: MINE, YOURS

HTML version of Basic Foils prepared 16 Sept 1995

Foil 12 Abstract Processors in HPF

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
Abstract processors always form a rectilinear grid in 1 or more dimensions
They are abstract coarse grain collections of data-points
The processor arrangement is defined by the PROCESSORS directive that specifies:
  • name of the processor arrangement
  • the rank (i.e., number of dimensions)
  • the extend in each dimension
Examples:
  • !HPF$ PROCESSORS P(N)
  • *HPF$ PROCESSORS BIZARRO(1972:1997,-20:17)
  • CHPF$ SCALARPROC

HTML version of Basic Foils prepared 16 Sept 1995

Foil 13 Example of Template and Processors

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
!HPF$ PROCESSORS P(4)
!HPF$ TEMPLATE X(40)
!HPF$ ALIGN WITH X :: A, B, C
!HPF$ DISTRIBUTE X(BLOCK)
  • ...
  • C = A + B
  • ...

HTML version of Basic Foils prepared 16 Sept 1995

Foil 14 Align Directive in HPF

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
Syntax of Align:
  • !HPF ALIGN alignee WITH align-target
  • where -- note [..] implies optional component
  • alignee: alignee [(align-source-list)]
  • align target: align-target[(align-subscript-list)]
  • Alternatively
  • *HPF ALIGN (align-source-list) WITH align-target :: alignee

HTML version of Basic Foils prepared 16 Sept 1995

Foil 15 Examples of Align Directive

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
Note : denotes all values of array index
Examples of array indices:
  • CHPF$ ALIGN A(i) WITH B(i)
  • *HPF$ ALIGN (i,j) WITH TEMPL(i,j) :: A, B
Use of : examples:
  • !HPF$ ALIGN A(:) WITH B(:)
  • CHPF$ align (:,:) WITH TEMPL(:,:) :: A, B

HTML version of Basic Foils prepared 16 Sept 1995

Foil 16 Changing Rank in Align Directive

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
Ranks of the alignee and the align-target may be different
Examples:
  • !HPF$ ALIGN A(:,j) WITH B(:)
  • CHPF$ ALIGN A(:,*) WITH B(:)

HTML version of Basic Foils prepared 16 Sept 1995

Foil 17 Replication in Align Directive

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
... or other way round
  • !HPF$ ALIGN A(:) WITH TEMPL(:,*)
while ...
!HPF$ ALIGN A(:) WITH TEMPL(:,i)

HTML version of Basic Foils prepared 16 Sept 1995

Foil 18 General Alignments in HPF

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
HPF allows for more general alignments such as:
  • REAL, ARRAY(5,8) :: A,B
!HPF$ TEMPLATE T(12,12)
!HPF$ ALIGN A(:,J) WITH T(:,J+1)
!HPF$ ALIGN B(I,J) WITH T(I+4,J+4)
But nobody is clear if they are useful!

HTML version of Basic Foils prepared 16 Sept 1995

Foil 19 Formal Definition of Align Directive

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
Each align-dummy variable is considered to range over all valid index values for the corresponding dimension of the alignee. An align-subscript is evaluated for any specific combination of values for the align-dummy variables simply by evaluating each align-subscript as a expression. Their resulting subscript values must be legitimate subscripts for the align-target

HTML version of Basic Foils prepared 16 Sept 1995

Foil 20 More obscure Complicated Examples of Align Directive

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
These examples have non-unit stride as perhaps in "red-black" Iterative Solver algorithms:

HTML version of Basic Foils prepared 16 Sept 1995

Foil 21 Distribution Directive in HPF

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
Syntax:
!HPF$ DISTRIBUTE distributee (dist-format)
[ONTO dist-target]
Allowed forms of dist-format:
  • *
  • BLOCK
  • CYCLIC
  • BLOCK(int-expr)
  • CYCLIC(int-expr)
Examples:
  • CHPF$ DISTRIBUTE TEMP(BLOCK,CYCLIC)
  • !HPF$ DISTRIBUTE FRED(BLOCK(10)) ONTO P
  • *HPF$ DISTRIBUTE (BLOCK,*) :: MYTEMPLATE

HTML version of Basic Foils prepared 16 Sept 1995

Foil 22 Basic Examples of Distribute Directive

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
!HPF$ PROCESSORS P(4)
  • REAL, ARRAY(16) :: A
!HPF$ TEMPLATE T(16)
!HPF$ ALIGN A(:) WITH T(:)

HTML version of Basic Foils prepared 16 Sept 1995

Foil 23 Two Dimensional Example of Distribute Directive

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
*HPF PROCESSORS SQUARE(2,2)
*HPF TEMPLATE T(4,4)
*HPF ALIGN A(:,:) WITH T(:,:)
*HPF DISTRIBUTE T(BLOCK,CYCLIC)ONTO SQUARE

HTML version of Basic Foils prepared 16 Sept 1995

Foil 24 Example of Distribute Directive with Complex Alignment

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
CHPF$ PROCESSORS Q(4)
CHPF$ TEMPLATE FRED(16,16)
CHPF$ ALIGN A(:,:) WITH FRED(:,:)
CHPF$ ALIGN B(I,J) WITH FRED(I+2,J+2)
CHPF$ DISTRIBUTE FRED(BLOCK,*)

HTML version of Basic Foils prepared 16 Sept 1995

Foil 25 Advanced Mapping Directives -- ReDistribution and ReAlign

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
This example illustrates remapping from one to two dimensional decomposition
  • REAL, ARRAY(64,64) :: A
  • REAL, ARRAY(64) :: B
!HPF$ PROCESSORS P(64)
!HPF$ PROCESSORS Q(8,8)
!HPF$ DYNAMIC :: A,B
!HPF$ ALIGN B(:) WITH A(:,*)
!HPF$ DISTRIBUTE A(*,BLOCK)ONTO P
  • ...
!HPF$ REALIGN B(:) WITH A(*,:)
  • ...
!HPF$ REDISTRIBUTE A(CYCLIC,CYCLIC) ONTO Q
  • ...

HTML version of Basic Foils prepared 16 Sept 1995

Foil 26 Advanced Mapping Directives -- Allocatable arrays and pointers

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
!HPF$ PROCESSORS Q(64)
!HPF$ ALIGN B(I) WITH A(I+N)
!HPF$ DISTRIBUTE A(BLOCK(M))
!HPF$ DISTRIBUTE(BLOCK), DYNAMIC :: P
  • ...
  • ALLOCATE(A(128))
  • ALLOCATE(B(64))
  • ALLOCATE(P(1024))
  • ...
!HPF$ REDISTRIBUTE P(CYCLIC)
  • ...
  • RETURN
  • END

HTML version of Basic Foils prepared 16 Sept 1995

Foil 27 Subprograms in HPF

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
Scope of a mapping directives is a single (sub)program unit
A template is not a first-class Fortran 90 object: it cannot be passed as a subprogram argument

HTML version of Basic Foils prepared 16 Sept 1995

Foil 28 Passing Distributed Arrays as Subprogram Arguments in HPF

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
There are 3 typical cases:
  • we want to generate a known mapping modified by the callee
    • assertions + inheritance
  • we are going to accept any mapping of the actual argument
    • inheritance
  • we want to force a particular mapping
    • explicit interface

HTML version of Basic Foils prepared 16 Sept 1995

Foil 29 Inherit Distribution Directive in HPF

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
(not a comprehensive discussion; just an example)

HTML version of Basic Foils prepared 16 Sept 1995

Foil 30 Summary of Mapping Directives in HPF

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
PROCESSORS
TEMPLATE
DYNAMICS
INHERIT
ALIGN
DISTRIBUTE
REALIGN
REDISTRIBUTE

HTML version of Basic Foils prepared 16 Sept 1995

Foil 31 Fundamental Parallelism Assumption in HPF

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
An operation on two or more data object is likely to be carried out much faster if they all reside in the same processor
  • i.e. minimize communication
it may be possible to carry out many such operations concurrently if they can be performed on different processors
  • data parallelism

HTML version of Basic Foils prepared 16 Sept 1995

Foil 32 Parallel statements and Constructs in HPF

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
Parallel Statements
  • Fortran 90 array assignments
  • masked array assignments (WHERE)
  • FORALL statement
Parallel Constructs
  • FORALL construct
  • INDEPENDENT DO
  • WHERE and WHERE...ELSEWHERE construct
Intrinsic functions and the HPF library
Extrinsic functions

HTML version of Basic Foils prepared 16 Sept 1995

Foil 33 Parallelism in Fortran 90 array assignments

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
This is as in CMFortran and Maspar MPFortran with example:

HTML version of Basic Foils prepared 16 Sept 1995

Foil 34 WHERE (masked array assignment) in HPF

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
This is as in CMFortran and Maspar MPFortran with example:
  • WHERE (A .GT. 0) A = A - 100
Semantics of WHERE statement:
    • 1. evaluate mask (in parallel) and store as a temporary T1
    • 2. for each i that T1(i)=.TRUE. compute T2(i)=A(i) - 100
    • 3. for each i that T1(i)=.TRUE. assign A(i)=T2(1)

HTML version of Basic Foils prepared 16 Sept 1995

Foil 35 FORALL Statement in HPF

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
A very important extension to Fortran 90 and defines one class of parallel DO loop
It relaxes the restriction that operands of the rhs expressions must be conformable with the lhs array
It may be masked with a scalar logical expression (extension to WHERE)
A FORALL statement may call user-defined (PURE) functions on the elements of an array, simulating Fortran 90 elemental function invocation (albeit with a different syntax)

HTML version of Basic Foils prepared 16 Sept 1995

Foil 36 Examples of FORALL statements in HPF

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
FORALL (i=1:100,k=1:100) a(i,k) = b(i,k) A = B
FORALL (i=2:100:2) a(i) = a(i-1) A(2:100:2) = A(1:99:2)
FORALL (i=1:100) a(i) = i A = [1..100]
FORALL (i=1:100, j=1:100) a(i, j) = i+j
FORALL (i=1,100) a(i,i) = b(i)
FORALL (i=1,100,j=1:100) a(i,j) = b(j,i)
FORALL (i=1,100) a(i, 1:100) = b(1:100, i)
FORALL (i=1:100, j=1:100, y(i,j).NE.0) x(i,j) = REAL(i+j)/y(i,j)
FORALL (i=1,100) a(i,ix(i)) = x(i)
FORALL (i=1,9) x(i) = SUM(x(1:10:i))
FORALL (i= 1,100) a(i) = myfunction(a(i+1))

HTML version of Basic Foils prepared 16 Sept 1995

Foil 37 Semantics of the FORALL statement in HPF

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
Similar to Fortran 90 array assignments and WHERE
Consider example:

HTML version of Basic Foils prepared 16 Sept 1995

Foil 38 HPF FORALL construct Pictorially

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index

HTML version of Basic Foils prepared 16 Sept 1995

Foil 39 !HPF$ INDEPENDENT FORALL Pictorially

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index

HTML version of Basic Foils prepared 16 Sept 1995

Foil 40 !HPF$ INDEPENDENT DO Pictorially

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index

HTML version of Basic Foils prepared 16 Sept 1995

Foil 41 !HPF$ INDEPENDENT, NEW Variable

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
This is an exception from the global name space with replicated variables

HTML version of Basic Foils prepared 16 Sept 1995

Foil 42 WHERE...ELSEWHERE / IF...ELSE constructs in HPF

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
There is a fundamental difference in semantics between IF...ELSE and WHERE...ELSEWHERE constructs

HTML version of Basic Foils prepared 16 Sept 1995

Foil 43 Intrinsic functions in HPF

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
elemental
  • examples:
    • A = SIN(X)
    • FORALL (i=1:100:2) A(i) = EXP(A(i))
transformational and inquiry functions
  • Fortran 90
    • SUM, PRODUCT, ANY, DOTPROD, EOSHIFT, MAXVAL, ...
  • HPF
    • system inquiry functions:
    • NUMBER_OF_PROCESSORS,
    • PROCESSORS_SHAPE
    • extensions of MAXLOC and MINLOC, ILEN
  • HPF library

HTML version of Basic Foils prepared 16 Sept 1995

Foil 44 HPF library functions

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
new array reduction functions
  • IALL, IANY, IPARITY and PARITY
  • (IAND, IOR, IEOR, and .NEQV.)
array combining scatter functions
  • XXX_SCATTER
array prefix and suffix functions
  • XXX_PREFIX, XXX_SUFFIX
array sorting functions
  • GRADE_DOWN, GRADE_UP
bit manipulation functions
  • LEADZ, POPCNT, POPPAR
mapping inquiry subroutines
  • HPF_ALIGNMENT, HPF_TEMPLATE, HPF_DISTRIBUTION

HTML version of Basic Foils prepared 16 Sept 1995

Foil 45 HPF Intrinsic EXAMPLE: SUM

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index

HTML version of Basic Foils prepared 16 Sept 1995

Foil 46 Extrinsics in HPF

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
An extrinsic function is a function written in a language other than HPF including
  • a single-thead-of-control language
  • a multi-thread-of-control language
  • any programming language targeted to a single processor SPMD) with message passing such as MPI
    • Fortran 77, Fortran 90, C, C++, Ada, HPF
HPF defines interface and invocation sequence
Allows one to get efficient parallel code where HPF language or compiler inadequate

HTML version of Basic Foils prepared 16 Sept 1995

Foil 47 Summary: how to express parallelism in HPF

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
Array assignments, WHERE and FORALL
Block of array assignments: FORALL, INDEPENDENT FORALL, INDEPENDENT DO, WHERE...ELSEWHERE
Intrinsic and the HPF library functions
Extrinsic functions

HTML version of Basic Foils prepared 16 Sept 1995

Foil 48 Definition of Official High Performance Fortran Subset

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
Try to make it easier to build initial compilers!
Fortran 90 Features in Subset HPF
  • All FORTRAN 77 except for storage and sequence association
  • Arithmetic and logical array features
    • array sections, array constructors, arithmetic and logical operations on whole arrays and array sections, array assignment, masked array assignments, array-valued external functions, automatic arrays, ALLOCATABLE arrays, POINTERS, TARGET, assumed shape arrays
  • intrinsic functions
  • INTERFACE blocks
HPF features not in Subset HPF
  • DYNAMIC, REALIGN, REDISTRIBUTE and INHERIT
  • PURE and EXTRINSIC function attribute
  • FORALL construct
  • HPF library

HTML version of Basic Foils prepared 16 Sept 1995

Foil 49 The Original Syracuse Project --FORTRAN 90D

From HPFtutorial CPS615 Basic Simulation Track for Computational Science -- Fall Semester 95. *
Full HTML Index
mapping directives
  • PROCESSORS
  • TEMPLATE (mandatory)
  • ALIGN
  • DISTRIBUTE(block) and DISTRIBUTE(block,block)
array assignments
  • Fortran 90 array assignments
  • WHERE statement
  • FORALL statement
intrinsics
  • Fortran 90 elemental intrinsics
  • Fortran 90 reductions (SUM, PRODUCT, ANY, ALL, COUNT, MAXVAL, MAXLOC, MINVAL, MINLOC)
  • EOSHIFT, CSHIFT, DOTPROD, TRANSPOSE

© on Tue Oct 7 1997