01/28/2011 CS267 Lecture 31 CS 267: Introduction to Parallel Machines and Programming Models Lecture 3 James Demmel www.cs.berkeley.edu/~demmel/cs267_Spr15/

Slides:



Advertisements
Similar presentations
Multiple Processor Systems
Advertisements

1 Uniform memory access (UMA) Each processor has uniform access time to memory - also known as symmetric multiprocessors (SMPs) (example: SUN ES1000) Non-uniform.
Vectors, SIMD Extensions and GPUs COMP 4611 Tutorial 11 Nov. 26,
Multiprocessors— Large vs. Small Scale Multiprocessors— Large vs. Small Scale.
Lecture 6: Multicore Systems
1 Computational models of the physical world Cortical bone Trabecular bone.
GPU System Architecture Alan Gray EPCC The University of Edinburgh.
Types of Parallel Computers
CSCI 8150 Advanced Computer Architecture Hwang, Chapter 1 Parallel Computer Models 1.2 Multiprocessors and Multicomputers.
Reference: Message Passing Fundamentals.
01/25/2007CS267 Lecture 41 CS 267: Introduction to Parallel Machines and Programming Models Kathy Yelick
Tuesday, September 12, 2006 Nothing is impossible for people who don't have to do it themselves. - Weiler.
Parallel Computing Overview CS 524 – High-Performance Computing.
CS 240A: Models of parallel programming: Machines, languages, and complexity measures.
1 Introduction to Parallel Architectures and Programming Models.
1 Lecture 1: Parallel Architecture Intro Course organization:  ~5 lectures based on Culler-Singh textbook  ~5 lectures based on Larus-Rajwar textbook.
Chapter Hardwired vs Microprogrammed Control Multithreading
01/26/2005CS267 Lecture 31 CS 267: Introduction to Parallel Machines and Programming Models James Demmel
Chapter 17 Parallel Processing.
01/24/2006CS267 Lecture 31 CS 267: Introduction to Parallel Machines and Programming Models James Demmel
Arquitectura de Sistemas Paralelos e Distribuídos Paulo Marques Dep. Eng. Informática – Universidade de Coimbra Ago/ Machine.
High Performance Parallel Programming Dirk van der Knijff Advanced Research Computing Information Division.
2/4/200408/29/2002CS267 Lecure 51 CS 267: Introduction to Parallel Machines and Programming Models Katherine Yelick
1 Computer Science, University of Warwick Architecture Classifications A taxonomy of parallel architectures: in 1972, Flynn categorised HPC architectures.
1b.1 Types of Parallel Computers Two principal approaches: Shared memory multiprocessor Distributed memory multicomputer ITCS 4/5145 Parallel Programming,
Introduction to Symmetric Multiprocessors Süha TUNA Bilişim Enstitüsü UHeM Yaz Çalıştayı
Parallel Architectures
GPU Programming with CUDA – Accelerated Architectures Mike Griffiths
Computer System Architectures Computer System Software
Parallel Programming Models Jihad El-Sana These slides are based on the book: Introduction to Parallel Computing, Blaise Barney, Lawrence Livermore National.
Multiple Processor Systems. Multiprocessor Systems Continuous need for faster and powerful computers –shared memory model ( access nsec) –message passing.
1b.1 Types of Parallel Computers Two principal approaches: Shared memory multiprocessor Distributed memory multicomputer ITCS 4/5145 Parallel Programming,
Multi-core architectures. Single-core computer Single-core CPU chip.
Multi-Core Architectures
August 15, 2001Systems Architecture II1 Systems Architecture II (CS ) Lecture 12: Multiprocessors: Non-Uniform Memory Access * Jeremy R. Johnson.
Edgar Gabriel Short Course: Advanced programming with MPI Edgar Gabriel Spring 2007.
Introduction, background, jargon Jakub Yaghob. Literature T.G.Mattson, B.A.Sanders, B.L.Massingill: Patterns for Parallel Programming, Addison- Wesley,
Chapter 2 Parallel Architecture. Moore’s Law The number of transistors on a chip doubles every years. – Has been valid for over 40 years – Can’t.
Loosely Coupled Parallelism: Clusters. Context We have studied older archictures for loosely coupled parallelism, such as mesh’s, hypercubes etc, which.
Processes and Threads Processes have two characteristics: – Resource ownership - process includes a virtual address space to hold the process image – Scheduling/execution.
Case Study in Computational Science & Engineering - Lecture 2 1 Parallel Architecture Models Shared Memory –Dual/Quad Pentium, Cray T90, IBM Power3 Node.
Spring 2003CSE P5481 Issues in Multiprocessors Which programming model for interprocessor communication shared memory regular loads & stores message passing.
Copyright © 2011 Curt Hill MIMD Multiple Instructions Multiple Data.
Computing Environment The computing environment rapidly evolving ‑ you need to know not only the methods, but also How and when to apply them, Which computers.
1 Qualifying ExamWei Chen Unified Parallel C (UPC) and the Berkeley UPC Compiler Wei Chen the Berkeley UPC Group 3/11/07.
Processor Architecture
CS- 492 : Distributed system & Parallel Processing Lecture 7: Sun: 15/5/1435 Foundations of designing parallel algorithms and shared memory models Lecturer/
1 Lecture 1: Computer System Structures We go over the aspects of computer architecture relevant to OS design  overview  input and output (I/O) organization.
Outline Why this subject? What is High Performance Computing?
3/12/2013Computer Engg, IIT(BHU)1 PARALLEL COMPUTERS- 2.
3/12/2013Computer Engg, IIT(BHU)1 INTRODUCTION-2.
08/28/2012CS4230 CS4230 Parallel Programming Lecture 3: Introduction to Parallel Architectures Mary Hall August 28,
CDA-5155 Computer Architecture Principles Fall 2000 Multiprocessor Architectures.
Background Computer System Architectures Computer System Software.
Introduction Goal: connecting multiple computers to get higher performance – Multiprocessors – Scalability, availability, power efficiency Job-level (process-level)
Constructing a system with multiple computers or processors 1 ITCS 4/5145 Parallel Programming, UNC-Charlotte, B. Wilkinson. Jan 13, 2016.
01/28/2011CS267 Lecture 31 Parallel Machines and Programming Models Lecture 3 Based on James Demmel and Kathy Yelick
CPE 779 Parallel Computing - Spring Creating and Using Threads Based on Slides by Katherine Yelick
These slides are based on the book:
Introduction to Parallel Computing: MPI, OpenMP and Hybrid Programming
CS5102 High Performance Computer Systems Thread-Level Parallelism
Parallel Computers Definition: “A parallel computer is a collection of processing elements that cooperate and communicate to solve large problems fast.”
James Demmel CS 267: Introduction to Parallel Machines and Programming Models Lecture 3 James Demmel
Constructing a system with multiple computers or processors
James Demmel and Kathy Yelick
James Demmel CS 267: Introduction to Parallel Machines and Programming Models Lecture 3 Started at minute 53.
Parallel Processing Architectures
Constructing a system with multiple computers or processors
Constructing a system with multiple computers or processors
Constructing a system with multiple computers or processors
Presentation transcript:

01/28/2011 CS267 Lecture 31 CS 267: Introduction to Parallel Machines and Programming Models Lecture 3 James Demmel

01/27/2015 CS267 Lecture 32 Outline Overview of parallel machines (~hardware) and programming models (~software) Shared memory Shared address space Message passing Data parallel Clusters of SMPs or GPUs Grid Note: Parallel machine may or may not be tightly coupled to programming model Historically, tight coupling Today, portability is important

01/27/2015 CS267 Lecture 33 A generic parallel architecture Proc Interconnection Network Where is the memory physically located? Is it connected directly to processors? What is the connectivity of the network? Memory Proc Memory

01/27/2015 CS267 Lecture 34 Parallel Programming Models Programming model is made up of the languages and libraries that create an abstract view of the machine Control How is parallelism created? What orderings exist between operations? Data What data is private vs. shared? How is logically shared data accessed or communicated? Synchronization What operations can be used to coordinate parallelism? What are the atomic (indivisible) operations? Cost How do we account for the cost of each of the above?

01/27/2015 CS267 Lecture 35 Simple Example Consider applying a function f to the elements of an array A and then computing its sum: Questions: Where does A live? All in single memory? Partitioned? What work will be done by each processors? They need to coordinate to get a single result, how? A: fA: f sum A = array of all data fA = f(A) s = sum(fA) s:

