Full HTML for

Scripted foilset CPS615-End of Numerical Integration and Very End of HPF

Given by Geoffrey C. Fox at Delivered Lectures of CPS615 Basic Simulation Track for Computational Science on 24 October 96. Foils prepared 11 November 1996
Outside Index Summary of Material


This covers two topics:
Monte Carlo Integration for large scale Problems using Experimental and Theoretical high energy physics as an example
This includes accept-reject methods, uniform weighting and parallel algorithms
Then we complete HPF discussion with embarassingly parallel DO INDEPENDENT discussed in Monte Carlo case
And HPF2 Changes

Table of Contents for full HTML of CPS615-End of Numerical Integration and Very End of HPF

Denote Foils where HTML is sufficient
Denote Foils where Image is not available
Indicates Available audio which is lightpurpleed out if missing
1 Delivered Lectures for CPS615 -- Base Course for the Simulation Track of Computational Science
Fall Semester 1996 --
Lecture of October 24 - 1996

2 Abstract of Oct 24 1996 CPS615 Lecture
3 51:Accept/Reject Method for Generating General Probability Distributions
4 52:Estimate of Maximum in Accept/Reject Method
5 53:Introduction to Metropolis Method
6 54:The Metropolis Procedure
7 55:Why Metropolis Method Works
8 56:Monte Carlo Examples Example 1: An Experimental Physics Application
9 57:A High Energy Experiment Scenario
10 58:An Experimental Physics Monte Carlo
11 59:Double Monte Carlo's Again --- I
12 60:Double Monte Carlo's Again --- II
13 61:A Monte Carlo Event
14 62:Uniform Weight Events
15 64:Example 2: Parallel Computing for ``Event'' Monte Carlos
16 65:Example 3: Lattice Monte Carlo Theoretical Physics
17 66:Choice of Points in Lattice Monte Carlo
18 67:Pictorial View of Lattice Monte Carlo Integrands
19 68:Metropolis and Heat Bath Methods
20 69:Calculation of Observables
21 70:Example 4: Parallel Computing for Lattice Theory
22 71:A Problem Lattice Decomposed Onto a 64-node Machine Arranged as a Machine Lattice
23 !HPF$ INDEPENDENT, NEW Variable
24 Extrinsics in HPF
25 High Performance Fortran HPF2 Changes
26 ON HOME for Computation Placement
27 Reductions in INDEPENDENT DO Loops
28 Spawning Tasks in HPF
29 New Data Mapping Features in HPF 2.0 - I
30 New Data Mapping Features in HPF 2.0 - II

Outside Index Summary of Material



HTML version of Scripted Foils prepared 11 November 1996

Foil 1 Delivered Lectures for CPS615 -- Base Course for the Simulation Track of Computational Science
Fall Semester 1996 --
Lecture of October 24 - 1996

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index
Geoffrey Fox
NPAC
Room 3-131 CST
111 College Place
Syracuse NY 13244-4100

HTML version of Scripted Foils prepared 11 November 1996

Foil 2 Abstract of Oct 24 1996 CPS615 Lecture

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index
This covers two topics:
Monte Carlo Integration for large scale Problems using Experimental and Theoretical high energy physics as an example
This includes accept-reject methods, uniform weighting and parallel algorithms
Then we complete HPF discussion with embarassingly parallel DO INDEPENDENT discussed in Monte Carlo case
And HPF2 Changes

HTML version of Scripted Foils prepared 11 November 1996

Foil 3 51:Accept/Reject Method for Generating General Probability Distributions

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index Secs 254.8
See Original Foil

HTML version of Scripted Foils prepared 11 November 1996

Foil 4 52:Estimate of Maximum in Accept/Reject Method

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index Secs 185.7
See Original Foil

HTML version of Scripted Foils prepared 11 November 1996

Foil 5 53:Introduction to Metropolis Method

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index Secs 221.7
See Original Foil

HTML version of Scripted Foils prepared 11 November 1996

Foil 6 54:The Metropolis Procedure

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index Secs 252
See Original Foil

HTML version of Scripted Foils prepared 11 November 1996

Foil 7 55:Why Metropolis Method Works

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index Secs 208.8
See Original Foil

