INTEL CONFIDENTIAL Finding Parallelism Introduction to Parallel Programming – Part 3.

Slides:



Advertisements
Similar presentations
Implementing Task Decompositions Intel Software College Introduction to Parallel Programming – Part 5.
Advertisements

Analyzing Parallel Performance Intel Software College Introduction to Parallel Programming – Part 6.
Confronting Race Conditions Intel Software College Introduction to Parallel Programming – Part 4.
Shared-Memory Model and Threads Intel Software College Introduction to Parallel Programming – Part 2.
Improving Parallel Performance Intel Software College Introduction to Parallel Programming – Part 7.
Implementing Domain Decompositions Intel Software College Introduction to Parallel Programming – Part 3.
Intel Software College Tuning Threading Code with Intel® Thread Profiler for Explicit Threads.
INTEL CONFIDENTIAL Implementing a Task Decomposition Introduction to Parallel Programming – Part 9.
Software & Services Group, Developer Products Division Copyright© 2010, Intel Corporation. All rights reserved. *Other brands and names are the property.
© 2014 Microsoft Corporation. All rights reserved.
The Intel® Software Community Real-world resources you can use.
INTEL CONFIDENTIAL Improving Parallel Performance Introduction to Parallel Programming – Part 11.
INTEL CONFIDENTIAL Deadlock Introduction to Parallel Programming – Part 7.
Intel ® Teach Program International Curriculum Roundtable Programs of the Intel ® Education Initiative are funded by the Intel Foundation and Intel Corporation.
Intel® Education Fluid Math™
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
Compiler Challenges, Introduction to Data Dependences Allen and Kennedy, Chapter 1, 2.
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
Message Passing Fundamentals Self Test. 1.A shared memory computer has access to: a)the memory of other nodes via a proprietary high- speed communications.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Parallel Programming in C with MPI and OpenMP Michael J. Quinn.
CISC 879 : Software Support for Multicore Architectures John Cavazos Dept of Computer & Information Sciences University of Delaware
INTEL CONFIDENTIAL OpenMP for Domain Decomposition Introduction to Parallel Programming – Part 5.
INTEL CONFIDENTIAL Confronting Race Conditions Introduction to Parallel Programming – Part 6.
INTEL CONFIDENTIAL OpenMP for Task Decomposition Introduction to Parallel Programming – Part 8.
Copyright © 2006, Intel Corporation. All rights reserved. *Other brands and names are the property of their respective owners Intel® Core™ Duo Processor.
INTEL CONFIDENTIAL Why Parallel? Why Now? Introduction to Parallel Programming – Part 1.
Intel® Processor Architecture: Multi-core Overview Intel® Software College.
INTEL CONFIDENTIAL Reducing Parallel Overhead Introduction to Parallel Programming – Part 12.
INTEL CONFIDENTIAL Parallel Decomposition Methods Introduction to Parallel Programming – Part 2.
Copyright © 2008, Intel Corporation. All rights reserved. Intel, the Intel logo, Intel Education Initiative, and Intel Teach Program are trademarks of.
OpenCL Introduction A TECHNICAL REVIEW LU OCT
Programming Models using Windows* Threads Intel Software College.
Recognizing Potential Parallelism Intel Software College Introduction to Parallel Programming – Part 1.
Orion Granatir Omar Rodriguez GDC 3/12/10 Don’t Dread Threads.
Evaluation of a DAG with Intel® CnC Mark Hampton Software and Services Group CnC MIT July 27, 2010.
Multi-core Programming: Basic Concepts. Copyright © 2006, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered.
1b.1 Types of Parallel Computers Two principal approaches: Shared memory multiprocessor Distributed memory multicomputer ITCS 4/5145 Parallel Programming,
INTEL CONFIDENTIAL Predicting Parallel Performance Introduction to Parallel Programming – Part 10.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Slides Courtesy Michael J. Quinn Parallel Programming in C.
INTEL CONFIDENTIAL, FOR INTERNAL USE ONLY 1 Intel® Engage Community For educators dedicated to transforming K-12 classrooms
Copyright © 2008, Intel Corporation. All rights reserved. Intel, the Intel logo, Intel Education Initiative, and Intel Teach Program are trademarks of.
Recognizing Potential Parallelism Introduction to Parallel Programming Part 1.
MATRIX MULTIPLY WITH DRYAD B649 Course Project Introduction.
Programs of the Intel® Education Initiative are funded by the Intel Foundation and Intel Corporation. Copyright © 2007, Intel Corporation. All rights reserved.
INTEL CONFIDENTIAL Shared Memory Considerations Introduction to Parallel Programming – Part 4.
Separating the Interface from the Engine: Creating Custom Add-in Tasks for SAS Enterprise Guide ® Peter Eberhardt Fernwood Consulting Group Inc.
Intel ® Education K-12 Resources Copyright © 2010 Intel Corporation. All rights reserved. Intel, the Intel logo, and the Intel Education Initiative are.
Thinking in Parallel – Implementing In Code New Mexico Supercomputing Challenge in partnership with Intel Corp. and NM EPSCoR.
How Are Computers Programmed? CPS120: Introduction to Computer Science Lecture 5.
Parallel Computing Presented by Justin Reschke
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
Thinking in Parallel - Introduction New Mexico Supercomputing Challenge in partnership with Intel Corp. and NM EPSCoR.
Tuning Threaded Code with Intel® Parallel Amplifier.
1 Parallel Processing Fundamental Concepts. 2 Selection of an Application for Parallelization Can use parallel computation for 2 things: –Speed up an.
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
Copyright © 2010 Intel Corporation. All rights reserved. Adapted with permission. Intel, the Intel logo and the Intel Education Initiative are trademarks.
Introduction to threads
Algorithms and Problem Solving
Parallel Programming By J. H. Wang May 2, 2017.
Many-core Software Development Platforms
Parallel Programming in C with MPI and OpenMP
Jonathan Mak & Alan Mycroft University of Cambridge
ე ვ ი ო Ш Е Т И О А С Д Ф К Ж З В Н М W Y U I O S D Z X C V B N M
Multithreaded Programming
Algorithms and Problem Solving
Lecture 2 The Art of Concurrency
Math log #29 1/30/19 a.
Parallel Programming in C with MPI and OpenMP
Types of Parallel Computers
Presentation transcript:

INTEL CONFIDENTIAL Finding Parallelism Introduction to Parallel Programming – Part 3

Copyright © 2009, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. * Other brands and names are the property of their respective owners. Review & Objectives Previously: Described three methods of dividing independent work At the end of this part you should be able to: Identify opportunities for parallelism in code segments and applications 2

Copyright © 2009, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. * Other brands and names are the property of their respective owners. Where Can You Find Independent Tasks? If you are familiar with the application, you should have an idea about where independent computations can be found Is there a large data set involved? Are there portions of code that can execute in a different order? Is the computation a set of stages that don’t interact except for using the output of one as the input for the next? A more formal method of discovering parallelism uses dependence graphs 3

Copyright © 2009, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. * Other brands and names are the property of their respective owners. Dependence Graph Graph = (nodes, arrows) Node for each Variable assignment (except index variables) Constant Operator or function call Arrows indicate use of variables and constants Data flow Control flow 4

Copyright © 2009, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. * Other brands and names are the property of their respective owners. Dependence Graph Example #1 5 for (i = 0; i < 3; i++) a[i] = b[i] / 2.0; b[0]b[1]b[2] a[0]a[1]a[2] 222 ///

Copyright © 2009, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. * Other brands and names are the property of their respective owners. Dependence Graph Example #1 6 for (i = 0; i < 3; i++) a[i] = b[i] / 2.0; b[0]b[1]b[2] a[0]a[1]a[2] 222 /// Domain decomposition possible

Copyright © 2009, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. * Other brands and names are the property of their respective owners. Dependence Graph Example #2 7 for (i = 1; i < 4; i++) a[i] = a[i-1] * b[i]; b[1]b[2]b[3] a[1]a[2]a[3] a[0] ***

Copyright © 2009, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. * Other brands and names are the property of their respective owners. Dependence Graph Example #2 8 for (i = 1; i < 4; i++) a[i] = a[i-1] * b[i]; b[1]b[2]b[3] a[1]a[2]a[3] a[0] *** No domain decomposition

Copyright © 2009, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. * Other brands and names are the property of their respective owners. Dependence Graph Example #3 9 a = f(x, y, z); b = g(w, x); t = a + b; c = h(z); s = t / c; xwyz abc s / h()f()g() + t

Copyright © 2009, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. * Other brands and names are the property of their respective owners. Dependence Graph Example #3 10 a = f(x, y, z); b = g(w, x); t = a + b; c = h(z); s = t / c; xwyz abc s Task decomposition with 3 cores. / hfg + t

Copyright © 2009, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. * Other brands and names are the property of their respective owners. Dependence Graph Example #4 11 for (i = 0; i < 3; i++) a[i] = a[i] / 2.0; a[0]a[1]a[2] a[0]a[1]a[2] 222 ///

Copyright © 2009, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. * Other brands and names are the property of their respective owners. Dependence Graph Example #4 12 for (i = 0; i < 3; i++) a[i] = a[i] / 2.0; a[0]a[1]a[2] a[0]a[1]a[2] 222 /// Domain decomposition

Copyright © 2009, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. * Other brands and names are the property of their respective owners. Dependence Graph Example #5 13 for (i = 0; i < 3; i++) { a[i] = a[i] / 2.0; if (a[i] < 1.0) break; } a[0]a[1]a[2] a[0]a[2] 222 /// << 11 a[1]

Copyright © 2009, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. * Other brands and names are the property of their respective owners. Can You Find the Parallelism? Resizing a photo Searching a document for all instances of a word Updating a spreadsheet Compiling a program Prefetching pages in a Web browser Using a word processor to type a report 14

Copyright © 2009, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. * Other brands and names are the property of their respective owners. Opportunities for a Parallel Solution? Parallel Solution EasierParallel Solution More Difficult or Even Impossible Larger data setsSmaller data sets Dense matricesSparse matrices Dividing space among cores Dividing time among cores 15

Copyright © 2009, Intel Corporation. All rights reserved. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. * Other brands and names are the property of their respective owners. References Richard H. Carver and Kuo-Chung Tai, Modern Multithreading: Implementing, Testing, and Debugging Java and C++/Pthreads/ Win32 Programs, Wiley-Interscience (2006). Robert L. Mitchell, “Decline of the Desktop,” Computerworld (September 26, 2005). Michael J. Quinn, Parallel Programming in C with MPI and OpenMP, McGraw-Hill (2004). Herb Sutter, “The Free Lunch is Over: A Fundamental Turn Toward Concurrency in Software,” Dr. Dobb’s Journal 30, 3 (March 2005). 16