1 Tuesday, October 31, 2006 “Data expands to fill the space available for storage.” -Parkinson’s Law.

Slides:



Advertisements
Similar presentations
Chapter Matrices Matrix Arithmetic
Advertisements

Dense Matrix Algorithms. Topic Overview Matrix-Vector Multiplication Matrix-Matrix Multiplication Solving a System of Linear Equations.
Sahalu Junaidu ICS 573: High Performance Computing 8.1 Topic Overview Matrix-Matrix Multiplication Block Matrix Operations A Simple Parallel Matrix-Matrix.
Parallel Matrix Operations using MPI CPS 5401 Fall 2014 Shirley Moore, Instructor November 3,
1 Parallel Programming with MPI- Day 4 Science & Technology Support High Performance Computing Ohio Supercomputer Center 1224 Kinnear Road Columbus, OH.
1 Process Groups & Communicators  Communicator is a group of processes that can communicate with one another.  Can create sub-groups of processes, or.
Numerical Algorithms ITCS 4/5145 Parallel Computing UNC-Charlotte, B. Wilkinson, 2009.
Parallel Programming in C with MPI and OpenMP Michael J. Quinn.
Numerical Algorithms • Matrix multiplication
Maths for Computer Graphics
HPDC Spring MPI 11 CSCI-6964: High Performance Parallel & Distributed Computing (HPDC) AE 216, Mon/Thurs. 2 – 3:20 p.m Message Passing Interface.
1 Friday, October 20, 2006 “Work expands to fill the time available for its completion.” -Parkinson’s 1st Law.
Examples of Two- Dimensional Systolic Arrays. Obvious Matrix Multiply Rows of a distributed to each PE in row. Columns of b distributed to each PE in.
October, 1998DARPA / Melamed / Singh1 Parallelization of Search Algorithms for Modeling QTES Processes Joshua Kramer and Santokh Singh Rutgers University.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 8 Matrix-vector Multiplication.
Design of parallel algorithms
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Parallel Programming in C with MPI and OpenMP Michael J. Quinn.
12d.1 Two Example Parallel Programs using MPI UNC-Wilmington, C. Ferner, 2007 Mar 209, 2007.
Chapter 5, CLR Textbook Algorithms on Grids of Processors.
Design of parallel algorithms Matrix operations J. Porras.
Dense Matrix Algorithms CS 524 – High-Performance Computing.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Parallel Programming in C with MPI and OpenMP Michael J. Quinn.
1 Matrix Addition, C = A + B Add corresponding elements of each matrix to form elements of result matrix. Given elements of A as a i,j and elements of.
Today Objectives Chapter 6 of Quinn Creating 2-D arrays Thinking about “grain size” Introducing point-to-point communications Reading and printing 2-D.
Matrices and Determinants
MATRICES. Matrices A matrix is a rectangular array of objects (usually numbers) arranged in m horizontal rows and n vertical columns. A matrix with m.
CE 311 K - Introduction to Computer Methods Daene C. McKinney
Row 1 Row 2 Row 3 Row m Column 1Column 2Column 3 Column 4.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Parallel Programming in C with MPI and OpenMP Michael J. Quinn.
Computer Science and Engineering Parallel and Distributed Processing CSE 8380 February 8, 2005 Session 8.
1 Math Review Coordinate systems 2-D, 3-D Vectors Matrices Matrix operations.
Row 1 Row 2 Row 3 Row m Column 1Column 2Column 3 Column 4.
Parallel Processing1 Parallel Processing (CS 676) Lecture: Grouping Data and Communicators in MPI Jeremy R. Johnson *Parts of this lecture was derived.
Slides for Parallel Programming Techniques & Applications Using Networked Workstations & Parallel Computers 2nd ed., by B. Wilkinson & M
CS4402 – Parallel Computing
Parallel Programming in C with MPI and OpenMP Michael J. Quinn.
Two-Dimensional Arrays ELEC 206 Computer Applications for Electrical Engineers Dr. Ron Hayne.
Matrices: Simplifying Algebraic Expressions Combining Like Terms & Distributive Property.
Matrix Operations.
PARALLEL PROCESSING From Applications to Systems Gorana Bosic Veljko Milutinovic
Sparse Matrix Dense Vector Multiplication by Pedro A. Escallon Parallel Processing Class Florida Institute of Technology April 2002.
Lecture 9 Architecture Independent (MPI) Algorithm Design
PARALLEL COMPUTATION FOR MATRIX MULTIPLICATION Presented By:Dima Ayash Kelwin Payares Tala Najem.
CS 450: COMPUTER GRAPHICS TRANSFORMATIONS SPRING 2015 DR. MICHAEL J. REALE.
MPI Groups, Communicators and Topologies. Groups and communicators In our case studies, we saw examples where collective communication needed to be performed.
A rectangular array of numeric or algebraic quantities subject to mathematical operations. The regular formation of elements into columns and rows.
Ch. 12 Vocabulary 1.) matrix 2.) element 3.) scalar 4.) scalar multiplication.
CSc 8530 Matrix Multiplication and Transpose By Jaman Bhola.
2 2.4 © 2016 Pearson Education, Ltd. Matrix Algebra PARTITIONED MATRICES.
Numerical Algorithms Chapter 11.
12-1 Organizing Data Using Matrices
Warm-up Problem Use the Laplace transform to solve the IVP.
Matrix Multiplication
Parallel Programming in C with MPI and OpenMP
Parallel Programming with MPI and OpenMP
MPI Groups, Communicators and Topologies
CSCE569 Parallel Computing
Parallel Matrix Operations
Matrices Elements, Adding and Subtracting
Parallel Programming in C with MPI and OpenMP
MATRICES MATRIX OPERATIONS.
2.2 Introduction to Matrices
CS100: Discrete structures
Matrix Addition and Multiplication
To accompany the text “Introduction to Parallel Computing”,
Matrix Addition, C = A + B Add corresponding elements of each matrix to form elements of result matrix. Given elements of A as ai,j and elements of B as.
1.8 Matrices.
Matrix A matrix is a rectangular arrangement of numbers in rows and columns Each number in a matrix is called an Element. The dimensions of a matrix are.
1.8 Matrices.
3.5 Perform Basic Matrix Operations Algebra II.
Presentation transcript:

1 Tuesday, October 31, 2006 “Data expands to fill the space available for storage.” -Parkinson’s Law

2 Matrix Algorithms

3 Matrix Vector Multiplication

4

5 Matrix Vector Multiplication (2-D block distribution. Colors represent data distributed on different processes) Abx

6 Matrix Vector Multiplication ( Colors represent parts of b are required by each process ) Abx

7

8

9 Groups and Communicators §In many parallel algorithms, communication operations need to be restricted to certain subsets of processes. §MPI provides mechanisms for partitioning the group of processes that belong to a communicator into subgroups each corresponding to a different communicator. §The simplest such mechanism is: int MPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm *newcomm) §This operation groups processors by color and sorts resulting groups on the key.

10 Groups and Communicators Using MPI_Comm_split to split a group of processes in a communicator into subgroups. 3

11 Groups and Communicators §In many parallel algorithms, processes are arranged in a virtual grid, and in different steps of the algorithm, communication needs to be restricted to a different subset of the grid. §MPI provides a convenient way to partition a Cartesian topology to form lower-dimensional grids: int MPI_Cart_sub(MPI_Comm comm_cart, int *keep_dims, MPI_Comm *comm_subcart)  If keep_dims[i] is true (non-zero value in C) then the i th dimension is retained in the new sub-topology.  The coordinate of a process in a sub-topology created by MPI_Cart_sub can be obtained from its coordinate in the original topology by disregarding the coordinates that correspond to the dimensions that were not retained.

12 Groups and Communicators Splitting a Cartesian topology of size 2 x 4 x 7 into (a) four subgroups of size 2 x 1 x 7, and (b) eight subgroups of size 1 x 1 x 7.

13

14

15

16 Matrix Matrix Multiplication  A and B are nxn matrices  p is the number of processing elements  The matrices are partitioned into blocks of size n/√p x n/√p

17 ABC 16 processes each represented by a different color. Different portions of the nxn matrices are divided among these processes. BUT! To compute C i,j we need all sub-matrices A i,k and B k,j for 0<=k<√p

18 To compute Ci,j we need all sub-matrices Ai,k and Bk,j for 0<=k<√p §All to all broadcast of matrix A’s blocks in each row. §All to all broadcast of matrix B’s blocks in each column