HTML version of Scripted Foils prepared 11 November 1996

Foil 8 56:Monte Carlo Examples Example 1: An Experimental Physics Application

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index Secs 51.8
See Original Foil

HTML version of Scripted Foils prepared 11 November 1996

Foil 9 57:A High Energy Experiment Scenario

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index Secs 123.8
See Original Foil

HTML version of Scripted Foils prepared 11 November 1996

Foil 10 58:An Experimental Physics Monte Carlo

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index Secs 100.8
See Original Foil

HTML version of Scripted Foils prepared 11 November 1996

Foil 11 59:Double Monte Carlo's Again --- I

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index Secs 57.6
See Original Foil

HTML version of Scripted Foils prepared 11 November 1996

Foil 12 60:Double Monte Carlo's Again --- II

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index Secs 84.9
See Original Foil

HTML version of Scripted Foils prepared 11 November 1996

Foil 13 61:A Monte Carlo Event

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index Secs 126.7
See Original Foil

HTML version of Scripted Foils prepared 11 November 1996

Foil 14 62:Uniform Weight Events

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index Secs 264.9
See Original Foil

HTML version of Scripted Foils prepared 11 November 1996

Foil 15 64:Example 2: Parallel Computing for ``Event'' Monte Carlos

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index Secs 244.8
See Original Foil

HTML version of Scripted Foils prepared 11 November 1996

Foil 16 65:Example 3: Lattice Monte Carlo Theoretical Physics

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index Secs 188.6
See Original Foil

HTML version of Scripted Foils prepared 11 November 1996

Foil 17 66:Choice of Points in Lattice Monte Carlo

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index Secs 190
See Original Foil

HTML version of Scripted Foils prepared 11 November 1996

Foil 18 67:Pictorial View of Lattice Monte Carlo Integrands

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index Secs 70.5
See Original Foil

HTML version of Scripted Foils prepared 11 November 1996

Foil 19 68:Metropolis and Heat Bath Methods

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index Secs 33.1
See Original Foil

HTML version of Scripted Foils prepared 11 November 1996

Foil 20 69:Calculation of Observables

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index Secs 48.9
See Original Foil

HTML version of Scripted Foils prepared 11 November 1996

Foil 21 70:Example 4: Parallel Computing for Lattice Theory

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index Secs 303.8
See Original Foil

HTML version of Scripted Foils prepared 11 November 1996

Foil 22 71:A Problem Lattice Decomposed Onto a 64-node Machine Arranged as a Machine Lattice

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index Secs 612
See Original Foil

HTML version of Scripted Foils prepared 11 November 1996

Foil 23 !HPF$ INDEPENDENT, NEW Variable

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index Secs 360
This is an exception from the conventional HPF picture of a global name space with either distributed or replicated variables

HTML version of Scripted Foils prepared 11 November 1996

Foil 24 Extrinsics in HPF

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index Secs 135.3
An extrinsic function is a function written in a language other than HPF including most naturally any node programming language (e.g. Fortran77) targeted to a single processor SPMD) with message passing such as MPI
HPF defines (Fortran90) interface and invocation characteristics
  • This defines what is input and output via INTENT and these rules must be obeyed by callee (non HPF side)
  • If variables are implicitly replicated, the callee must make them consistent before reurn i.e. callee must respect HPF model of parallelism
  • HPF will execute any remapping commands and hands callee the "right" part of any distributed arrays
  • All processors are synchronized before call to EXTRINSIC function
Allows one to get efficient parallel code where HPF language or compiler inadequate
  • Analogous to calling assembly language from Fortran, Native classes from Java, C from PERL etc.

HTML version of Scripted Foils prepared 11 November 1996

Foil 25 High Performance Fortran HPF2 Changes

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index Secs 123.8
The original HPF 1.0 omitted some key capabilities which were known to be important but syntax and functionality was unclear in 1993
  • Further experience has shown that HPF compilers have proven to be difficult to write!
The HPF Forum met in 1995-96 and has approved a set of Extensions and Simplifications of HPF
The concept of a base HPF 2.0 and Approved Extensions has been agreed
Note approved extensions (which presumably vendors need not implement) include critical capability for dynamic irregular problems
DYNAMIC REALIGN and REDISTRIBUTE are no longer in base language and are just "appproved extensions"
Suprisingly no parallel I/O capabilities were approved!

