What’s New for Epetra Michael A. Heroux Sandia National Laboratories Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin.

Slides:



Advertisements
Similar presentations
Conclusion Kenneth Moreland Sandia National Laboratories Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company,
Advertisements

1 EMT 101 – Engineering Programming Dr. Farzad Ismail School of Aerospace Engineering Universiti Sains Malaysia Nibong Tebal Pulau Pinang Week 10.
Vector: Data Layout Vector: x[n] P processors Assume n = r * p
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy under contract.
Ensemble Emulation Feb. 28 – Mar. 4, 2011 Keith Dalbey, PhD Sandia National Labs, Dept 1441 Optimization & Uncertainty Quantification Abani K. Patra, PhD.
Chapter 2 Matrices Finite Mathematics & Its Applications, 11/e by Goldstein/Schneider/Siegel Copyright © 2014 Pearson Education, Inc.
Maths for Computer Graphics
CSCI 317 Mike Heroux1 Sparse Matrix Computations CSCI 317 Mike Heroux.
General Computer Science for Engineers CISC 106 Lecture 08 Dr. John Cavazos Computer and Information Sciences 2/27/2009.
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.
Matrix Definition A Matrix is an ordered set of numbers, variables or parameters. An example of a matrix can be represented by: The matrix is an ordered.
Table of Contents Matrices - Multiplication Assume that matrix A is of order m  n and matrix B is of order p  q. To determine whether or not A can be.
Fundamentals of matrices
CE 311 K - Introduction to Computer Methods Daene C. McKinney
1 Chapter 3 Matrix Algebra with MATLAB Basic matrix definitions and operations were covered in Chapter 2. We will now consider how these operations are.
Matrix Solution of Linear Systems The Gauss-Jordan Method Special Systems.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear.
Epetra Concepts Data management using Epetra Michael A. Heroux Sandia National Laboratories Sandia is a multiprogram laboratory operated by Sandia Corporation,
Page 1 Trilinos Software Engineering Technologies and Integration Capability Area Overview Roscoe A. Bartlett Department.
Martin Ellison University of Warwick and CEPR Bank of England, December 2005 Introduction to MATLAB.
Sandia National Laboratories is a multi-program laboratory managed and operated by Sandia Corporation, a wholly owned subsidiary of Lockheed Martin Corporation,
Dax: Rethinking Visualization Frameworks for Extreme-Scale Computing DOECGF 2011 April 28, 2011 Kenneth Moreland Sandia National Laboratories SAND P.
SAINT2002 Towards Next Generation January 31, 2002 Ly Sauer Sandia National Laboratories Sandia is a multiprogram laboratory operated by Sandia Corporation,
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear.
Trilinos: From a User’s Perspective Russell Hooper Nov. 7, 2007 SAND P Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed.
PyTrilinos: A Python Interface to Trilinos Bill Spotz Sandia National Laboratories Reproducible Research in Computational Geophysics August 31, 2006.
Large-Scale Stability Analysis Algorithms Andy Salinger, Roger Pawlowski, Ed Wilkes Louis Romero, Rich Lehoucq, John Shadid Sandia National Labs Albuquerque,
Trilinos 101 (Part II) Creating and managing linear algebra data in Trilinos: Data management using Epetra and Teuchos Michael A. Heroux Sandia National.
Trilinos 101: Getting Started with Trilinos November 6, :30-9:30 a.m. Jim Willenbring Mike Heroux (Presenter)
After step 2, processors know who owns the data in their assumed partitions— now the assumed partition defines the rendezvous points Scalable Conceptual.
Strategies for Solving Large-Scale Optimization Problems Judith Hill Sandia National Laboratories October 23, 2007 Modeling and High-Performance Computing.
An Overview of Epetra Michael A. Heroux Sandia National Labs.
CS717 Algorithm-Based Fault Tolerance Matrix Multiplication Greg Bronevetsky.
LAMMPS Users’ Workshop
Danny Dunlavy, Andy Salinger Sandia National Laboratories Albuquerque, New Mexico, USA SIAM Parallel Processing February 23, 2006 SAND C Sandia.
ENG College of Engineering Engineering Education Innovation Center 1 Array Accessing and Strings in MATLAB Topics Covered: 1.Array addressing. 2.
Scalable Linear Algebra Capability Area Michael A. Heroux Sandia National Laboratories Sandia is a multiprogram laboratory operated by Sandia Corporation,
New Features in ML 2004 Trilinos Users Group Meeting November 2-4, 2004 Jonathan Hu, Ray Tuminaro, Marzio Sala, Michael Gee, Haim Waisman Sandia is a multiprogram.
1 Stratimikos Unified Wrapper to Trilinos Linear Solvers and Preconditioners Roscoe A. Bartlett Department of Optimization & Uncertainty Estimation Sandia.
Epetra Tutorial Michael A. Heroux Sandia National Laboratories
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy’s National Nuclear.
>> x = [ ]; y = 2*x y = Arrays x and y are one dimensional arrays called vectors. In MATLAB all variables are arrays. They allow functions.
Trilinos 102: Advanced Concepts November 7, :30-9:30 a.m. Mike Heroux Jim Willenbring.
STK (Sierra Toolkit) Update Trilinos User Group meetings, 2014 R&A: SAND PE Sandia National Laboratories is a multi-program laboratory operated.
EGR 115 Introduction to Computing for Engineers Formatted File Input / Output Wednesday 12 Nov 2014 EGR 115 Introduction to Computing for Engineers.
How to Multiply Two Matrices. Steps for Matrix Multiplication 1.Determine whether the matrices are compatible. 2.Determine the dimensions of the product.
Trilinos Strategic (and Tactical) Planning Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United.
Page 1 CMake Trilinos? Roscoe A. Bartlett Department of Optimization & Uncertainty Estimation Esteban J. Guillen Department.
Photos placed in horizontal position with even amount of white space between photos and header Sandia National Laboratories is a multi-program laboratory.
Sec 4.1 Matrices.
1 Lecture 3 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
MapReduce and the New Software Stack. Outline  Algorithm Using MapReduce  Matrix-Vector Multiplication  Matrix-Vector Multiplication by MapReduce 
What is a Matrices? A matrix is a rectangular array of data entries (elements) displayed in rows and columns and enclosed in brackets. The number of rows.
Combining Trilinos Packages To Solve Linear Systems Michael A. Heroux Sandia National Labs.
EGR 115 Introduction to Computing for Engineers Loops and Vectorization – Part 3 Friday 17 Oct 2014 EGR 115 Introduction to Computing for Engineers.
Table of Contents Matrices - Definition and Notation A matrix is a rectangular array of numbers. Consider the following matrix: Matrix B has 3 rows and.
A Parallel Hierarchical Solver for the Poisson Equation Seung Lee Deparment of Mechanical Engineering
4.1 An Introduction to Matrices Katie Montella Mod. 6 5/25/07.
Performing Fault-tolerant, Scalable Data Collection and Analysis James Jolly University of Wisconsin-Madison Visualization and Scientific Computing Dept.
On the Path to Trinity - Experiences Bringing Codes to the Next Generation ASC Platform Courtenay T. Vaughan and Simon D. Hammond Sandia National Laboratories.
A rectangular array of numeric or algebraic quantities subject to mathematical operations. The regular formation of elements into columns and rows.
1 1.3 © 2016 Pearson Education, Ltd. Linear Equations in Linear Algebra VECTOR EQUATIONS.
DOE/Office of Science/ASCR (Sandia National Laboratories)
CSCI N207 Data Analysis Using Spreadsheet
MATRICES MATRIX OPERATIONS.
Matrices.
Linear Algebra review (optional)
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.
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.
Presentation transcript:

What’s New for Epetra Michael A. Heroux Sandia National Laboratories Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy under contract DE-AC04-94AL85000.

Outline  File I/O.  Matlab connection.  2D objects.

Typical Flow of Epetra Object Construction Construct Comm Construct Map Construct x Construct b Construct A Any number of Comm objects can exist. Comms can be nested (e.g., serial within MPI). Maps describe parallel layout. Maps typically associated with more than one comp object. Two maps (source and target) define an export/import object. Computational objects. Compatibility assured via common map.

Trilinos/packages/epetraext/test/inout/ (Part 1) EpetraExt::BlockMapToMatrixMarketFile("Test_map.mm", *map, "Official EpetraExt test map", "This is the official EpetraExt test map generated by the EpetraExt regression tests"); EpetraExt::RowMatrixToMatrixMarketFile("Test_A.mm", *A, "Official EpetraExt test matrix", "This is the official EpetraExt test matrix generated by the EpetraExt regression tests"); EpetraExt::VectorToMatrixMarketFile("Test_x.mm", *x, "Official EpetraExt test initial guess", "This is the official EpetraExt test initial guess generated by the EpetraExt regression tests"); EpetraExt::VectorToMatrixMarketFile("Test_xexact.mm", *xexact, "Official EpetraExt test exact solution", "This is the official EpetraExt test exact solution generated by the EpetraExt regression tests"); EpetraExt::VectorToMatrixMarketFile("Test_b.mm", *b, "Official EpetraExt test right hand side", "This is the official EpetraExt test right hand side generated by the EpetraExt regression tests");

Trilinos/packages/epetraext/test/inout/ (part 2) Epetra_Map * map1; Epetra_CrsMatrix * A1; Epetra_Vector * x1; Epetra_Vector * b1; Epetra_Vector * xexact1; EpetraExt::MatrixMarketFileToMap("Test_map.mm", comm, map1); if (map->SameAs(*map1)) if (verbose) cout << "Maps are equal. In/Out works." << endl; else if (verbose) cout << "Maps are not equal. In/Out fails." << endl; EpetraExt::MatrixMarketFileToCrsMatrix("Test_A.mm", *map1, A1); EpetraExt::MatrixMarketFileToVector("Test_x.mm", *map1, x1); EpetraExt::MatrixMarketFileToVector("Test_xexact.mm", *map1, xexact1); EpetraExt::MatrixMarketFileToVector("Test_b.mm", *map1, b1);

