1 / 90

Jim Demmel EECS & Math Departments demmel@cs.berkeley

CS267/E233 Applications of Parallel Computers www.cs.berkeley.edu/~demmel/cs267_Spr09 Lecture 1: Introduction. Jim Demmel EECS & Math Departments demmel@cs.berkeley.edu. Outline. Why powerful computers must be parallel processors Large CSE problems require powerful computers

brickhouse
Download Presentation

Jim Demmel EECS & Math Departments demmel@cs.berkeley

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS267/E233Applications of Parallel Computerswww.cs.berkeley.edu/~demmel/cs267_Spr09Lecture 1: Introduction Jim Demmel EECS & Math Departments demmel@cs.berkeley.edu

  2. Outline • Why powerful computers must be parallel processors • Large CSE problems require powerful computers • Why writing (fast) parallel programs is hard • Principles of parallel computing performance • Structure of the course all Including your laptops and handhelds Commercial problems too But things are improving

  3. Units of Measure • High Performance Computing (HPC) units are: • Flop: floating point operation • Flops/s: floating point operations per second • Bytes: size of data (a double precision floating point number is 8) • Typical sizes are millions, billions, trillions… Mega Mflop/s = 106 flop/sec Mbyte = 220 = 1048576 ~ 106 bytes Giga Gflop/s = 109 flop/sec Gbyte = 230 ~ 109 bytes Tera Tflop/s = 1012 flop/sec Tbyte = 240 ~ 1012 bytes Peta Pflop/s = 1015 flop/sec Pbyte = 250 ~ 1015 bytes Exa Eflop/s = 1018 flop/sec Ebyte = 260 ~ 1018 bytes Zetta Zflop/s = 1021 flop/sec Zbyte = 270 ~ 1021 bytes Yotta Yflop/s = 1024 flop/sec Ybyte = 280 ~ 1024 bytes • Current fastest (public) machine ~ 1.5 Pflop/s • Up-to-date list at www.top500.org

  4. all (2007) Why powerful computers are parallel circa 1991-2006

  5. Tunnel Vision by Experts • “I think there is a world market for maybe five computers.” • Thomas Watson, chairman of IBM, 1943. • “There is no reason for any individual to have a computer in their home” • Ken Olson, president and founder of Digital Equipment Corporation, 1977. • “640K [of memory] ought to be enough for anybody.” • Bill Gates, chairman of Microsoft,1981. • “On several recent occasions, I have been asked whether parallel computing will soon be relegated to the trash heap reserved for promising technologies that never quite make it.” • Ken Kennedy, CRPC Directory, 1994 Slide source: Warfield et al.

  6. Technology Trends: Microprocessor Capacity Moore’s Law 2X transistors/Chip Every 1.5 years Called “Moore’s Law” Gordon Moore (co-founder of Intel) predicted in 1965 that the transistor density of semiconductor chips would double roughly every 18 months. Microprocessors have become smaller, denser, and more powerful. Slide source: Jack Dongarra

  7. Microprocessor Transistors per Chip • Growth in transistors per chip • Increase in clock rate

  8. Impact of Device Shrinkage • What happens when the feature size (transistor size) shrinks by a factor of x ? • Clock rate goes up by x because wires are shorter • 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 ! • typicallyx3 is devoted to either on-chip • parallelism: hidden parallelism such as ILP • locality: caches • So most programs x3 times faster, without changing them

  9. Manufacturing costs and yield problems limit use of density But there are limiting forces Demo of 0.06 micron CMOS Moore’s 2nd law (Rock’s law): costs go up Source: Forbes Magazine • Yield • What percentage of the chips are usable? • E.g., Cell processor (PS3) is sold with 7 out of 8 “on” to improve yield

  10. Power Density Limits Serial Performance

  11. Revolution is Happening Now • Chip density is continuing increase ~2x every 2 years • Clock speed is not • Number of processor cores may double instead • There is little or no more hidden parallelism (ILP) to be found • Parallelism must be exposed to and managed by software Source: Intel, Microsoft (Sutter) and Stanford (Olukotun, Hammond)

  12. Parallelism in 2009? • These arguments are no longer theoretical • All major processor vendors are producing multicore chips • Every machine will soon be a parallel machine • To keep doubling performance, parallelism must double • Which commercial applications can use this parallelism? • Do they have to be rewritten from scratch? • Will all programmers have to be parallel programmers? • New software model needed • Try to hide complexity from most programmers – eventually • In the meantime, need to understand it • Computer industry betting on this big change, but does not have all the answers • Berkeley ParLab established to work on this

  13. More Limits: How fast can a serial computer be? • Consider the 1 Tflop/s sequential machine: • Data must travel some distance, r, to get from memory to processor. • To 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 bit occupies about 1 square Angstrom, or the size of a small atom. • No choice but parallelism 1 Tflop/s, 1 Tbyte sequential machine r = 0.3 mm

  14. More Exotic Solutions on the Horizon • GPUs - Graphics Processing Units (eg NVidia) • Parallel processor attached to main processor • Originally special purpose, getting more general • FPGAs – Field Programmable Gate Arrays • Inefficient use of chip area • More efficient than multicore now, maybe not later • Wire routing heuristics still troublesome • Dataflow and tiled processor architectures • Have considerable experience with dataflow from 1980’s • Are we ready to return to functional programming languages? • Cell • Software controlled memory uses bandwidth efficiently • Programming model not yet mature

  15. Outline • Why powerful computers must be parallel processors • Large CSE problems require powerful computers • Why writing (fast) parallel programs is hard • Principles of parallel computing performance • Structure of the course all Including your laptops and handhelds Commercial problems too But things are improving

  16. Performance Development See www.top500.org for latest data

  17. Computational Science- Recent News “An important development in sciences is occurring at the intersection of computer science and the sciences that has the potential to have a profound impact on science. It is a leap from the application of computing … to the integration of computer science concepts, tools, and theorems into the very fabric of science.” -Science 2020 Report, March 2006 Nature, March 23, 2006

  18. Drivers for Change • Continued exponential increase in computational power simulation is becoming third pillar of science, complementing theory and experiment • Continued exponential increase in experimental data techniques and technology in data analysis, visualization, analytics, networking, and collaboration tools are becoming essential in all data rich scientific applications

  19. Theory Experiment Simulation Simulation: The Third Pillar of Science • Traditional scientific and engineering method: (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 and engineering paradigm: (3) Use high performance computer systems to simulate and analyze the phenomenon • Based on known physical laws and efficient numerical methods • Analyze simulation results with computational tools and methods beyond what is used traditionally for experimental data analysis

  20. Computational Science and Engineering (CSE) • CSE is a widely accepted label for an evolving field concerned with the science of and the engineering of systems and methodologies to solve computational problems arising throughout science and engineering • CSE is characterized by • Multi - disciplinary • Multi - institutional • Requiring high-end resources • Large teams • Focus on community software • CSE is not “just programming” (and not CS) • Fast computers necessary but not sufficient • New graduate program in CSE at UC Berkeley (more later) Reference: Petzold, L., et al., Graduate Education in CSE, SIAM Rev., 43(2001), 163-177

  21. SciDAC - First Federal Program to Implement CSE • SciDAC (Scientific Discovery • through Advanced Computing) • program created in 2001 • About $50M annual funding • Berkeley (LBNL+UCB) largest recipient of SciDAC funding Global Climate Nanoscience Biology Combustion Astrophysics

  22. Some Particularly Challenging Computations • Science • Global climate modeling • Biology: genomics; protein folding; drug design • Astrophysical modeling • Computational Chemistry • Computational Material Sciences and Nanosciences • Engineering • Semiconductor design • Earthquake and structural modeling • Computation fluid dynamics (airplane design) • Combustion (engine design) • Crash simulation • Business • Financial and economic modeling • Transaction processing, web services and search engines • Defense • Nuclear weapons -- test by simulations • Cryptography

  23. 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 (note: old data …) • Savings: approx. $15 billion per year for U.S. home mortgages.

  24. $5B World Market in Technical Computing Source: IDC 2004, from NRC Future of Supercomputing Report

  25. What Supercomputers Do Introducing Computational Science and Engineering Two Examples • simulation replacing experiment that is too dangerous • analyzing massive amounts of data with new tools

  26. Global Climate Modeling Problem • Problem is to compute: f(latitude, longitude, elevation, time)  “weather” = (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+dt given t • Uses: • Predict major events, e.g., El Nino • Use in setting air emissions standards • Evaluate global warming scenarios Source: http://www.epm.ornl.gov/chammp/chammp.html

  27. Global Climate Modeling Computation • One piece is modeling the fluid flow in the atmosphere • Solve Navier-Stokes equations • Roughly 100 Flops per grid point with 1 minute timestep • Computational requirements: • To match real-time, need 5 x 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 8x to 16x • State of the art models require integration of atmosphere, clouds, ocean, sea-ice, land models, plus possibly carbon cycle, geochemistry and more • Current models are coarser than this

  28. High Resolution Climate Modeling on NERSC-3 – P. Duffy, et al., LLNL

  29. U.S.A. Hurricane Source: M.Wehner, LBNL

  30. NERSC User George Smoot wins 2006 Nobel Prize in Physics Smoot and Mather 1992 COBE Experiment showed anisotropy of CMB Cosmic Microwave Background Radiation (CMB): an image of the universe at 400,000 years

  31. The Current CMB Map source J. Borrill, LBNL • Unique imprint of primordial physics through the tiny anisotropies in temperature and polarization. • Extracting these Kelvin fluctuations from inherently noisy data is a serious computational challenge.

  32. Evolution Of CMB Data Sets: Cost > O(Np^3 )

  33. Which commercial applications require parallelism? Analyzed in detail in “Berkeley View” report www.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-183.html • Claim: parallel architecture, language, compiler … must do at least these well to run future parallel apps well • Note: MapReduce is embarrassinglyparallel; FSM embarrassingly sequential?

  34. Which commercial applications require parallelism? ParLab Applications

  35. Compelling Laptop/Handheld Apps(David Wessel) • Musicians have an insatiable appetite for computation + real-time demands • More channels, instruments, more processing, more interaction! • Latency must be low (5 ms) • Must be reliable (No clicks) • Music Enhancer • Enhanced sound delivery systems for home sound systems using large microphone and speaker arrays • Laptop/Handheld recreate 3D sound over ear buds • Hearing Augmenter • Laptop/Handheld as accelerator for hearing aide • Novel Instrument User Interface • New composition and performance systems beyond keyboards • Input device for Laptop/Handheld Berkeley Center for New Music and Audio Technology (CNMAT) created a compact loudspeaker array: 10-inch-diameter icosahedron incorporating 120 tweeters.

  36. Coronary Artery Disease (Tony Keaveny) After Before • Modeling to help patient compliance? • 450k deaths/year, 16M symptomatic, 72M High BP • Massively parallel, Real-time variations • CFD FEsolid (non-linear), fluid (Newtonian), pulsatile • Blood pressure, activity, habitus, cholesterol

  37. Content-Based Image Retrieval(Kurt Keutzer) • Built around Key Characteristics of personal databases • Very large number of pictures (>5K) • Non-labeled images • Many pictures of few people • Complex pictures including people, events, places, and objects Relevance Feedback Query by example Similarity Metric Candidate Results Final Result Image Database 1000’s of images

  38. Compelling Laptop/Handheld Apps(Nelson Morgan) • Meeting Diarist • Laptops/ Handhelds at meeting coordinate to create speaker identified, partially transcribed text diary of meeting • Teleconference speaker identifier, speech helper • L/Hs used for teleconference, identifies who is speaking, “closed caption” hint of what being said

  39. What do commercial and CSE applications have in common? Motif/Dwarf: Common Computational Methods (Red Hot Blue Cool)

  40. Outline • Why powerful computers must be parallel processors • Large CSE problems require powerful computers • Why writing (fast) parallel programs is hard • Principles of parallel computing performance • Structure of the course all Including your laptops and handhelds Commercial problems too But things are improving

  41. Principles of Parallel Computing • Finding enough parallelism (Amdahl’s Law) • Granularity • Locality • Load balance • Coordination and synchronization • Performance modeling All of these things makes parallel programming even harder than sequential programming.

  42. “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 Limits to all of these -- for very high performance, need user to identify, schedule and coordinate parallel tasks

  43. Finding Enough Parallelism • Suppose only part of an application seems parallel • Amdahl’s law • let s be the fraction of work done sequentially, so (1-s) is fraction parallelizable • P = number of processors Speedup(P) = Time(1)/Time(P) <= 1/(s + (1-s)/P) <= 1/s • Even if the parallel part speeds up perfectly performance is limited by the sequential part • Top500 list: currently fastest machine has P~130K

  44. Overhead of Parallelism • Given enough parallel work, this is the biggest barrier to getting desired speedup • Parallelism overheads include: • cost of starting a thread or process • cost of communicating shared data • cost of synchronizing • extra (redundant) computation • Each of these can be in the range of milliseconds (=millions of flops) on some systems • Tradeoff: Algorithm needs sufficiently large units of work to run fast in parallel (i.e. large granularity), but not so large that there is not enough parallel work

  45. Locality and Parallelism Conventional Storage Hierarchy • Large memories are slow, fast memories are small • Storage hierarchies are large and fast on average • Parallel processors, collectively, have large, fast cache • the slow accesses to “remote” data we call “communication” • Algorithm should do most work on local data Proc Proc Proc Cache Cache Cache L2 Cache L2 Cache L2 Cache L3 Cache L3 Cache L3 Cache potential interconnects Memory Memory Memory

  46. Processor-DRAM Gap (latency) Goal: find algorithms that minimize communication, not necessarily arithmetic µProc 60%/yr. 1000 CPU “Moore’s Law” 100 Processor-Memory Performance Gap:(grows 50% / year) Performance 10 DRAM 7%/yr. DRAM 1 1989 1980 1981 1982 1983 1984 1985 1986 1987 1988 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 Time

  47. Load Imbalance • Load imbalance is the time that some processors in the system are idle due to • insufficient parallelism (during that phase) • unequal size tasks • Examples of the latter • adapting to “interesting parts of a domain” • tree-structured computations • fundamentally unstructured problems • Algorithm needs to balance load • Sometimes can determine work load, divide up evenly, before starting • “Static Load Balancing” • Sometimes work load changes dynamically, need to rebalance dynamically • “Dynamic Load Balancing”

  48. Parallel Software Eventually – ParLab view • 2 types of programmers  2 layers • Efficiency Layer (10% of today’s programmers) • Expert programmers build Libraries implementing motifs, “Frameworks”, OS, …. • Highest fraction of peak performance possible • Productivity Layer (90% of today’s programmers) • Domain experts / Naïve programmers productively build parallel applications by composing frameworks & libraries • Hide as many details of machine, parallelism as possible • Willing to sacrifice some performance for productive programming • Expect students may want to work at either level • In the meantime, we all need to understand enough of the efficiency layer to use parallelism effectively

  49. Outline • Why powerful computers must be parallel processors • Large CSE problems require powerful computers • Why writing (fast) parallel programs is hard • Principles of parallel computing performance • Structure of the course all Including your laptops and handhelds Commercial problems too But things are improving

  50. Improving Real Performance Peak Performance grows exponentially, a la Moore’s Law • In 1990’s, peak performance increased 100x; in 2000’s, it will increase 1000x But efficiency (the performance relative to the hardware peak) has declined • was 40-50% on the vector supercomputers of 1990s • now 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 and tools for massively parallel supercomputers 1,000 Peak Performance 100 Performance Gap Teraflops 10 1 Real Performance 0.1 1996 2000 2004

More Related