PARALLELIZATION OF MULTIPLE BACKSOLVES James Stanley April 25, 2002 Project #2.

Slides:



Advertisements
Similar presentations
1 CS 162 Introduction to Computer Science Chapter 7 Matrix Manipulation Herbert G. Mayer, PSU Status 9/21/2014.
Advertisements

Which augmented matrix represents the following system of equations?
1.5 Elementary Matrices and a Method for Finding
Matrix Definition: An array of numbers in m rows and n colums is called an mxn matrix A square matrix of order n, is an (nxn) matrix.
Lecture 9: Introduction to Matrix Inversion Gaussian Elimination Sections 2.4, 2.5, 2.6 Sections 2.2.3, 2.3.
Refresher: Vector and Matrix Algebra Mike Kirkpatrick Department of Chemical Engineering FAMU-FSU College of Engineering.
Mathematics. Matrices and Determinants-1 Session.
Matrices & Systems of Linear Equations
Maths for Computer Graphics
Solving systems using matrices
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 12 System of Linear Equations.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 14 Elimination Methods.
Chapter 2 Matrices Definition of a matrix.
1 Neural Nets Applications Vectors and Matrices. 2/27 Outline 1. Definition of Vectors 2. Operations on Vectors 3. Linear Dependence of Vectors 4. Definition.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 15 Solution of Systems of Equations.
Solution of Simultaneous Linear Equations (AX=B)
ECIV 520 Structural Analysis II Review of Matrix Algebra.
ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW II.
MOHAMMAD IMRAN DEPARTMENT OF APPLIED SCIENCES JAHANGIRABAD EDUCATIONAL GROUP OF INSTITUTES.
Mujahed AlDhaifallah (Term 342) Read Chapter 9 of the textbook
INDR 262 INTRODUCTION TO OPTIMIZATION METHODS LINEAR ALGEBRA INDR 262 Metin Türkay 1.
CE 311 K - Introduction to Computer Methods Daene C. McKinney
3.8 Matrices.
Section 8.1 – Systems of Linear Equations
Chapter 1: Matrices Definition 1: A matrix is a rectangular array of numbers arranged in horizontal rows and vertical columns. EXAMPLE:
Chapter 7 Matrix Mathematics Matrix Operations Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Major: All Engineering Majors Author(s): Autar Kaw
Spring 2013 Solving a System of Linear Equations Matrix inverse Simultaneous equations Cramer’s rule Second-order Conditions Lecture 7.
ECON 1150 Matrix Operations Special Matrices
CHAPTER 2 MATRIX. CHAPTER OUTLINE 2.1 Introduction 2.2 Types of Matrices 2.3 Determinants 2.4 The Inverse of a Square Matrix 2.5 Types of Solutions to.
A rectangular array of numbers (we will concentrate on real numbers). A nxm matrix has ‘n’ rows and ‘m’ columns What is a matrix? First column First row.
Matrices & Determinants Chapter: 1 Matrices & Determinants.
1 © 2010 Pearson Education, Inc. All rights reserved © 2010 Pearson Education, Inc. All rights reserved Chapter 9 Matrices and Determinants.
Determinants. If is a square matrix of order 1, then |A| = | a 11 | = a 11 If is a square matrix of order 2, then |A| = = a 11 a 22 – a 21 a 12.
ΑΡΙΘΜΗΤΙΚΕΣ ΜΕΘΟΔΟΙ ΜΟΝΤΕΛΟΠΟΙΗΣΗΣ 4. Αριθμητική Επίλυση Συστημάτων Γραμμικών Εξισώσεων Gaussian elimination Gauss - Jordan 1.
Two dimensional arrays in Java Computer Science 3 Gerb Objective: Use matrices in Java.
Company LOGO Chapter 1: Matrix, Determinant, System of linear equations Module 1: Matrix Natural Science Department Example 1: The following rectangular.
Linear algebra: matrix Eigen-value Problems Eng. Hassan S. Migdadi Part 1.
Chapter 5 MATRIX ALGEBRA: DETEMINANT, REVERSE, EIGENVALUES.
Introduction to Matrices and Matrix Approach to Simple Linear Regression.
ES 240: Scientific and Engineering Computation. Chapter 8 Chapter 8: Linear Algebraic Equations and Matrices Uchechukwu Ofoegbu Temple University.
Meeting 18 Matrix Operations. Matrix If A is an m x n matrix - that is, a matrix with m rows and n columns – then the scalar entry in the i th row and.
10.3 Systems of Linear Equations: Matrices. A matrix is defined as a rectangular array of numbers, Column 1Column 2 Column jColumn n Row 1 Row 2 Row 3.
3.6 Solving Systems Using Matrices You can use a matrix to represent and solve a system of equations without writing the variables. A matrix is a rectangular.
Chapter 2 Determinants. With each square matrix it is possible to associate a real number called the determinant of the matrix. The value of this number.
2.5 Determinants and Multiplicative Inverses of Matrices. Objectives: 1.Evaluate determinants. 2.Find the inverses of matrices. 3.Solve systems of equations.
2.5 – Determinants and Multiplicative Inverses of Matrices.
Matrix Multiplication The Introduction. Look at the matrix sizes.
LEARNING OUTCOMES At the end of this topic, student should be able to :  D efination of matrix  Identify the different types of matrices such as rectangular,
Two dimensional arrays A two dimensional m x n array A is a collection of m. n elements such that each element is specified by a pair of integers (such.
4.1 An Introduction to Matrices Katie Montella Mod. 6 5/25/07.
Matrices. Variety of engineering problems lead to the need to solve systems of linear equations matrixcolumn vectors.
CS 285- Discrete Mathematics Lecture 11. Section 3.8 Matrices Introduction Matrix Arithmetic Transposes and Power of Matrices Zero – One Matrices Boolean.
Introduction Types of Matrices Operations
Numerical Computation Lecture 6: Linear Systems – part II United International College.
Matrices and Vector Concepts
nhaa/imk/sem /eqt101/rk12/32
3.1 Introduction to Determinants
Unit 1: Matrices Day 1 Aug. 7th, 2012.
Linear independence and matrix rank
Introduction To Matrices
L5 matrix.
2. Matrix Algebra 2.1 Matrix Operations.
Review of Matrix Algebra
Numerical Analysis Lecture14.
CSE 541 – Numerical Methods
Numerical Analysis Lecture10.
Matrices - Operations TRANSPOSE OF A MATRIX If :
Chapter 2 Determinants.
Presentation transcript:

PARALLELIZATION OF MULTIPLE BACKSOLVES James Stanley April 25, 2002 Project #2

PARALLELIZATION OF MULTIPLE BACKSOLVES Project #2 Introduction (Backsolve) Challenge Example ( m = 5) Problem Description Solution Technique Parallel Implementation Results

Introduction (Backsolve) If R is an upper triangular matrix, a backsolve is a solution of the equation, Rx=b Where b is a vector of length m. The formulas for the solution are

Introduction (Backsolve) cont. m th equation: r mm x m = b m => x m = bmbm r mm ___ m-1 th equation: r m-1,m-1 x m-1 + r m-1,m x m = b m-1 => x m-1 = b m-1 - r m-1, * x m __________________ r m-1 from m th equation

Introduction (Backsolve) cont. i th equation: r ii, x i + r i,i+1 x i+1 + …+ r im, x i = b i, for 0  i  m-1 =>

Challenge Storage: To avoid storing zeros, store n ( n +1)/2 nonzero elements of R 1 in a 1-Dimensional array by rows, and the m ( m +1)/2 Nonzero elements of R 2 in a 1-Dimensional array by rows.

Example Suppose m = 5, then or,

Example cont. Solving for the x i ’s provides in memory 

Problem Description Given RHS matrix H to solve for the nxm unknown matrix Y : R 1 YR 2 T = H Where R 1 is a square upper triangular matrix of order nxn and R 2 is a square upper triangular matrix of order mxm.

Solution Technique (2) Let Z = R 1 Y (1) Then R 1 YR 2 T = ZR 2 T ZR 2 T = H  R 2 Z T = H T Parallel Solution of (1) and (2): (1) R 2 T =H T = (h 1,h 2,…,h n ) (2) R 1 Y = Z = (z 1,z 2,…,z m ) 1 rst solve (1) for the mxn matrix Z T. 2 nd take the Transpose of Z T to get Z. 3 rd solve (2) for the nxm solution matrix Y.

Parallel Implementation 1.Generate H T and R 2, R 1 on Process 0, using a Random Number Generator. 2.Move all of R 2 to all processes with the MPI_BCAST. (If there are p processors, then make sure n/p and m/p are integers. 3.Ship the n/p of the rows of H to each process with MPI_Scatter. 4.On each process solve n/p equations for local Z. 5.Ship all of the columns of Z using MPI_Gather to process 0. 6.Perform the transpose of Z on process 0. 7.Ship m/p of the rows of Z T to each process with MPI_Scatter. 8.On each process solve m/p equations for local Y. 9.Ship all of the m/p columns of local Y to process 0 and print the solution on process 0. Denotes communication time Denotes computation time

Results