Inout Summary  Reads from/writes to Matlab or Matrix Market compatible files.  Works for any distributed map, matrix, vector or multivector.  If map is read in on the same number of processor it was written to, the map layout will be preserved.

Matlab subpackage in EpetraExt  If you have Matlab, you can:  Put: RowMatrix, SerialDenseVector/Matrix, Vector/MultiVector objects into a Matlab engine.  Send commands to Matlab as strings.  Get: CrsMatrix, SerialDenseVector/Matrix, Vector/MultiVector objects from a Matlab engine.  Supports:  Use of Matlab preconditioner with Trilinos solvers.  Interrogation of Epetra objects in Matlab.  Full support for distributed Epetra objects.  Details in Trilinos/packages/epetraext/doc/matlab.README.

Details about Epetra Maps  Note: Focus on Maps (not BlockMaps).  Getting beyond standard use case…

1-to-1 Maps  1-to-1 map (defn): A map is 1-to-1 if each GID appears only once in the map (and is therefore associated with only a single processor).  Certain operations in parallel data repartitioning require 1- to-1 maps. Specifically:  The source map of an import must be 1-to-1.  The target map of an export must be 1-to-1.  The domain map of a 2D object must be 1-to-1.  The range map of a 2D object must be 1-to-1.

2D Objects: Four Maps  Epetra 2D objects:  CrsMatrix  CrsGraph  VbrMatrix  Have four maps:  RowMap: On each processor, the GIDs of the rows that processor will “manage”.  ColMap: On each processor, the GIDs of the columns that processor will “manage”.  DomainMap: The layout of domain objects (the x vector/multivector in y=Ax).  RangeMap: The layout of range objects (the y vector/multivector in y=Ax). Must be 1-to-1 maps!!! Typically a 1-to-1 map Typically NOT a 1-to-1 map

Sample Problem = yA x

Case 1: Standard Approach  RowMap = {0, 1}  ColMap = {0, 1, 2}  DomainMap = {0, 1}  RangeMap = {0, 1}  First 2 rows of A, elements of y and elements of x, kept on PE 0.  Last row of A, element of y and element of x, kept on PE 1. PE 0 ContentsPE 1 Contents  RowMap = {2}  ColMap = {1, 2}  DomainMap = {2}  RangeMap = {2} Notes:  Rows are wholly owned.  RowMap=DomainMap=RangeMap (all 1-to-1).  ColMap is NOT 1-to-1.  Call to FillComplete: A.FillComplete(); // Assumes = yAx Original Problem

Case 2: Twist 1  RowMap = {0, 1}  ColMap = {0, 1, 2}  DomainMap = {1, 2}  RangeMap = {0}  First 2 rows of A, first element of y and last 2 elements of x, kept on PE 0.  Last row of A, last 2 element of y and first element of x, kept on PE 1. PE 0 ContentsPE 1 Contents  RowMap = {2}  ColMap = {1, 2}  DomainMap = {0}  RangeMap = {1, 2} Notes:  Rows are wholly owned.  RowMap is NOT = DomainMap is NOT = RangeMap (all 1-to-1).  ColMap is NOT 1-to-1.  Call to FillComplete: A.FillComplete(DomainMap, RangeMap); = yAx Original Problem

Case 2: Twist 2  RowMap = {0, 1}  ColMap = {0, 1}  DomainMap = {1, 2}  RangeMap = {0}  First row of A, part of second row of A, first element of y and last 2 elements of x, kept on PE 0.  Last row, part of second row of A, last 2 element of y and first element of x, kept on PE 1. PE 0 ContentsPE 1 Contents  RowMap = {1, 2}  ColMap = {1, 2}  DomainMap = {0}  RangeMap = {1, 2} Notes:  Rows are NOT wholly owned.  RowMap is NOT = DomainMap is NOT = RangeMap (all 1-to-1).  RowMap and ColMap are NOT 1-to-1.  Call to FillComplete: A.FillComplete(DomainMap, RangeMap); = yAx Original Problem

What does FillComplete Do?  A bunch of stuff.  One task is to create (if needed) import/export objects to support distributed matrix-vector multiplication:  If ColMap  DomainMap, create Import object.  If RowMap  RangeMap, create Export object.  A few rules:  Rectangular matrices will always require: A.FillComplete(Domain,RangeMap);  DomainMap and RangeMap must be 1-to-1.

Summary  EpetraExt supports deterministic parallel I/O to/from Matlab and Matrix Market format.  EpetraExt provides a coupling between Matlab/Epetra for:  Prototyping code, e.g., preconditioners, in Matlab and  Injecting Epetra objects into Matlab.  2D objects:  Epetra provides very flexible support for: Placing any matrix entry on any processor, and Even sharing a matrix entry across processors.