Transcript Lect01

CS267
Applications of Parallel
Computers
Lecture 1: Introduction
Horst D. Simon
[email protected]
http://www.nersc.gov/~simon
08/27/2002
CS267-Lecture 1
1
Outline
• Introduction
• Large important problems require powerful computers
• Why powerful computers must be parallel processors
• Principles of parallel computing performance
• Structure of the course
08/27/2002
CS267-Lecture 1
2
Why we need
powerful computers
08/27/2002
CS267-Lecture 1
3
Simulation: The Third Pillar of Science
•
Traditional scientific and engineering paradigm:
1) Do theory or paper design.
2) Perform experiments or build system.
•
•
Limitations:
-
Too difficult -- build large wind tunnels.
Too expensive -- build a throw-away passenger jet.
-
Too slow -- wait for climate or galactic evolution.
Too dangerous -- weapons, drug design, climate experimentation.
Computational science paradigm:
3) Use high performance computer systems to simulate the
phenomenon
- Base on known physical laws and efficient numerical methods.
08/27/2002
CS267-Lecture 1
4
Some Particularly Challenging Computations
• Science
-
Global climate modeling
Astrophysical modeling
Biology: genomics; protein folding; drug design
Computational Chemistry
Computational Material Sciences and Nanosciences
• Engineering
-
Crash simulation
Semiconductor design
Earthquake and structural modeling
Computational fluid dynamics
Combustion
• Business
- Financial and economic modeling
- Transaction processing, web services and search engines
• Defense
- Nuclear weapons -- test by simulations
- Cryptography
08/27/2002
CS267-Lecture 1
5
Units of Measure in HPC
• High Performance Computing (HPC) units are:
- Flop/s: floating point operations
- Bytes: size of data
• Typical sizes are millions, billions, trillions…
Mega
Mflop/s = 106 flop/sec
Giga
Gflop/s = 109 flop/sec
Tera
Tflop/s = 1012 flop/sec
Peta
Pflop/s = 1015 flop/sec
Exa
Eflop/s = 1018 flop/sec
08/27/2002
CS267-Lecture 1
Mbyte = 106 byte
(also 220 = 1048576)
Gbyte = 109 byte
(also 230 = 1073741824)
Tbyte = 1012 byte
(also 240 = 10995211627776)
Pbyte = 1015 byte
(also 250 = 1125899906842624)
Ebyte = 1018 byte
6
Economic Impact of HPC
• Airlines:
- System-wide logistics optimization systems on parallel systems.
- Savings: approx. $100 million per airline per year.
• Automotive design:
- Major automotive companies use large systems (500+ CPUs) for:
- CAD-CAM, crash testing, structural integrity and aerodynamics.
- One company has 500+ CPU parallel system.
- Savings: approx. $1 billion per company per year.
• Semiconductor industry:
- Semiconductor firms use large systems (500+ CPUs) for
- device electronics simulation and logic validation
- Savings: approx. $1 billion per company per year.
• Securities industry:
- Savings: approx. $15 billion per year for U.S. home mortgages.
08/27/2002
CS267-Lecture 1
7
Global Climate Modeling Problem
• Problem is to compute:
f(latitude, longitude, elevation, time) 
temperature, pressure, humidity, wind velocity
• Approach:
- Discretize the domain, e.g., a measurement point every 10 km
- Devise an algorithm to predict weather at time t+1 given t
• Uses:
- Predict major events,
e.g., El Nino
- Use in setting air
emissions standards
Source: http://www.epm.ornl.gov/chammp/chammp.html
08/27/2002
CS267-Lecture 1
8
Global Climate Modeling Computation
• One piece is modeling the fluid flow in the atmosphere
- Solve Navier-Stokes problem
- Roughly 100 Flops per grid point with 1 minute timestep
• Computational requirements:
- To match real-time, need 5x 1011 flops in 60 seconds = 8 Gflop/s
- Weather prediction (7 days in 24 hours)  56 Gflop/s
- Climate prediction (50 years in 30 days)  4.8 Tflop/s
- To use in policy negotiations (50 years in 12 hours)  288 Tflop/s
• To double the grid resolution, computation is at least 8x
• State of the art models require integration of
atmosphere, ocean, sea-ice, land models, plus possibly
carbon cycle, geochemistry and more
• Current models are coarser than this
08/27/2002
CS267-Lecture 1
9
High Resolution
Climate Modeling on
NERSC-3 – P. Duffy,
et al., LLNL
Comp. Science : A 1000 year climate simulation
• Warren Washington and Jerry Meehl, National Center
for Atmospheric Research; Bert Semtner, Naval
Postgraduate School; John Weatherly, U.S. Army Cold
Regions Research and Engineering Lab Laboratory et
al.
• A 1000-year simulation
demonstrates the ability of the
new Community Climate
System Model (CCSM2) to
produce a long-term, stable
representation of the earth’s
climate.
•760,000 processor hours
used
http://www.nersc.gov/aboutnersc/pubs/bigsplas
h.pdf
08/27/2002
CS267-Lecture 1
11
Comp. Science: High Resolution Global Coupled Ocean/Sea Ice Model
• Mathew E. Maltrud, Los Alamos National Laboratory;
Julie L. McClean, Naval Postgraduate School.
•
The objective of this project is to couple a highresolution ocean general circulation model with a highresolution dynamic-thermodynamic sea ice model in a
global context.
•Currently, such simulations are
typically performed with a horizontal
grid resolution of about 1 degree. This
project is running a global ocean
circulation model with horizontal
resolution of approximately 1/10th
degree.
•Allows resolution of geographical
features critical for climate studies
such as Canadian Archipelago
http://www.nersc.gov/aboutnersc/pubs/bigsplash.
pdf
08/27/2002
CS267-Lecture 1
12
Parallel Computing in Web Search
• Functional parallelism: crawling, indexing, sorting
• Parallelism between queries: multiple users
• Finding information amidst junk
• Preprocessing of the web data set to help find information
• General themes of sifting through large, unstructured data sets:
- when to put white socks on sale
- what advertisements should you receive
- finding medical problems in a community
08/27/2002
CS267-Lecture 1
13
Document Retrieval Computation
• Approach:
- Store the documents in a large (sparse) matrix
- Use Latent Semantic Indexing (LSI), or related algorithms to “partition”
- Needs large sparse matrix-vector multiply
# documents ~= 10 M
# keywords
24
65
18
x
~100K
•Matrix is compressed
•“Random” memory
access
•Scatter/gather vs. cache
miss per 2Flops
Ten million documents in typical matrix.
Web storage increasing 2x every 5 months.
Similar ideas may apply to image retrieval.
08/27/2002
CS267-Lecture 1
14
Transaction Processing
(mar. 15, 1996)
25000
Throughput (tpmC)
20000
15000
other
10000
Tandem Himalaya
IBM PowerPC
DEC Alpha
5000
SGI PowerChallenge
HP PA
0
0
20
40
60
80
100
120
Processors
• Parallelism is natural in relational operators: select, join, etc.
• Many difficult issues: data partitioning, locking, threading.
08/27/2002
CS267-Lecture 1
15
Why powerful
computers are
parallel
08/27/2002
CS267-Lecture 1
16
Technology Trends: Microprocessor Capacity
Moore’s Law
2X transistors/Chip Every 1.5 years
Called “Moore’s Law”
Microprocessors have
become smaller, denser, and
more powerful.
08/27/2002
Gordon Moore (co-founder of
Intel) predicted in 1965 that the
transistor density of semiconductor
chips would double roughly every
18 months.
Slide source: Jack Dongarra
CS267-Lecture 1
17
Impact of Device Shrinkage
• What happens when the feature size shrinks by a factor
of x ?
• Clock rate goes up by x
- actually less than x, because of power consumption
• Transistors per unit area goes up by x2
• Die size also tends to increase
- typically another factor of ~x
• Raw computing power of the chip goes up by ~ x4 !
- of which x3 is devoted either to parallelism or locality
08/27/2002
CS267-Lecture 1
18
Microprocessor Transistors
100,000,000
10,000,000
R10000
Pentium
Transistors
1,000,000
i80386
i80286
100,000
R3000
R2000
i8086
10,000
i8080
i4004
1,000
1970
1975
1980
1985
1990
1995
2000
2005
Year
08/27/2002
CS267-Lecture 1
19
Microprocessor Clock Rate
1000
Clock Rate (MHz)
100
10
1
0.1
1970
1975
1980
1985
1990
1995
2000
2005
Year
08/27/2002
CS267-Lecture 1
20
Empirical Trends: Microprocessor Performance
10000
1000
T94
C90
Linpack MFLOPS
DEC 8200
Ym p
IBM Power2/990
Xm p
100
MIPS R4400
Xm p
HP900 0/73 5
DEC Alp ha AXP
HP 90 00/7 50
IBM RS60 00/5 40
Cray 1s
10
Cray n=1000
Cray n=100
Micro n=1000
Micro n=100
MIPS M/2 000
MIPS M/1 20
1
1975
08/27/2002
Sun 4/2 60
1980
1985
CS267-Lecture 1
1990
1995
2000
21
SIA Projections for Microprocessors
1000
100
Feature Size
(microns)
10
Transistors per
chip x 10**(-6)
1
0.1
2010
2007
2004
2001
1998
0.01
1995
Feature Size
(microns) & Million
Transistors per chip
Compute power ~1/(Feature Size)3
Year of Introduction
based on F.S.Preston, 1997
08/27/2002
CS267-Lecture 1
22
But there are limiting forces: Increased
cost and difficulty of manufacturing
•
Moore’s 2nd law
(Rock’s law)
Demo of
0.06
micron
CMOS
08/27/2002
CS267-Lecture 1
23
How fast can a serial computer be?
1 Tflop/s, 1 Tbyte
sequential
machine
r = 0.3 mm
• Consider the 1 Tflop/s sequential machine:
- Data must travel some distance, r, to get from memory to CPU.
- Go get 1 data element per cycle, this means 1012 times per second
at the speed of light, c = 3x108 m/s. Thus r < c/1012 = 0.3 mm.
• Now put 1 Tbyte of storage in a 0.3 mm x 0.3 mm area:
- Each word occupies about 3 square Angstroms, or the size of a
small atom.
08/27/2002
CS267-Lecture 1
24
Microprocessor Transistors and Parallelism
Thread-Level
Parallelism?
100,000,000
Instruction-Level
Parallelism
10,000,000
R10000
1,000,000
Transistors
Pentium
Bit-Level
Parallelism
i80386
i80286
100,000
R3000
R2000
i8086
10,000
i8080
i4004
1,000
1970
1975
1980
1985
1990
1995
2000
2005
Year
08/27/2002
CS267-Lecture 1
25
“Automatic” Parallelism in Modern Machines
• Bit level parallelism: within floating point operations, etc.
• Instruction level parallelism (ILP): multiple instructions execute per
clock cycle.
• Memory system parallelism: overlap of memory operations with
computation.
• OS parallelism: multiple jobs run in parallel on commodity SMPs.
There are limitations to all of these!
Thus to achieve high performance, the programmer needs to identify,
schedule and coordinate parallel tasks and data.
08/27/2002
CS267-Lecture 1
26
The Opportunity: Dramatic Advances in Computing
Terascale Today, Petascale Tomorrow
Peak Teraflops
1,000
MICROPROCESSORS
2x increase in microprocessor
speeds every 18-24 months
(“Moore’s Law”)
100
PARALLELISM
10
More and more processors
being used on single problem
1
0.1
1996
08/27/2002
INNOVATIVE DESIGNS
Processors-in-Memory
HTMT
1998
2000
2002
2004
CS267-Lecture 1
2006
27
Technology Trends in
Parallel Computers
08/27/2002
CS267-Lecture 1
28
Nevertheless, the microprocessor revolution will
continue with little attenuation for ~10 years.
• Microprocessors have made
desktop computing in 2000
what supercomputing was in
1990.
• Massive Parallelism has
changed the “high end”
completely.
• Today clusters of Symmetric
Multiprocessors are the
standard supercomputer
architecture.
08/27/2002
CS267-Lecture 1
29
A Parallel Computer Today: NERSC-3 Vital Statistics
•
•
5 Teraflop/s Peak Performance – 3.05 Teraflop/s with Linpack
-
208 nodes, 16 CPUs per node at 1.5 Gflop/s per CPU
-
“Worst case” Sustained System Performance measure .358 Tflop/s (7.2%)
-
“Best Case” Gordon Bell submission 2.46 on 134 nodes (77%)
4.5 TB of main memory
-
•
40 TB total disk space
-
•
140 nodes with 16 GB each, 64 nodes with 32 GBs, and 4 nodes with 64 GBs.
20 TB formatted shared, global, parallel, file space; 15 TB local disk for system usage
Unique 512 way Double/Single switch configuration
08/27/2002
CS267-Lecture 1
30
TOP500 – June 2002 (see www.top500.org)
08/27/2002
CS267-Lecture 1
31
TOP500 - Performance
1 Pflop/s
220 TF/s
SUM
100 Tflop/s
10 Tflop/s
1 Tflop/s
1.17 TF/s
Intel ASCI Red
Sandia
59.7 GF/s
100 Gflop/s
Fujitsu
'NWT' NAL
10 Gflop/s
1 Gflop/s
N=1
35.8 TF/s
NEC
IBM ASCI White Earth Simulator
LLNL
134 GF/s
N=500
0.4 GF/s
My Laptop
100 Mflop/s
93 -93 -94 -94 -95 -95 -96 -96 -97 -97 -98 -98 -99 -99 -00 -00 -01 -01 -02
n v
n v
n v
n v
n v
n v
n v
n v
n v
n
Ju No Ju No Ju No Ju No Ju No Ju No Ju No Ju No Ju No Ju
08/27/2002
CS267-Lecture 1
32
Ju
nNo 9 3
vJu 93
nNo 9 4
vJu 94
nNo 9 5
vJu 95
nNo 9 6
vJu 96
nNo 9 7
vJu 97
nNo 9 8
vJu 98
nNo 9 9
v
Ju -99
nNo 0 0
vJu 00
nNo 0 1
v
Ju -01
n02
Manufacturers
500
others
400
300
100
08/27/2002
TMC
NEC
Fujitsu
Intel
CS267-Lecture 1
Hitachi
HP
Sun
IBM
200
SGI
Cray
0
33
nN 93
ov
Ju -93
n
N -94
ov
Ju -94
nN 95
ov
Ju -95
nN 96
ov
Ju -96
n
N -97
ov
Ju -97
nN 98
ov
Ju -98
nN 99
ov
Ju -99
nN 00
ov
Ju -00
n
N -01
ov
Ju -01
n02
Ju
Performance
Manufacturers
100%
90%
80%
70%
60%
50%
40%
30%
20%
10%
0%
08/27/2002
others
Hitachi
NEC
Fujitsu
CS267-Lecture 1
Sun
Intel
HP
IBM
TMC
SGI
Cray
34
nNo 93
vJu 93
nNo 94
vJu 94
nNo 95
vJu 95
nNo 96
vJu 96
nNo 97
vJu 97
nNo 98
vJu 98
nNo 99
vJu 99
nNo 00
vJu 00
nNo 01
vJu 01
n02
Ju
Processor Type
500
SIMD
Vector
400
300
200
08/27/2002
Scalar
100
0
CS267-Lecture 1
35
Ju
n
N 93
ov
Ju 93
n
N 94
ov
Ju 94
n
N 95
ov
Ju 95
n
N 96
ov
Ju 96
n
N 97
ov
Ju 97
n
N 98
ov
Ju 98
n
N 99
ov
Ju 99
n
N 00
ov
Ju 00
n
N 01
ov
Ju 01
n
02
Chip Technology
500
proprietary
400
08/27/2002
other COTS
intel
Sparc
300
HP
MIPS
200
100
Power
Alpha
0
CS267-Lecture 1
36
Architectures
500
SIMD
Cluster - NOW
CM2
Cluster of
Sun HPC
Paragon
400
Constellation
T3D
CM5
MPP
300
SP2
200
T3E
ASCI Red
Y-MP C90
SX3
100
SMP
Sun HPC
VP500
Ju
n9
No 3
v9
Ju 3
n9
No 4
v9
Ju 4
n9
No 5
v9
Ju 5
n9
No 6
v9
Ju 6
n9
No 7
v9
Ju 7
n9
No 8
v9
Ju 8
n9
No 9
v9
Ju 9
n0
No 0
v0
Ju 0
n0
No 1
v0
Ju 1
n02
0
Single
Processor
08/27/2002
CS267-Lecture 1
37
NOW - Cluster
80
AMD
70
Intel
IBM Netfinity
60
Alpha
HP Alpha Server
50
40
Sparc
30
20
10
08/27/2002
CS267-Lecture 1
02
Ju
n
01
N
ov
01
Ju
n
00
N
ov
00
Ju
n
99
N
ov
99
Ju
n
98
N
ov
98
Ju
n
ov
N
Ju
n
97
97
0
38
Why do we have only commodity components?
Dead Supercomputer Society
•
ACRI
• Goodyear Aerospace MPP
•
Alliant
• Gould NPL
•
American Supercomputer
•
Ametek
•
Applied Dynamics
•
Astronautics
• Key Computer Laboratories
•
BBN
• MasPar
•
CDC
• Meiko
•
Convex
• Multiflow
•
Cray Computer
• Myrias
•
Cray Research
•
Culler-Harris
•
Culler Scientific
•
Cydrome
• Scientific Computer Systems (SCS)
•
Dana/Ardent/Stellar/Stardent
• Soviet Supercomputers
• Guiltech
• Intel Scientific Computers
• International Parallel Machines
• Kendall Square Research
• Numerix
• Prisma
• Thinking Machines
• Saxpy
Warm Up
Homework
Assignment
08/27/2002
CS267-Lecture 1
41
The Parallel Computing Challenge:
improving real performance of scientific applications
Peak Performance is skyrocketing

