Upload
vancong
View
227
Download
1
Embed Size (px)
Citation preview
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Grid Computing:Application Development
Lennart JohnssonDepartment of Computer Science and
the Texas Learning and Computation CenterUniversity of Houston
Houston, TXDepartment of Numerical Analysis and Computer Science and PDC
Royal Institute of TechnologyStockholm, Sweden
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Grids are “Hot”
Courtesy Ken Kennedy
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Grids: Application Development
Courtesy Ken Kennedy
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Grids: Middleware Development
Courtesy Ken Kennedy
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Grids: Administration
Courtesy Ken Kennedy
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Grid Application Development
Courtesy Ken Kennedy
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Grid Application Development: A Software Grand Challenge
• Goal: Reliable performance on heterogeneous platforms, under varying load on computation nodes and on communications links
• Challenges:– Presenting a high-level application development interface
• If programming is hard, its useless
– Designing and constructing applications for adaptability– Mapping applications to dynamically changing configurations– Determining when to interrupt execution and remap
• Application monitors• Performance estimators
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
What is Needed• Execution infrastructure for reliable performance
– Automatic resource location and execution initiation – dynamic configuration to available resources
• Performance monitoring and control strategies– deep integration across compilers, tools, and runtime systems– performance contracts and dynamic reconfiguration
• Abstract Grid programming models and easy-to-use programming interfaces– design of an implementation strategy for those models– problem-solving environments
• Robust reliable numerical and data-structure libraries– predictability and robustness of accuracy and performance– reproducibility, fault tolerance, and auditability
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
GrADSoft Architecture• Goal: reliable performance under varying load
Whole-ProgramCompiler
Libraries
DynamicOptimizer
Real-timePerformance
MonitorPerformance
Problem
ServiceNegotiator
Scheduler
GridRuntimeSystem
SourceAppli-cation
Config-urableObject
Program
SoftwareComponents
Performance Feedback
Negotiation
GrADS Project (NSF NGS): Berman, Chien, Cooper, Dongarra, Foster, Gannon Johnsson, Kennedy, Kesselman, Mellor-Crummey, Reed, Torczon, Wolski
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
GrADSoft ArchitectureProgram Preparation System Execution Environment
Whole-ProgramCompiler
Libraries
DynamicOptimizer
Real-timePerformance
MonitorPerformance
Problem
ServiceNegotiator
Scheduler
GridRuntimeSystem
SourceAppli-cation
Config-urableObject
Program
SoftwareComponents
Performance Feedback
Negotiation
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
High Level Programming System• Built on Libraries Coded by Professionals
– Included mapping strategies and cost models– High level knowledge of integration strategies
• Integration Produces Configurable Object Program– Integrated mapping strategy and cost model– Performance enhanced through context-dependent variants– Context includes potential execution platform
• Dynamic Optimizer Performs Final Binding– Implements mapping strategy– Chooses machine-specific variants– Inserts monitoring probes
• Strategy: move compilation overhead to PSE-generation time
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Configurable Object Program• Representation of the Application
– Supporting dynamic reconfiguration and optimization for distributed targets, may include
• Program intermediate code• Annotations from the compiler
– mapping strategy and performance model• Historical information (run profile to now)
• Mapping strategies– Aggregation of data regions (submeshes) or tasks– Definition of parameters for algorithm selection
• Challenge: synthesis of performance models– User input, especially associated with libraries– Synthesize different components, scale models to problem size
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Execution Cycle• Configurable Object Program is presented
– Space of feasible resources must be defined– Mapping strategy and performance model provided
• Service Negotiator solicits acceptable resource collections– Performance model is used to evaluate each– Best match is selected and contracted for
• Execution begins– Dynamic optimizer tailors program to resources
• Selects mapping strategy• Inserts sensors
• Contract monitoring is conducted during execution– Soft violation detection based on fuzzy logic
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Performance Contracts• At the Heart of the GrADS Model
– Fundamental mechanism for managing mapping and execution
• What are they?– Mappings from resources to performance – Mechanisms for determining when to interrupt and reschedule
• Abstract Definition– Random Variable: r(A,I,C,t0) with a probability distribution
• A = app, I = input, C = configuration, t0 = time of initiation• Important statistics: lower and upper bounds (95% confidence)
• Challenge– When should a contract be (viewed as) violated?
• Strict adherence balanced against cost of reconfiguration
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Grids - Performance
Courtesy Dan Reed
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Grids - Performance
Courtesy Dan Reed
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Performance Signatures
Courtesy Dan Reed
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Contract Monitoring
• Input:– Performance model
• Integrated from a variety of sources: user, compiler, application experience, application signatures
– Resources contracted for
• Trigger– Registration information from sensors installed in applications
• Inserted by dynamic optimizer or user
• Output– Rule based contract monitor that decides when contract violation
is serious enough to merit reconfiguration• Based on information from sensors
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Grid Computing – Core Library
Courtesy Jack Dongarra
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Grid Computing – Core Library
Courtesy Jack Dongarra
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Grid Computing – Library Use
Courtesy Jack Dongarra
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Grid Computing – Library Use
Courtesy Jack Dongarra
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
GrADS Library SequenceLibraryRoutineUser
User makes a sequential callto a numerical library routine.The Library Routine has “crafted code”which invoke other components.
Slide courtesy Jack Dongarra
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
GrADS Library SequenceLibraryRoutineUser Resource
Selector
Library Routine calls a grid based routine to determine which resources are possible for use. The Resource Selector returns a “bag of processors” (coarse grid) that are available.
Slide courtesy Jack Dongarra
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
LibraryRoutineUser Resource
Selector
PerformanceModel
The Library Routinecalls the Performance Modeler to determine thebest set of processors to usefor the given problem. May be done by evaluating aformula or running a simulation.May assign a number of processes toa processor. At this point have a fine grid.
GrADS Library Sequence
Slide courtesy Jack Dongarra
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
LibraryRoutineUser Resource
Selector
PerformanceModel
ContractDevelopment
The Library Routine calls theContract Development routineto commit the fine grid for this call. A performance guarantee is generated.
GrADS Library Sequence
Slide courtesy Jack Dongarra
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
LibraryRoutineUser
ResourceSelector
PerformanceModel
ContractDevelopment
AppLauncher
GrADS Library Sequence
“mpirun –machinefile fine_grid grid_linear_solve”
Slide courtesy Jack Dongarra
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Grids – Library Evaluation
Courtesy Jack Dongarra
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Arrays of Values Generated by
Resource Selector
x x x x x xx x x x x xx x x x x xx x x x x xx x x x x xx x x x x x
x x x
xx x x x x x x x x x x x x x x x
x x
x
x
x x x x x x x x x x x x x x x x x x x x x x x x x
x
xx x x x x x x x
x x x x x xx x x x x xx x x x x xx x x x x xx x x x x x
• Clique based– 2 @ UT, UCSD, UIUC – Full at the cluster level
and the connections (clique leaders)
– Bandwidth and Latency information looks like this.
– Linear arrays for CPU and Memory Courtesy Jack Dongarra
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Grids – Performance Models
Courtesy Jack Dongarra
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Grids – Library EvaluationCourtesy Jack Dongarra
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Grids – Library Evaluation
Courtesy Jack Dongarra
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Grids – Library Evaluation
Courtesy Jack Dongarra
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Sample Application - Cactus
Courtesy Ed Seidel
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Cactus on the Grid
Courtesy Ed Seidel
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Cactus on the Grid
Courtesy Ed Seidel
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Cactus – Migration basis
Courtesy Ed Seidel, Ian Foster
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Cactus – Job Migration
Courtesy Ed Seidel, Ian Foster
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Cactus – Migration Architecture
Courtesy Ed Seidel, Ian Foster
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Cactus - Migration exampleCourtesy Ed Seidel, Ian Foster
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Bioimaging
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
SynchrotronsSynchrotrons
MacromolecularMacromolecularComplexes, Complexes, Organelles, CellsOrganelles, Cells
Organs, Organ Organs, Organ Systems, OrganismsSystems, Organisms
MicroscopesMicroscopes
Magnetic Resonance Magnetic Resonance ImagersImagers
Imaging InstrumentsMolecules
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
500 Å
JEOL3000-FEGLiquid He stageNSF support
No. of Particles Needed for 3-D Reconstruction
8.5 Å 4.5 Å6,000 5,000,000
3,000 150,0008.5 Å Structure of the
HSV-1 Capsid
ResolutionB = 100 Å2
B = 50 Å2
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
EMEN Database•Archival•Data Mining•Management
VitrificationRobot Particle Selection
Power SpectrumAnalysis
Initial3D Model
ClassifyParticles
Reproject3D Model
AlignAverageDeconvolute
Build New3D Model
EMAN
Micrographs
• 4 - 64 Mpixels, 16-bit (8 – 128 MB)
• 100 – 200/day per lab
• 10 – 1,000 particles per micrograph
• Several TB/yr
Project
• 200 – 10,000+ micrographs
• 10,000 – 10,000,00 particles
• 10k – 1,000k pixels/particle
• Up to hundreds of PFlops
EM imaging
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
EMAN
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
GrADSoft
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Grid Application Software
• Managing Data, Codes and Resources Securely
• Performance
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
SimDB: A Grid Based Problem Solving Environment
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Molecular Dynamics
Jim Briggs
University of Houston
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Molecular Dynamics Simulations
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Trajectory PropertiesFunction Result
Transport coefficients Scalar
Normal modes Set of scalar values
Solvent residence times Set of scalar values
Average structures 3 x 1D coordinates
Animation 3 x 1D coordinates x N frames
Radial distribution functions 1D histogram
Energy profiles 1D or 2D histogram
Solvent densities 2D or 3D histogram
Angles/distances between solute groups 1D time series
Atom-atom distances 1D time series
Dihedral angles 1D time series
Root mean square deviations 1D time series
Simple thermodynamic properties 1D time series
Time correlation functions 1D time series
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
SimDB Workflow
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
SimDBArchitecture
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
SimDB Data Access
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
SimDBData
Generation
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
SimDB Administration
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
GrADSoft ArchitectureProgram Preparation System Execution Environment
Whole-ProgramCompiler
Libraries
DynamicOptimizer
Real-timePerformance
MonitorPerformance
Problem
ServiceNegotiator
Scheduler
GridRuntimeSystem
SourceAppli-cation
Config-urableObject
Program
SoftwareComponents
Performance Feedback
Negotiation
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Adaptive Software
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Challenges• Algorithmic
– Multiple data structures and their interaction– Unfavorable data access pattern (big 2n strides)
– High efficiency of the algorithm• low floating-point v.s. load/store ratio
– Additions/multiplications unbalance • Version explosion
– Verification– Maintenance
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
• Diversity of execution environments– Growing complexity of modern microprocessors.
• Deep memory hierarchies• Out-of-order execution• Instruction level parallelism
– Growing diversity of platform characteristics• SMPs• Clusters (employing a range of interconnect technologies)• Grids (heterogeneity, wide range of characteristics)
• Wide range of application needs– Dimensionality and sizes– Data structures and data types– Languages and programming paradigms
Challenges
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Opportunities
• Multiple algorithms with comparable numerical properties for many functions
• Improved software techniques and hardware performance
• Integrated performance monitors, models and data bases
• Run-time code construction
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Approach• Automatic algorithm selection – polyalgorithmic
functions– Entirely different algorithms, exploit decomposition of
operations,…• Code generation from high-level descriptions• Extensive application independent compile-time
analysis• Integrated performance modeling and analysis• Run-time application and execution environment
dependent composition • Automated installation process
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Performance TuningMethodology
Input ParametersSystem specifics,
UHFFT Code generator
Library of FFT modules
Performancedatabase
User options
Installation
Input ParametersSize, dim., …
InitializationSelect best plan
ExecutionCalculate one or more FFTs
Run-time
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
The UHFFT
• Program preparation at installation (platform dependent)
• Integrated performance models (in progress) and data bases
• Algorithm selection at run-time from set defined at installation
• Automatic multiple precision constant generation• Program construction at run-time based on
application and performance predictions
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
The Fast Fourier Transform
n
n
WW
of ionsfactorizat sparse algorithmsFast .operations )( requires ofn Applicatio 2
⇔o
o nO
k21n AAAW K=
. same factor the towaysdifferent Many unique.not ision factorizat Sparse
ops. login evaluated becan ofn Applicatio .log and )operations ( sparse are where
n
n
i
W
WA
o
o
o (n))O(n(n)kO(n) =
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Sparse Factorization Algorithms
• Rader’s Algorithm• Prime Factor Algorithm• Split-radix• Mixed-radix (Cooley-Tukey)
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Notation• Simple way to describe highly structured matrices• Tensor (Kronecker) product
⎟⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜⎜
⎝
⎛
=⊗
−−−−
−
−
BBB
BBBBBB
BA
111110
111110
100100
nnnn
n
n
aaa
aaaaaa
L
MOMM
L
K
matrix blocking matrix, scaling == BA
• Direct sum notation:
⎟⎟⎠
⎞⎜⎜⎝
⎛=⊕
B00A
BA
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Prime Factor Algorithm
tion).multiplicafactor twiddle(noPFA theusingby operations ofnumber thereduce to
possible isit 1gcd and ,When == (r,q) rqn
,
2qr1
2qrqr1n
)ΠW(WΠ
)ΠW)(II(WΠW
⊗=
⊗⊗=
matrices.n permutatio are , where 21 ΠΠ
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Split-radix Algorithm
splitting. 2radix of levels Two algorithm.efficient most the2 When
-n k
o
o =
n,2n/22n/22,n/22n )ΠW(I)DI(WW ⊗⊗=
can write we42 When pqn ==o
n,2q,2qq,2n,
223
pn,pn,qm
p2qq2a
maSR
q,2n,ppqSRn
ΠΠIΠ
WWΩΩIB
)]IW()[II(WB
BBB
)ΠWW(WBW
)(
, )1(~ ,
, ~,
,
⊕=
−⊕=⊕⊕=
⊗⊕⊗=
=
⊕⊕=
i
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Mixed-radix Splittingas written becan ,When nW rqn =
, rn,qrqr,qrn )ΠW(I)DI(WW ⊗⊗=
matrix diagonal a is where factor twiddleD qr,
,1
,1r
n nωω −
−
⊕⊕⊕=
⊕⊕⊕=
L
L
qn,
1rqn,qn,qqr,
Ω
ΩΩID
matrix.n permutatiosort mod a is and -rrn,Π
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Algorithm Selection Logic
if n<=2 DFTelse if n is prime use Rader’s algorithmelse
Chose factor r of nif r and n/r are coprime use PFAelse if n is divisible by (r2) and n>r3
use Split-Radix algorithmelse use Mixed-radix algorithm
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Example N = 6FFTPrimeFactor n = 6, r = 3, dir = Forward, rot = 1
FFTRader n = 3, r = 2, dir = Forward, rot = 1DFT n = 2, r = 2, dir = Forward, rot = 1DFT n = 2, r = 2, dir = Inverse, rot = 1
FFTRader n = 3, r = 2, dir = Forward, rot = 1DFT n = 2, r = 2, dir = Forward, rot = 1DFT n = 2, r = 2, dir = Inverse, rot = 1
DFT n = 2, r = 2, dir = Forward, rot = 1DFT n = 2, r = 2, dir = Forward, rot = 1DFT n = 2, r = 2, dir = Forward, rot = 1
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
UHFFT Architecture
Key:Fixed library code
Generated code
Code generator
Unparser Scheduler
Optimizer Initializer(Algorithm Abstraction)
FFT CodeGenerator
Library ofFFT Modules
InitializationRoutines
Mixed-Radix(Cooly-Tukey)
Prime FactorAlgorithm
Split-RadixAlgorithm
Rader'sAlgorithm
ExecutionRoutines
Utilities
UHFFTLibrary
Funded in part by the Alliance (NSF) and LACSI (DoE)
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Optimization Strategy• High level (performed at application
initialization)– Selection of the optimal factorization using
preoptimized codelets– Generation of an execution plan
• Low level – Selected set of codelets– Selected codelets automaticly generated and
highly optimized by a special-purpose compiler
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
The UHFFT: Code Generation• Structure
• Algorithm abstraction• Optimization• Generation of a DAG• Scheduling of instructions• Unparsing
• Implementation• Code generator is written in C
• Speed, portability and installation tuning• Highly optimized straight line C code• Generates FFT codelets of arbitrary size,
direction, and rotation
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
• Basic structure is an Expression– Constant, variable, sum, product, sign change, …
• Basic functions– Expression sum, product, assign, sign change, …
• Derived structures– Expression vectors, matrices and lists
• Higher level functions– Matrix vector operations– FFT specific operations
• Algorithms currently supported• Rader (two versions), PFA, Split-radix, Mixed-radix
The UHFFT: Code Generation (cont’d)
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
The UHFFT: Code Generation Mixed-Radix Algorithm
rn,mrmr,mrn )ΠW(I)DI(WW ⊗⊗=
/** FFTMixedRadix() Mixed-radix splitting.* Input:* r radix,* dir, rot direction and rotation of the transform,* u input expression vector.*/ExprVec *FFTMixedRadix(int r, int dir, int rot, ExprVec *u)
int m, n = u->n, *p;
m = n/r;p = ModRSortPermutation(n, r);u = FFTxI(r, m, dir, rot,
TwiddleMult(r, m, dir, rot,IxFFT(r, m, dir, rot, PermuteExprVec(u, p))));
free(p);return u;
Equation:
Is implemented as:
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
The UHFFT: Performance Modeling
• Analytic models• Cache influence on library codes• Performance measuring tools (PCL, PAPI)• Prediction of composed code performance• Updated from execution experience
• Data base• Library codes. Recorded at installation time• Composed codes. Recorded and updated for each
execution.
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
The UHFFT: Execution Plan Generation
• Optimal plan search options– Exhaustive– Recursive– Empirical
• Algorithms used – Rader (FFTW, UHFFT)– PFA (UHFFT) – Split-radix (UHFFT) – Mixed-radix (FFTW, SPIRAL, UHFFT)
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Characteristics of Some ProcessorsProcessor Clock
frequencyPeak
PerformanceCache structure
Intel Pentium IV 1.8 GHz 1.8 GFlops L1: 8K+8K, L2: 256K
AMD Athlon 1.4 GHz 1.4 GFlops L1: 64K+64K, L2: 256K
Alpha EV67/68 833 MHz 1.66 GFlops L1: 64K+64K, L2: 4M
PowerPC G4
867 MHz 867 MFlopsL1: 32K+32K
L2: 256K, L3: 1-2M
Intel Itanium 800 Mhz 3.2 GFlopsL1: 16K+16K
L2: 92K, L3: 2-4M
IBM Power3/4 375 MHz 1.5 GFlops L1: 64K+32K, L2: 1-16M
HP PA 8x00 750 MHz 3 GFlops L1: 1.5M + 0.75M
MIPS R1x000 500 MHz 1 GFlop L1: 32K+32K, L2: 4M
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Codelet efficiency
Intel PIV 1.8 GHz AMD Athlon 1.4 GHz
PowerPC G4 867 MHz
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Plan Performance, 32-bit Architectures
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Power3 plan performance
0
50
100
150
200
250
300
350
MFL
OPS
16
2 8
4 4
8 2
2 2
4
2 4
2
4 2
2
2 2
2 2
Plan
222 MHz888 Mflops
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
340
350
360
370
380
390
400
410
420
430
"MFL
OPS
"
9 5
8 7
7 9
5 8
5 7
8 9
5 8
7 9
8 9
5 7
8 5
7 9
8 7
9 5
9 7
5 8
5 9
8 7
8 7
5 9
9 5
7 8
9 7
8 5
5 8
9 7
5 7
9 8
7 8
9 5
7 5
8 9
8 5
9 7
9 8
5 7
7 8
5 9
7 5
9 8
8 9
7 5
9 8
7 5
7 9
8 5
5 9
7 8
Plan
n = 2520 (PFA Plan)
IBM Power3 222 MHz Execution Plan Comparison
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
HP zx1 Chipset
Features:•2-way and 4-way•Low latency connection to the DDR memory (112 ns)
•Directly (112 ns latency)•Through (up to 12 ) scalable memory expanders (+25 ns latency)
•Up to 64 GB of DDR today (256 in the future)•AGP 4x today (8x in the future versions)•1-8 I/O adapters supporting
•PCI, PCI-X, AGP 2-way block diagram
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Itanium …..Processor Clock frequency
PeakPerformance
Cache structure
Intel Itanium 800 Mhz 3.2 GFlopsL1: 16K+16K
(Data+Instruction)L2: 92K, L3: 2-4M (off-die)
Intel Itanium 2 900 Mhz 3.6 GFlopsL1: 16K+16K
(Data+Instruction)L2: 256K, L3: 1.5M (on-die)
Intel Itanium 2 1000 Mhz 4 GFlopsL1: 16K+16K
(Data+Instruction)L2: 256K, L3: 3M (on-die)
Sun UltraSparc-III 750 Mhz 1.5 GFlopsL1: 64K+32K+2K+2K
(Data+Instruction+Pre-fetch+Write)L2: up to 8M (off-die)
Sun UltraSparc-III 1050 Mhz 2.1 GFlopsL1: 64K+32K+2K+2K
(Data+Instruction+Pre-fetch+Write)L2: up to 8M (off-die)
Tested configuration
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Memory HierarchyItanium-2 (McKinley) Itanium
Size:Line size/Associativity:
Latency:Write Policies:
16KB + 16KB64B/4-way
1 cycleWrite through, No write allocate
16KB + 16KB32B/4-way
1 cycleWrite through, No write allocate
Size:Line size/Associativity:
Integer Latency:FP Latency:
Write Policies:
256KB128B/8-wayMin 5 cyclesMin 6 cycles
Write back, write allocate
96K B64B/6-way
Min 6 cyclesMin 9 cycles
Write back, write allocate
Size:Line size/Associativity:
Integer Latency:FP Latency:
Bandwith:
3MB or 1.5MB on chip128B/12-wayMin 12 cyclesMin 13 cycles
32B/cycle
4MB or 2MB off chip64B/4-way
Min 21 cyclesMin 24 cycles
16B/cycle
L1I
and
L1D
Unified
L2
Unified
L3
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
UHFFT Codelet Performance
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
UHFFT Codelet Performance
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
UHFFT Codelet Performance
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Codelet Performance Radix-2
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Codelet Performance Radix-3
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Codelet Performance Radix-4
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Codelet Performance Radix-5
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Codelet Performance Radix-6
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Codelet Performance Radix-7
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Codelet Performance Radix-8
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Codelet Performance Radix-9
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Codelet Performance Radix-16
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Codelet Performance Radix-32
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Codelet Performance Radix-45
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
Codelet Performance Radix-64
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
GrADS Testbed
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
GrADS Testbed
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
GrADS Testbed Web Interface
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
GrADS Testbed Web Interface
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
GrADS Testbed Services
PDCEnabling Science
August 19, 2003 NGSSC School on Grid Computing Lennart Johnsson
GrADS team•Ken Kennedy•Ruth Aydt/Celso Mendez•Francine Berman/Henry Cassanova•Andrew Chien•Keith Cooper•Jack Dongarra•Ian Foster•Dennis Gannon•Lennart Johnsson•Carl Kesselman•Dan Reed•Richard Wolski•Linda Torczon•Many students
NSF funded under NGS