Data Structures and Algorithms in Parallel Computing

Slides:



Advertisements
Similar presentations
CSE 160 – Lecture 9 Speed-up, Amdahl’s Law, Gustafson’s Law, efficiency, basic performance metrics.
Advertisements

Datorteknik F1 bild 1 Higher Level Parallelism The PRAM Model Vector Processors Flynn Classification Connection Machine CM-2 (SIMD) Communication Networks.
Prepared 7/28/2011 by T. O’Neil for 3460:677, Fall 2011, The University of Akron.
Distributed Systems CS
SE-292 High Performance Computing
Lecture 38: Chapter 7: Multiprocessors Today’s topic –Vector processors –GPUs –An example 1.
Super computers Parallel Processing By: Lecturer \ Aisha Dawood.
Taxanomy of parallel machines. Taxonomy of parallel machines Memory – Shared mem. – Distributed mem. Control – SIMD – MIMD.
Slide 1 Parallel Computation Models Lecture 3 Lecture 4.
Advanced Topics in Algorithms and Data Structures An overview of the lecture 2 Models of parallel computation Characteristics of SIMD models Design issue.

Multiprocessors CSE 471 Aut 011 Multiprocessors - Flynn’s Taxonomy (1966) Single Instruction stream, Single Data stream (SISD) –Conventional uniprocessor.
Models of Parallel Computation Advanced Algorithms & Data Structures Lecture Theme 12 Prof. Dr. Th. Ottmann Summer Semester 2006.
 Parallel Computer Architecture Taylor Hearn, Fabrice Bokanya, Beenish Zafar, Mathew Simon, Tong Chen.
1 Computer Science, University of Warwick Architecture Classifications A taxonomy of parallel architectures: in 1972, Flynn categorised HPC architectures.
Introduction to Parallel Processing Ch. 12, Pg
Flynn’s Taxonomy of Computer Architectures Source: Wikipedia Michael Flynn 1966 CMPS 5433 – Parallel Processing.
RAM and Parallel RAM (PRAM). Why models? What is a machine model? – A abstraction describes the operation of a machine. – Allowing to associate a value.
Course Outline Introduction in software and applications. Parallel machines and architectures –Overview of parallel machines –Cluster computers (Myrinet)
CS668- Lecture 2 - Sept. 30 Today’s topics Parallel Architectures (Chapter 2) Memory Hierarchy Busses and Switched Networks Interconnection Network Topologies.
1 Chapter 1 Parallel Machines and Computations (Fundamentals of Parallel Processing) Dr. Ranette Halverson.
Introduction, background, jargon Jakub Yaghob. Literature T.G.Mattson, B.A.Sanders, B.L.Massingill: Patterns for Parallel Programming, Addison- Wesley,
CHAPTER 12 INTRODUCTION TO PARALLEL PROCESSING CS 147 Guy Wong page
-1.1- Chapter 2 Abstract Machine Models Lectured by: Nguyễn Đức Thái Prepared by: Thoại Nam.
An Overview of Parallel Computing. Hardware There are many varieties of parallel computing hardware and many different architectures The original classification.
RAM, PRAM, and LogP models
Parallel Processing & Distributed Systems Thoai Nam Chapter 2.
CS- 492 : Distributed system & Parallel Processing Lecture 7: Sun: 15/5/1435 Foundations of designing parallel algorithms and shared memory models Lecturer/
Data Structures and Algorithms in Parallel Computing Lecture 1.
2016/1/5Part I1 Models of Parallel Processing. 2016/1/5Part I2 Parallel processors come in many different varieties. Thus, we often deal with abstract.
Outline Why this subject? What is High Performance Computing?
Lecture 3: Computer Architectures
3/12/2013Computer Engg, IIT(BHU)1 INTRODUCTION-1.
Parallel Computing Presented by Justin Reschke
LECTURE #1 INTRODUCTON TO PARALLEL COMPUTING. 1.What is parallel computing? 2.Why we need parallel computing? 3.Why parallel computing is more difficult?
Computer Science and Engineering Parallel and Distributed Processing CSE 8380 April 28, 2005 Session 29.
Lecture 13 Parallel Processing. 2 What is Parallel Computing? Traditionally software has been written for serial computation. Parallel computing is the.
These slides are based on the book:
Auburn University COMP8330/7330/7336 Advanced Parallel and Distributed Computing Parallel Hardware Dr. Xiao Qin Auburn.
Flynn’s Taxonomy Many attempts have been made to come up with a way to categorize computer architectures. Flynn’s Taxonomy has been the most enduring of.
Introduction to Parallel Computing: MPI, OpenMP and Hybrid Programming
Overview Parallel Processing Pipelining
Parallel Architecture
18-447: Computer Architecture Lecture 30B: Multiprocessors
Higher Level Parallelism
Distributed and Parallel Processing
Multiprocessor Systems
buses, crossing switch, multistage network.
Parallel Processing - introduction
Course Outline Introduction in algorithms and applications
Chapter 1.
CS 147 – Parallel Processing
Lecture 2: Parallel computational models
Parallel computation models
Parallel and Multiprocessor Architectures
Pipelining and Vector Processing
Chapter 17 Parallel Processing
Objective of This Course
Outline Interconnection networks Processor arrays Multiprocessors
CSE838 Lecture notes copy right: Moon Jung Chung
buses, crossing switch, multistage network.
Overview Parallel Processing Pipelining
Chapter 5: Computer Systems Organization
AN INTRODUCTION ON PARALLEL PROCESSING
High Performance Computing & Bioinformatics Part 2 Dr. Imad Mahgoub
Part 2: Parallel Models (I)
COMP60621 Fundamentals of Parallel and Distributed Systems
Chapter 4 Multiprocessors
Advanced Computer and Parallel Processing
COMP60611 Fundamentals of Parallel and Distributed Systems
Presentation transcript:

Data Structures and Algorithms in Parallel Computing Lecture 1

Parallel computing Form of computation in which many calculations are done simultaneously Divide and conquer Split problem and solve each sub-problem in parallel Pay the communication cost

A bit of history 1958 S. Gill discusses parallel programming J. Cocke and D. Slotnick discuss parallel numerical computing 1967 Amdahl’s law is introduced Defines the speed-up due to parallelism 1969 Honneywell introduces the first symmetric multiprocessor It allowed for up to 8 parallel processors June 2016 China’s Sunway TaihuLight is the fastest computer in the world 93 petaflops

Classification Bit level Instruction level Increase word size to reduce number of instructions 2 instructions to add a 16 bit number on 8 bit processor 1 instruction to add a 16 bit number on 16 bit processor Instruction level Hardware level Software level Example e = a + b f = c + d m = e * f #3 depends on #1 and #2 both of which can be executed in parallel

Classification (2) Data parallelism Task parallelism Big Data Volume, Velocity, Variety, Veracity Does not fit in memory Split data among different processors Each processor executes same code on different data piece MapReduce Task parallelism Distribute tasks on processors and execute them in parallel

Architecture classification Flynn’s taxonomy (1966) Single Instruction Single Data stream (SISD) No parallelism Uniprocessor PCs Single Instruction Multiple Data streams (SIMD) Data parallelism GPUs Multiple Instructions Single Data streams (MISD) Fault tolerant systems Multiple Instructions Multiple Data streams (MIMD) Different tasks handle different data streams Distributed computing

Architecture classification (2) MIMD can be further divided: Single Program Multiple Data Autonomous processors execute asynchronously the same program Multiple Program Multiple Data Autonomous processors execute different programs Manager/worker strategy

Memory models Shared memory Distributed shared memory Multiple programs access the same memory Example: Cray machines Distributed shared memory Memory physically distributed Programs access the same address space Distributed memory Each processor has its own private memory Grid computing

Need for speed Amdahl’s law