In 1990’s, peak performance increased 100x; in
2000’s, it will increase 1000x
1,000
But ...
Efficiency declined from 40-50% on the vector
supercomputers of 1990s to as little as 5-10% on
parallel supercomputers of today
Close the gap through ...



Mathematical methods and algorithms that
achieve high performance on a single processor
and scale to thousands of processors
More efficient programming models for massively
parallel supercomputers
Parallel Tools
08/27/2002
CS267-Lecture 1
Peak Performance
100
Teraflops

Performance
Gap
10
1
Real Performance
0.1
1996
2000
2004
42
Performance Levels
• Peak advertised performance (PAP)
- You can’t possibly compute faster than this speed
• LINPACK (TPP)
- The “hello world” program for parallel computing
• Gordon Bell Prize winning applications performance
- The right application/algorithm/platform combination plus years of work
• Average sustained applications performance
- What one reasonable can expect for standard applications
When reporting performance results, these levels are
often confused, even in reviewed publications
08/27/2002
CS267-Lecture 1
43
Performance Levels (for example on NERSC-3)
• Peak advertised performance (PAP): 5 Tflop/s
• LINPACK (TPP): 3.05 Tflop/s
• Gordon Bell Prize winning applications performance :
2.46 Tflop/s
- Material Science application at SC01
• Average sustained applications performance: ~0.4
Tflop/s
- Less than 10% peak!
08/27/2002
CS267-Lecture 1
44
First Assignment
• See home page for details.
• Find an application of parallel computing and build a
web page describing it.
- Choose something from your research area.
- Or from the web or elsewhere.
• Create a web page describing the application.
- Describe the application and provide a reference (or link)
- Describe the platform where this application was run
- Find peak and LINPACK performance for the platform and its rank on
the TOP500 list
- Find performance of your selected application
- What ratio of sustained to peak performance is reported?
- Evaluate project: How did the application scale? What were the major
difficulties in obtaining good performance? What tools and algorithms
were used?
• Send us (Horst and David) the link and add the webpage
to your portfolio
•08/27/2002
Due next week, Thursday
(9/5). 1
CS267-Lecture
45
Course
Organization
08/27/2002
CS267-Lecture 1
46
Schedule of Topics
• Introduction
• Parallel Programming Models and Machines
- Shared Memory and Multithreading
- Distributed Memory and Message Passing
- Data parallelism
• Sources of Parallelism in Simulation
• Tools
-
Languages (UPC)
Performance Tools
Visualization
Environments
• Algorithms
-
Dense Linear Algebra
Partial Differential Equations (PDEs)
Particle methods
Load balancing, synchronization techniques
Sparse matrices
• Applications: biology, climate, combustion, astrophysics
• Project Reports
08/27/2002
CS267-Lecture 1
47
Reading Materials
• Some on-line texts:
- Demmel’s notes from CS267 Spring 1999, which are similar to 2000
and 2001. However, they contain links to html notes from 1996.
- http://www.cs.berkeley.edu/~demmel/cs267_Spr99/
- Yelick’s notes from Fall 2001
- http://www.cs.berkeley.edu/~dbindel/cs267ta/
- Ian Foster’s book, “Designing and Building Parallel Programming”.
- http://www-unix.mcs.anl.gov/dbpp/
• Recommended text:
- “Sourcebook for Parallel Computing”, by Dongarra, Foster, Fox, ..
- Available in bookstores in November 2002; now available as a
reader or on CD;
• Potentially Useful
- “Performance Optimization of Numerically Intensive Codes” by Stefan
Goedecker and Adolfy Hoisie
- This is a practical guide to optimization, mostly for those of you
who have never done any optimization
08/27/2002
CS267-Lecture 1
48
Other Topics or Interest
• Field Trips
- NERSC Visualization lab, Thursday, October 3 confirmed
- Silicon Valley/Computer History Museum, Tuesday, November 26 ?
• Projects
- MATLAB anyone? There is a parallel MATLAB available on seaborg
- Student Volunteer at SC2002 in Baltimore, November 16 – 22, 2002
- http://hpc.ncsa.uiuc.edu:8080/sc2002/svol_registration.html for the
student volunteer program
- http://www.sc2002.org for the conference
• Also of interest:
- ACTS Parallel Tools Workshop for Students in Berkeley, Sept. 4 – 7,
2002 see http://acts.nersc.gov/workshop ; send e-mail to Osni
Marques at [email protected] to register; about five spots available
for CS267
08/27/2002
CS267-Lecture 1
49
Requirements
• Fill out on-line account request for Millennium machine.
- See course web page for pointer
• Fill out request for NERSC account
- Form available in class
• Fill out survey
- e-mail to David if you missed this lecture
• Build a portfolio
- Every week or two students will report explorations, ideas, proposed
work, and work to the TA via an organized webpage, document or
notebook.
- There will be about four programming assignments geared towards
hands-on experience, interdisciplinary teams.
- There will be a Final Project
- Teams of 2-3, interdisciplinary is best.
- Interesting applications or advance of systems.
- Presentation (poster session)
08/27/2002-
CS267-Lecture 1
Conference quality paper
50
What you should get out of the course
In depth understanding of:
• When is parallel computing useful?
• Understanding of parallel computing hardware options.
• Overview of programming models (software) and tools.
• Some important parallel applications and the algorithms
• Performance analysis and tuning
08/27/2002
CS267-Lecture 1
51
Administrative Information
• Instructors:
- Horst D. Simon, 329 Soda, [email protected], (510) 486-7377
- TA: David Garmire, 566 Soda, [email protected], (510) 643
6763
• Accounts – fill out online registration for Millenium; fill
out form for NERSC accounts on seaborg
• Class survey – fill out today
• Lecture notes are based on previous semester notes:
- Jim Demmel, David Culler, David Bailey, Bob Lucas, Kathy Yelick
and myself
• Reader based on “Sourcebook for Parallel Computing”;
hardcopy or CD option
• Discussion section: Wed. 1:30 – 2:30 in 405 Soda; not
every week
• Most class material and lecture notes are at:
- http://www.cs.berkeley.edu/~strive/cs267
08/27/2002
CS267-Lecture 1
52