01/27/2015 CS267 Lecture 36 Programming Model 1: Shared Memory Program is a collection of threads of control. Can be created dynamically, mid-execution, in some languages Each thread has a set of private variables, e.g., local stack variables Also a set of shared variables, e.g., static variables, shared common blocks, or global heap. Threads communicate implicitly by writing and reading shared variables. Threads coordinate by synchronizing on shared variables PnP1 P0 s s =... y =..s... Shared memory i: 2i: 5 Private memory i: 8

01/27/2015 CS267 Lecture 37 Simple Example Shared memory strategy: small number p << n=size(A) processors attached to single memory Parallel Decomposition: Each evaluation and each partial sum is a task. Assign n/p numbers to each of p procs Each computes independent “private” results and partial sum. Collect the p partial sums and compute a global sum. Two Classes of Data: Logically Shared The original n numbers, the global sum. Logically Private The individual function evaluations. What about the individual partial sums?

01/27/2015 CS267 Lecture 38 Shared Memory “Code” for Computing a Sum Thread 1 for i = 0, n/2-1 s = s + f(A[i]) Thread 2 for i = n/2, n-1 s = s + f(A[i]) static int s = 0; What is the problem with this program? A race condition or data race occurs when: -Two processors (or two threads) access the same variable, and at least one does a write. -The accesses are concurrent (not synchronized) so they could happen simultaneously fork(sum,a[0:n/2-1]); sum(a[n/2,n-1]);