HTML version of Scripted Foils prepared 11 November 1996

Foil 26 ON HOME for Computation Placement

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index Secs 172.8
!HPF$ INDEPENDENT
DO i = 1 , n
  • !HPF$ ON HOME( ix(i) )
  • x(i) = y(ix(i)) - y(iy(i))
END DO
This modifies the owner computes rule by specifying that computation will not be performed on processor owning left hand side
ON HOME is an approved extension

HTML version of Scripted Foils prepared 11 November 1996

Foil 27 Reductions in INDEPENDENT DO Loops

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index Secs 116.6
Many applications of INDEPENDENT DO loops do require reductions as they are typically calculating independently quantities but storing results as parts of various averages
e.g. in High Enegry Physics Data Analysis, each measured event can be computed via an INDEPENDENT DO but one wishes to find a particular observable (histogram, scatterplot) which is averaged over each event
Financial modelling is similar
x = 0
!HPF$ INDEPENDENT, NEW(xinc), REDUCTION(x)
do i = 1 , N
  • call sub(i, xinc)
  • x = x + xinc
END DO
xinc is a separate new variable each iteration but result is accumulated into global x

HTML version of Scripted Foils prepared 11 November 1996

Foil 28 Spawning Tasks in HPF

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index Secs 97.9
Task Parallelism is sort of supported in HPF but not clear to me that this is a great idea as better to keep sophisticated task parallelism outside HPF which is really only designed to support data parallelism
!HPF$ TASKING
  • !HPF$ ON HOME(p(1:8))
  • CALL foo(x,y)
  • !HPF$ ON HOME(p(9:16))
  • CALL bar(z)
!HPF$ END
This extends SPMD model with foo running on eight and bar on another processors
Note foo and bar are expected to contain data parallel statements which distribute execution using conventional HPF over 8 processors

HTML version of Scripted Foils prepared 11 November 1996

Foil 29 New Data Mapping Features in HPF 2.0 - I

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index Secs 208.8
!HPF DISTRIBUTE x( BLOCK(SHADOW = 1 ) )
  • is designed to help compiler by specifying that it should set up a guard ring each side of BLOCK in each processor. In example Guard ring has extent 1
  • If x has dimension 100 and 4 processors, we allocate storage for
  • x(1..26) in Processor 1
  • x(24..51) in Processor 2
  • x(49..76) in Processor 3
  • x(74..100) in Processor 4
!HPF DISTRIBUTE x( BLOCK( /26,24,24,26/ ) )
  • is designed to specify general BLOCK distribution with in above example
  • x(1..26) in Processor 1
  • x(26..50) in Processor 2
  • x(51..76) in Processor 3
  • x(77..100) in Processor 4
!HPF DISTRIBUTE x( INDIRECT(map_array) )
  • is designed to allow an arbitary user array to specify location of x(i)
  • the processor number in map_array(i) would be typically be calculated by your favorite load balancing routine!

HTML version of Scripted Foils prepared 11 November 1996

Foil 30 New Data Mapping Features in HPF 2.0 - II

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. *
Full HTML Index Secs 205.9
Distribution is now allowed to Processor Subsets with typical Syntax:
  • !HPF$ PROCESSORS procs(1:np)
  • !HPF$ PROCESSORS b(BLOCK) ONTO procs(1:np/2-1)
Distribution is allowed for Derived Types but can only be done at ONE level
  • TYPE bunch_of_meshes
    • REAL A1(100,100,100), A2(100,100,100)
    • !HPF$ DISTRIBUTE (BLOCK,CYCLIC,*) :: A1,A2
  • END TYPE
  • Another Example shows distribution outside TYPE definition
  • TYPE tree with each node having one hundred children
    • TYPE(tree) , POINTER, DIMENSION(100) :: children
    • !HPF$ DYNAMIC children
    • REAL value
  • END TYPE
  • TYPE(tree) actualtree
  • ALLOCATE ( actualtree%children) allocates POINTERs to children
  • !HPF$ REDISTRIBUTE t%children(BLOCK) distributes (for first time) these pointers

© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Fri Aug 15 1997