Algorithm design How to transform a sequential algorithm in a parallel one? Example: Compute the sum of n numbers Numbers are stored in a matrix A Pair A[i] with A[i+1] Add the pair on machine k We need n/k machines We obtain a new sequence of n/k numbers Repeat from step 1 After log2n iterations we get a sequence of 1 number: the sum

Modeling parallel computations No consensus on the right model Random-Access Machine (RAM) Ignores many of the computer architecture details Captures enough detail for reasonable accuracy Each CPU operation including arithmetic and logical operations, and memory accesses requires 1 time step

Multiprocessor model Local memory Modular memory Parallel RAM (PRAM) Each processor has its own local memory Processors are attached to a local network Modular memory M memory modules Parallel RAM (PRAM) Shared memory No real machine lives up to its ideal of unit time access to a shared memory Where can it be implemented? FPGAs (SRAM)

Network limitations Communication bottlenecks Bus topology Processors take turn to access the bus 2 dimensional mesh Remote accesses are done by routing messages Appears in local memory machines Multistage network Used to connect one set of input switches to another set of output switches Designed for telephone networks Appears in modular memory machines Processors are attached to input switches and memory to output switches

Network limitations (2) Algorithms designed for one topology may not work for another! Algorithms considering network topology are more complicated than the ones designed for simpler models such as PRAM

Model routing capabilities Alternative to topology modeling Consider Bandwidth Rate at which a processor can inject data in the network Latency Time to traverse the network

Model routing capabilities (2) Existing models: Postal model Model only latency Bulk Synchronous Parallel Adds g, i.e., the minimum ratio of computation steps to communication steps LogP Adds o, i.e., the overhead of a processor upon sending/receiving a message

Primitive operations Basic operations that processors and network can perform All processors can perform the same local instructions as the single processor in the RAM model Processors can also issue non-local memory requests For message passing For global operations

Restrictions on operations Restrictions on operations can exist E.g., two processors may not write the same memory location at the same time Exclusive vs. concurrent access Exclusive read exclusive write (EREW) Concurrent read concurrent write (CRCW) Concurrent read exclusive write (CREW) Solving concurrent writes Random picking Priority picking Queued access: Queued read queued write

Examples of operations Read-write to non-local memory or other processors Synchronization Broadcast messages to processors Gather messages from processors

Work-depth model Focus on algorithm instead of the multiprocessor model Cost of an algorithm is determined based on the number of operations and their dependencies: P=W/D Where W is the total number of operations (work) And D is the longest chain of dependencies among them (depth)

Types of work-depth models Vector model Sequence of steps operating on a vector Circuit model Nodes (operations) and directed arcs (communication) Input arcs Provide input to the whole circuit Output arcs Return the final output values of the circuit No directed cycles allowed Language model

Circuit model example

Importance of cost Cost can be applied to multiprocessor models too The work is equal to the number of processors x the time required for the algorithm to finish The depth is equal to the total time required to execute the algorithm E.g., weather forecasting, real-time planning A parallel algorithm is work-efficient if asymptotically it requires at most a constant factor more work than the best sequential algorithm known Example: Assume best sequential sorting algorithm: An algorithm which sorts n keys in on machines is work-efficient whereas one which is on is not although it is faster

Takeaway slide Algorithm + Architecture + Data = Efficiency Knowing OpenMP, MPI or MapReduce is good BUT Writing parallel code is not enough! We need to understand Network topology Hardware architecture, and Data properties Data access patterns Structure of relational data (graphs – type?) Location … Algorithm + Architecture + Data = Efficiency

What’s next? Parallel algorithmic techniques Graphs Sorting Divide and conquer Randomization Parallel pointer techniques Graphs Breadth first search Connected components Page Rank Single source shortest path Vertex centric vs. subgraph centric models Sorting Quicksort Radix sort Computational geometry Closest pair Planar convex hull Numerical algorithms Matrix operations Fourier transform

Evaluation Presentation of a research article from a top journal or conference in the area of the lecture. You will have to be able to Understand the article Present it to an audience Discuss and propose future work