01/27/2015 CS267 Lecture 39 Shared Memory “Code” for Computing a Sum Thread 1 …. compute f([A[i]) and put in reg0 reg1 = s reg1 = reg1 + reg0 s = reg1 … Thread 2 … compute f([A[i]) and put in reg0 reg1 = s reg1 = reg1 + reg0 s = reg1 … static int s = 0; Assume A = [3,5], f(x) = x 2, and s=0 initially For this program to work, s should be = 34 at the end but it may be 34,9, or 25 The atomic operations are reads and writes Never see ½ of one number, but += operation is not atomic All computations happen in (private) registers A= f (x) = x 2

01/27/2015 CS267 Lecture 310 Improved Code for Computing a Sum Thread 1 local_s1= 0 for i = 0, n/2-1 local_s1 = local_s1 + f(A[i]) s = s + local_s1 Thread 2 local_s2 = 0 for i = n/2, n-1 local_s2= local_s2 + f(A[i]) s = s +local_s2 static int s = 0; Since addition is associative, it’s OK to rearrange order Most computation is on private variables -Sharing frequency is also reduced, which might improve speed -But there is still a race condition on the update of shared s -The race condition can be fixed by adding locks (only one thread can hold a lock at a time; others wait for it) static lock lk; lock(lk); unlock(lk); lock(lk); unlock(lk); Why not do lock Inside loop?

01/27/2015 Review so far and plan for Lecture 3 Programming Models Machine Models CS267 Lecture Shared Memory1a. Shared Memory 1b. Multithreaded Procs. 1c. Distributed Shared Mem. 2.Message Passing 2a. Global Address Space 2a. Distributed Memory 2b. Internet & Grid Computing 2c. Global Address Space 3. Data Parallel 3a. SIMD 3b. Vector 4. Hybrid What about GPU? What about Cloud?

01/27/2015 CS267 Lecture 312 Machine Model 1a: Shared Memory P1 bus $ memory Processors all connected to a large shared memory. Typically called Symmetric Multiprocessors (SMPs) SGI, Sun, HP, Intel, IBM SMPs Multicore chips, except that all caches are shared Advantage: uniform memory access (UMA) Cost: much cheaper to access data in cache than main memory Difficulty scaling to large numbers of processors <= 32 processors typical P2 $ Pn $ Note: $ = cache shared $

01/27/2015 CS267 Lecture 313 Problems Scaling Shared Memory Hardware Why not put more processors on (with larger memory?) The memory bus becomes a bottleneck Caches need to be kept coherent Example from a Parallel Spectral Transform Shallow Water Model (PSTSWM) demonstrates the problem Experimental results (and slide) from Pat Worley at ORNL This is an important kernel in atmospheric models 99% of the floating point operations are multiplies or adds, which generally run well on all processors But it does sweeps through memory with little reuse of operands, so uses bus and shared memory frequently These experiments show performance per processor, with one “copy” of the code running independently on varying numbers of procs The best case for shared memory: no sharing But the data doesn’t all fit in the registers/cache

01/27/2015 CS267 Lecture 314 From Pat Worley, ORNL Example: Problem in Scaling Shared Memory Performance degradation is a “smooth” function of the number of processes. No shared data between them, so there should be perfect parallelism. (Code was run for a 18 vertical levels with a range of horizontal sizes.)

01/27/2015 CS267 Lecture 315 Machine Model 1b: Multithreaded Processor Multiple thread “contexts” without full processors Memory and some other state is shared Sun Niagra processor (for servers) Up to 64 threads all running simultaneously (8 threads x 8 cores) In addition to sharing memory, they share floating point units Why? Switch between threads for long-latency memory operations Cray MTA and Eldorado processors (for HPC) Memory shared $, shared floating point units, etc. T0 T1Tn

01/27/2015 CS267 Lecture 316 Eldorado Processor (logical view) Source: John Feo, Cray

01/27/2015 CS267 Lecture 317 Machine Model 1c: Distributed Shared Memory Memory is logically shared, but physically distributed Any processor can access any address in memory Cache lines (or pages) are passed around machine SGI is canonical example (+ research machines) Scales to 512 (SGI Altix (Columbia) at NASA/Ames) Limitation is cache coherency protocols – how to keep cached copies of the same address consistent P1 network $ memory P2 $ Pn $ memory Cache lines (pages) must be large to amortize overhead  locality still critical to performance

01/27/2015 Review so far and plan for Lecture 3 Programming Models Machine Models CS267 Lecture Shared Memory1a. Shared Memory 1b. Multithreaded Procs. 1c. Distributed Shared Mem. 2.Message Passing 2a. Global Address Space 2a. Distributed Memory 2b. Internet & Grid Computing 2c. Global Address Space 3. Data Parallel 3a. SIMD 3b. Vector 4. Hybrid What about GPU? What about Cloud?

01/27/2015 Review so far and plan for Lecture 3 Programming Models Machine Models CS267 Lecture Shared Memory1a. Shared Memory 1b. Multithreaded Procs. 1c. Distributed Shared Mem. 2.Message Passing 2a. Global Address Space 2a. Distributed Memory 2b. Internet & Grid Computing 2c. Global Address Space 3. Data Parallel 3a. SIMD 3b. Vector 4. Hybrid What about GPU? What about Cloud?

01/27/2015 CS267 Lecture 320 Programming Model 2: Message Passing Program consists of a collection of named processes. Usually fixed at program startup time Thread of control plus local address space -- NO shared data. Logically shared data is partitioned over local processes. Processes communicate by explicit send/receive pairs Coordination is implicit in every communication event. MPI (Message Passing Interface) is the most commonly used SW PnP1 P0 y =..s... s: 12 i: 2 Private memory s: 14 i: 3 s: 11 i: 1 send P1,s Network receive Pn,s

01/27/2015 CS267 Lecture 321 Computing s = f(A[1])+f(A[2]) on each processor ° First possible solution – what could go wrong? Processor 1 xlocal = f(A[1]) send xlocal, proc2 receive xremote, proc2 s = xlocal + xremote Processor 2 xlocal = f(A[2]) receive xremote, proc1 send xlocal, proc1 s = xlocal + xremote ° Second possible solution Processor 1 xlocal = f(A[1]) send xlocal, proc2 receive xremote, proc2 s = xlocal + xremote Processor 2 xlocal = f(A[2]) send xlocal, proc1 receive xremote, proc1 s = xlocal + xremote ° If send/receive acts like the telephone system? The post office? ° What if there are more than 2 processors?

01/27/2015 CS267 Lecture 322 MPI has become the de facto standard for parallel computing using message passing Pros and Cons of standards MPI created finally a standard for applications development in the HPC community  portability The MPI standard is a least common denominator building on mid-80s technology, so may discourage innovation Programming Model reflects hardware! “I am not sure how I will program a Petaflops computer, but I am sure that I will need MPI somewhere” – HDS 2001 MPI – the de facto standard

01/27/2015 CS267 Lecture 323 Machine Model 2a: Distributed Memory Cray XE6 (Hopper), Cray XC30 (Edison) PC Clusters (Berkeley NOW, Beowulf) Edison, Hopper, most of the Top500, are distributed memory machines, but the nodes are SMPs. Each processor has its own memory and cache but cannot directly access another processor’s memory. Each “node” has a Network Interface (NI) for all communication and synchronization. interconnect P0 memory NI... P1 memory NI Pn memory NI

01/27/2015 CS267 Lecture 324 PC Clusters: Contributions of Beowulf An experiment in parallel computing systems (1994) Established vision of low cost, high end computing Cost effective because it uses off-the-shelf parts Demonstrated effectiveness of PC clusters for some (not all) classes of applications Provided networking software Conveyed findings to broad community (great PR) Tutorials and book Design standard to rally community! Standards beget: books, trained people, software … virtuous cycle Adapted from Gordon Bell, presentation at Salishan 2000

01/27/2015 CS267 Lecture 325 Tflop/s and Pflop/s Clusters (2009 data) The following are examples of clusters configured out of separate networks and processor components About 82% of Top 500 are clusters (Nov 2009, up from 72% in 2005), 4 of top 10 IBM Cell cluster at Los Alamos (Roadrunner) is #2 12,960 Cell chips + 6,948 dual-core AMD Opterons; cores altogether 1.45 PFlops peak, 1.1PFlops Linpack, 2.5MWatts Infiniband connection network For more details use “database/sublist generator” at

01/27/2015 CS267 Lecture 426 Machine Model 2b: Internet/Grid Computing Running on 3.3M hosts, 1.3M users ~1000 CPU Years per Day (older data) 485,821 CPU Years so far Sophisticated Data & Signal Processing Analysis Distributes Datasets from Arecibo Radio Telescope Next Step- Allen Telescope Array Google “volunteer computing” or “BOINC”

01/27/2015 CS267 Lecture 327 Programming Model 2a: Global Address Space Program consists of a collection of named threads. Usually fixed at program startup time Local and shared data, as in shared memory model But, shared data is partitioned over local processes Cost models says remote data is expensive Examples: UPC, Titanium, Co-Array Fortran Global Address Space programming is an intermediate point between message passing and shared memory PnP1 P0 s[myThread] =... y =..s[i]... i: 1i: 5 Private memory Shared memory i: 8 s[0]: 26s[1]: 32 s[n]: 27

01/27/2015 CS267 Lecture 328 Machine Model 2c: Global Address Space Cray T3D, T3E, X1, and HP Alphaserver cluster Clusters built with Quadrics, Myrinet, or Infiniband The network interface supports RDMA (Remote Direct Memory Access) NI can directly access memory without interrupting the CPU One processor can read/write memory with one-sided operations (put/get) Not just a load/store as on a shared memory machine Continue computing while waiting for memory op to finish Remote data is typically not cached locally interconnect P0 memory NI... P1 memory NI Pn memory NI Global address space may be supported in varying degrees

01/27/2015 Review so far and plan for Lecture 3 Programming Models Machine Models CS267 Lecture Shared Memory1a. Shared Memory 1b. Multithreaded Procs. 1c. Distributed Shared Mem. 2.Message Passing 2a. Global Address Space 2a. Distributed Memory 2b. Internet & Grid Computing 2c. Global Address Space 3. Data Parallel 3a. SIMD 3b. Vector 4. Hybrid What about GPU? What about Cloud?

01/27/2015 CS267 Lecture 330 Programming Model 3: Data Parallel Single thread of control consisting of parallel operations. A = B+C could mean add two arrays in parallel Parallel operations applied to all (or a defined subset) of a data structure, usually an array Communication is implicit in parallel operators Elegant and easy to understand and reason about Coordination is implicit – statements executed synchronously Similar to Matlab language for array operations Drawbacks: Not all problems fit this model Difficult to map onto coarse-grained machines A: fA: f sum A = array of all data fA = f(A) s = sum(fA) s:

01/27/2015 CS267 Lecture 331 Machine Model 3a: SIMD System A large number of (usually) small processors. A single “control processor” issues each instruction. Each processor executes the same instruction. Some processors may be turned off on some instructions. Originally machines were specialized to scientific computing, few made (CM2, Maspar) Programming model can be implemented in the compiler mapping n-fold parallelism to p processors, n >> p, but it’s hard (e.g., HPF) interconnect P1 memory NI... control processor P2 memory NIP3 memory NI Pn-1 memory NI Pn memory NI

01/27/2015 CS267 Lecture 332 Machine Model 3b: Vector Machines Vector architectures are based on a single processor Multiple functional units All performing the same operation Instructions may specific large amounts of parallelism (e.g., 64- way) but hardware executes only a subset in parallel Historically important Overtaken by MPPs in the 90s Re-emerging in recent years At a large scale in the Earth Simulator (NEC SX6) and Cray X1 At a small scale in SIMD media extensions to microprocessors SSE, SSE2 (Intel: Pentium/IA64) Altivec (IBM/Motorola/Apple: PowerPC) VIS (Sun: Sparc) At a larger scale in GPUs Key idea: Compiler does some of the difficult work of finding parallelism, so the hardware doesn’t have to

01/27/2015 CS267 Lecture 333 Vector Processors Vector instructions operate on a vector of elements These are specified as operations on vector registers A supercomputer vector register holds ~32-64 elts The number of elements is larger than the amount of parallel hardware, called vector pipes or lanes, say 2-4 The hardware performs a full vector operation in #elements-per-vector-register / #pipes r1r2 r3 + + … vr2 … vr1 … vr3 (logically, performs # elts adds in parallel) … vr2 … vr1 (actually, performs #pipes adds in parallel)

01/27/2015 CS267 Lecture 334 Cray X1: Parallel Vector Architecture Cray combines several technologies in the X Gflop/s Vector processors (MSP) Shared caches (unusual on earlier vector machines) 4 processor nodes sharing up to 64 GB of memory Single System Image to 4096 Processors Remote put/get between nodes (faster than MPI)

01/27/2015 CS267 Lecture 335 Earth Simulator Architecture Parallel Vector Architecture High speed (vector) processors High memory bandwidth (vector architecture) Fast network (new crossbar switch) Rearranging commodity parts can’t match this performance

01/27/2015 Review so far and plan for Lecture 3 Programming Models Machine Models CS267 Lecture Shared Memory1a. Shared Memory 1b. Multithreaded Procs. 1c. Distributed Shared Mem. 2.Message Passing 2a. Global Address Space 2a. Distributed Memory 2b. Internet & Grid Computing 2c. Global Address Space 3. Data Parallel 3a. SIMD & GPU 3b. Vector 4. Hybrid What about GPU? What about Cloud?

01/27/2015 CS267 Lecture 337 Machine Model 4: Hybrid machines Multicore/SMPs are a building block for a larger machine with a network Old name: CLUMP = Cluster of SMPs Many modern machines look like this: Edison and Hopper (2x12 way nodes), most of Top500 What is an appropriate programming model #4 ??? Treat machine as “flat”, always use message passing, even within SMP (simple, but ignores an important part of memory hierarchy). Shared memory within one SMP, but message passing outside of an SMP. GPUs may also be building block Nov 2014 Top500: 14% have accelerators, but 35% of performance

01/27/2015 Accelerators in Top 500 (Nov 2014)

01/27/2015 Performance of Accelerators in Top500, Nov 2014

01/27/2015 Performance Share of Accelerators in Top500, Nov 2014

01/27/2015 CS267 Lecture 341 Programming Model 4: Hybrids Programming models can be mixed Message passing (MPI) at the top level with shared memory within a node is common New DARPA HPCS languages mix data parallel and threads in a global address space Global address space models can (often) call message passing libraries or vice verse Global address space models can be used in a hybrid mode Shared memory when it exists in hardware Communication (done by the runtime system) otherwise For better or worse Supercomputers often programmed this way for peak performance

01/27/2015 Review so far and plan for Lecture 3 Programming Models Machine Models CS267 Lecture Shared Memory1a. Shared Memory 1b. Multithreaded Procs. 1c. Distributed Shared Mem. 2.Message Passing 2a. Global Address Space 2a. Distributed Memory 2b. Internet & Grid Computing 2c. Global Address Space 3. Data Parallel 3a. SIMD & GPU 3b. Vector 4. Hybrid What about GPU? What about Cloud?

01/27/2015 What about GPU and Cloud? GPU’s big performance opportunity is data parallelism Most programs have a mixture of highly parallel operations, and some not so parallel GPUs provide a threaded programming model (CUDA) for data parallelism to accommodate both Current research attempting to generalize programming model to other architectures, for portability (OpenCL) Guest lecture later in the semester Cloud computing lets large numbers of people easily share O(10 5 ) machines MapReduce was first programming model: data parallel on distributed memory More flexible models (Hadoop, Spark, …) invented since then Guest lecture later in the semester Both may be used for class projects CS267 Lecture 343

01/27/2015 CS267 Lecture 344 Lessons from Lecture 3 Three basic conceptual models Shared memory Distributed memory Data parallel and hybrids of these machines All of these machines rely on dividing up work into parts that are: Mostly independent (little synchronization) About same size (load balanced) Have good locality (little communication) Next Lecture: How to identify parallelism and locality in applications

01/27/2015 Class Update (2013) Class makeup is very diverse 44 Grad Students 15 CS, 7 EECS 6 Mech Eng, 4 Civil Env Eng, 3 Chem Eng, 2 Physics 1 each from Bio Eng, Business, Chem, Earth & Planetary Science, Math, Material Sci Eng, Stat 9 Undergrad Students 6 EECS, 2 Double, 1 Applied Math CS267 Lecture 345

01/27/2015 Class Update (2011) Class makeup is very diverse 10 CS Grad students 13 Application areas: 4 Nuclear, 3 EECS, 1 each for IEOR, ChemE, Civil, Physics, Chem, Biostat, MechEng, Materials Undergrad: 7 (not all majors shown, mostly CS) Concurrent enrollment: 6 (majors not shown) Everyone is an expert different parts of course Some lectures are broad (lecture 1) Some go into details (lecture 2) Lecture plan change: Reorder lectures 4+5 with lectures 6+7 After today: 2 lectures on “Sources of Parallelism” in various science engineering simulations, Jim will lecture Today: finish practicalities of tuning code (slide 66 of lecture 2 slides) followed by high level overview of parallel machines CS267 Lecture 346

01/27/2015 CS267 Lecture Gflops (64 bit) S VV S VV S VV S VV 0.5 MB $ 0.5 MB $ 0.5 MB $ 0.5 MB $ 25.6 Gflops (32 bit) To local memory and network: 2 MB Ecache At frequency of 400/800 MHz 51 GB/s GB/s 25.6 GB/s GB/s custom blocks Cray X1 Node Figure source J. Levesque, Cray Cray X1 builds a larger “virtual vector”, called an MSP 4 SSPs (each a 2-pipe vector processor) make up an MSP Compiler will (try to) vectorize/parallelize across the MSP