CMPS 5433 Programming Models

Slides:



Advertisements
Similar presentations
Multi-core Computing Lecture 3 MADALGO Summer School 2012 Algorithms for Modern Parallel and Distributed Models Phillip B. Gibbons Intel Labs Pittsburgh.
Advertisements

© 2009 Charles E. Leiserson and Pablo Halpern1 Introduction to Cilk++ Programming PADTAD July 20, 2009 Cilk, Cilk++, Cilkview, and Cilkscreen, are trademarks.
Tree Recursion Traditional Approach. Tree Recursion Consider the Fibonacci Number Sequence: Time: , 1, 1, 2, 3, 5, 8, 13, 21,... /
INTEL CONFIDENTIAL Threading for Performance with Intel® Threading Building Blocks Session:
Fine-grain Task Aggregation and Coordination on GPUs
MINJAE HWANG THAWAN KOOBURAT CS758 CLASS PROJECT FALL 2009 Extending Task-based Programming Model beyond Shared-memory Systems.
§3 Dynamic Programming Use a table instead of recursion 1. Fibonacci Numbers: F(N) = F(N – 1) + F(N – 2) int Fib( int N ) { if ( N
Types of Recursive Methods
Cilk NOW Based on a paper by Robert D. Blumofe & Philip A. Lisiecki.
Software and Services Group Optimization Notice Advancing HPC == advancing the business of software Rich Altmaier Director of Engineering Sept 1, 2011.
U NIVERSITY OF M ASSACHUSETTS, A MHERST – Department of Computer Science The Implementation of the Cilk-5 Multithreaded Language (Frigo, Leiserson, and.
CILK: An Efficient Multithreaded Runtime System. People n Project at MIT & now at UT Austin –Bobby Blumofe (now UT Austin, Akamai) –Chris Joerg –Brad.
Lecture 3 Tuesday, February 10, 2015 [With the help of free online resources]
Lecture 3 Tuesday, February 10, 2015 [With the help of free online resources]
Parallelizing C Programs Using Cilk Mahdi Javadi.
DISTRIBUTED AND HIGH-PERFORMANCE COMPUTING CHAPTER 7: SHARED MEMORY PARALLEL PROGRAMMING.
Image Processing Using Cilk 1 Parallel Processing – Final Project Image Processing Using Cilk Tomer Y & Tuval A (pp25)
1 CS 140 : Jan 27 – Feb 3, 2010 Multicore (and Shared Memory) Programming with Cilk++ Multicore and NUMA architectures Multithreaded Programming Cilk++
WSE 187: INTRODUCTION TO PARALLEL PROGRAMMING* Lecture 2 Jesmin Jahan Tithi *Prepared with the help of free online resources.
Cilk CISC 879 Parallel Computation Erhan Atilla Avinal.
– 1 – Basic Machine Independent Performance Optimizations Topics Load balancing (review, already discussed) In the context of OpenMP notation Performance.
SEC(R) 2008 Intel® Concurrent Collections for C++ - a model for parallel programming Nikolay Kurtov Software and Services.
Department of Computer and Information Science
1 Copyright © 2010, Elsevier Inc. All rights Reserved Chapter 5 Shared Memory Programming with OpenMP An Introduction to Parallel Programming Peter Pacheco.
STRATEGIC NAMING: MULTI-THREADED ALGORITHM (Ch 27, Cormen et al.) Parallelization Four types of computing: –Instruction (single, multiple) per clock cycle.
© 2008 CILK ARTS, Inc.1 Executive Briefing: Multicore- Enabling SaaS Applications September 3, 2008 Cilk++, Cilk, Cilkscreen, and Cilk Arts are trademarks.
Recursion Recursion is a math and programming tool –Technically, not necessary Advantages of recursion –Some things are very easy to do with it, but difficult.
Comp 245 Data Structures Recursion. What is Recursion? A problem solving concept which can be used with languages that support the dynamic allocation.
O PEN MP (O PEN M ULTI -P ROCESSING ) David Valentine Computer Science Slippery Rock University.
ROBERT BOCCHINO, ET AL. UNIVERSAL PARALLEL COMPUTING RESEARCH CENTER UNIVERSITY OF ILLINOIS A Type and Effect System for Deterministic Parallel Java *Based.
GPU Architecture and Programming
Dynamic Programming.
TEXT: Structured Parallel Programming: Patterns for Efficient Computation M. McCool, A. Robison, J. Reinders Chapter 1 CMPS 5433 – Parallel Algorithms.
1 CS 140 : Feb 19, 2015 Cilk Scheduling & Applications Analyzing quicksort Optional: Master method for solving divide-and-conquer recurrences Tips on parallelism.
P ARALLEL P ROCESSING F INAL P RESENTATION CILK Eliran Ben Moshe Neriya Cohen.
1 Recursion Recursive definitions Recursive methods Run-time stack & activation records => Read section 2.3.
CS 240A: Shared Memory & Multicore Programming with Cilk++
A Brief Introduction to Recursion. Recursion Recursive methods … –methods that call themselves! –They can only solve a base case –So, you divide a problem.
1 Cilk Chao Huang CS498LVK. 2 Introduction A multithreaded parallel programming language Effective for exploiting dynamic, asynchronous parallelism (Chess.
Int fact (int n) { If (n == 0) return 1; else return n * fact (n – 1); } 5 void main () { Int Sum; : Sum = fact (5); : } Factorial Program Using Recursion.
Parallel Computing Chapter 3 - Patterns R. HALVERSON MIDWESTERN STATE UNIVERSITY 1.
Comparison of Threading Programming Models
CONCURRENCY PLATFORMS
Introduction to parallel programming modelS
CONCURRENCY PLATFORMS
CS 140 : Numerical Examples on Shared Memory with Cilk++
Prabhanjan Kambadur, Open Systems Lab, Indiana University
Pattern Parallel Programming
Fibonacci Fibonacci series 0, 1, 1, 2, 3, 5, 8, 13, 21, 34 Definition:
Object - Oriented Programming Language
Cilk and OpenMP (Lecture 20, cs262a)
Changing thread semantics
Recursion Recursion is a math and programming tool
Parallel Computation Patterns (Scan)
Multithreaded Programming in Cilk LECTURE 1
Compiler Front End Panel
Introduction to CILK Some slides are from:
Function.
Cilk A C language for programming dynamic multithreaded applications on shared-memory multiprocessors. Example applications: virus shell assembly graphics.
Program Flow.
Object - Oriented Programming Language
IST311 - CIS265/506 Cleveland State University – Prof. Victor Matos
William S. Moses Tao B. Schardl Charles E. Leiserson EECSCon
Concurrency Platforms OpenMP and Cilk Plus
Object - Oriented Programming Language
Cilk and Writing Code for Hardware
Introduction to CILK Some slides are from:
Function.
Types of Recursive Methods
CMPS 5433 – Parallel Algorithms Dr. Ranette Halverson
Presentation transcript:

CMPS 5433 Programming Models ENIAC – Circa 1945

Programming Models – Overview Section 1.5.8 - Appendices CILK Plus (Appendix B) Thread Building Blocks (TBB) (Appendix C) Open MP Array Building Blocks (ArBB)

CILK Plus (Appendix B) Integrated with a C & C++ compiler; extends language with key words & array selection notation Parallel Cilk program is serial with keyword “annotations” designating allowable parallelism – not mandatory Strong guarantee of serial equivalence

CILK Plus (Appendix B) Integrated with a C & C++ compiler; extends language with key words & array selection notation Fork-Join: supports PP patterns & nesting Parallel Loops: regular PP Explicit Vectorization Hyperobjects: to support reduction Serial Semantics: if key words ignored AKA serial elision Efficient Load Balancing: via work-stealing

CILK Basics Original 2 Key words Asynchronous function call cilk_for cilk_spawn cilk_sync Asynchronous function call Using cilk_spawn cilk_for Programmer must determine independence Manages granularity appropriately

Example cilk_spawn - Fibonacci int fib (int n) { if (n<2) return n; else {int x,y; { x=fib(n-1); y=fin(n-2); return x+y; }} int fib (int n) { if (n<2) return n; else {int x,y; { x=cilk_spawn fib(n-1); y=fin(n-2); cilk_sync; return x+y; }} Parallel execution of 2 recursive calls