Intro to Scientific Libraries Intro to Scientific Libraries Blue Waters Undergraduate Petascale Education Program May 29 – June 10 2011.

Slides:



Advertisements
Similar presentations
Computational Physics Linear Algebra Dr. Guy Tel-Zur Sunset in Caruaru by Jaime JaimeJunior. publicdomainpictures.netVersion , 14:00.
Advertisements

Kaldi’s matrix library
Advanced Computational Software Scientific Libraries: Part 2 Blue Waters Undergraduate Petascale Education Program May 29 – June
Introduction to Parallel Programming & Cluster Computing Scientific Libraries & I/O Libraries Joshua Alexander, U Oklahoma Ivan Babic, Earlham College.
Eigenvalue and eigenvectors  A x = λ x  Quantum mechanics (Schrödinger equation)  Quantum chemistry  Principal component analysis (in data mining)
Solving Linear Systems (Numerical Recipes, Chap 2)
Lecture 17 Introduction to Eigenvalue Problems
High Performance Computing The GotoBLAS Library. HPC: numerical libraries  Many numerically intensive applications make use of specialty libraries to.
1cs542g-term Notes  Assignment 1 will be out later today (look on the web)
1cs542g-term Notes  Assignment 1 is out (questions?)
Jonathan Richard Shewchuk Reading Group Presention By David Cline
Determinants Bases, linear Indep., etc Gram-Schmidt Eigenvalue and Eigenvectors Misc
Rational Trigonometry Applied to Robotics
Symmetric Eigensolvers in Sca/LAPACK Osni Marques
CIS 404: Survey and Use of Software Libraries for Scientific Computing Andrew Pershing 3134 Snee Hall
Ch 7.3: Systems of Linear Equations, Linear Independence, Eigenvalues
LAPACK HTML version LAPACK = Linear Algebra PACKage ~ LINPACK + EISPACK
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Parallel Programming in C with MPI and OpenMP Michael J. Quinn.
1 Systems of Linear Equations (Optional) Special Matrices.
Parallel & Cluster Computing Linear Algebra Henry Neeman, Director OU Supercomputing Center for Education & Research University of Oklahoma SC08 Education.
Antonio M. Vidal Jesús Peinado
® Backward Error Analysis and Numerical Software Sven Hammarling NAG Ltd, Oxford
Supercomputing in Plain English Grab Bag: Scientific Libraries, I/O Libraries, Visualization PRESENTERNAME PRESENTERTITLE PRESENTERDEPARTMENT PRESENTERINSTITUTION.
Libraries Linda Petzold UC Santa Barbara. What is a Library? Library - Wikipedia, the free encyclopedia.mhtLibrary - Wikipedia, the free encyclopedia.mht.
CS 591x – Cluster Computing and Programming Parallel Computers Parallel Libraries.
Tuning Libraries to Effectively Exploit Memory Prof. Misha Kilmer Emily Reid Stacey Ecott.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
Introduction to Parallel Programming & Cluster Computing Scientific Libraries and I/O Libraries Josh Alexander, University of Oklahoma Ivan Babic, Earlham.
Solving Scalar Linear Systems Iterative approach Lecture 15 MA/CS 471 Fall 2003.
High Performance Computing 1 Numerical Linear Algebra An Introduction.
1 Intel Mathematics Kernel Library (MKL) Quickstart COLA Lab, Department of Mathematics, Nat’l Taiwan University 2010/05/11.
Enhancing GPU for Scientific Computing Some thoughts.
1 Jack Dongarra University of Tennesseehttp://
Diagonalization Revisted Isabel K. Darcy Mathematics Department Applied Math and Computational Sciences University of Iowa Fig from knotplot.com.
Supercomputing in Plain English Grab Bag: Scientific Libraries, I/O Libraries, Visualization Henry Neeman, Director OU Supercomputing Center for Education.
Supercomputing in Plain English Scientific Libraries and I/O Libraries National Computational Science Institute Intermediate Parallel Programming & Cluster.
High Performance Computing Modernization Program (HPCMP) Summer 2011 Puerto Rico Workshop on Intermediate Parallel Programming & Cluster Computing in conjunction.
Automatic Performance Tuning Jeremy Johnson Dept. of Computer Science Drexel University.
Supercomputing in Plain English Supercomputing in Plain English Grab Bag Henry Neeman Director OU Supercomputing Center for Education & Research December.
Atlas Graphics Group MeetingDec, 1 The Colt Distribution - Open Source Libraries for High Performance Scientific and Technical.
Lecture 7 - Systems of Equations CVEN 302 June 17, 2002.
Linear algebra: matrix Eigen-value Problems Eng. Hassan S. Migdadi Part 1.
On the Use of Sparse Direct Solver in a Projection Method for Generalized Eigenvalue Problems Using Numerical Integration Takamitsu Watanabe and Yusaku.
Supercomputing in Plain English An Introduction to High Performance Computing Part VII:Grab Bag Henry Neeman, Director OU Supercomputing Center for Education.
Investigating Adaptive Compilation using the MIPSpro Compiler Keith D. Cooper Todd Waterman Department of Computer Science Rice University Houston, TX.
JAVA AND MATRIX COMPUTATION
Linear Algebra Libraries: BLAS, LAPACK, ScaLAPACK, PLASMA, MAGMA
Automatic Parameterisation of Parallel Linear Algebra Routines Domingo Giménez Javier Cuenca José González University of Murcia SPAIN Algèbre Linéaire.
© 2012 Autodesk A Fast Modal (Eigenvalue) Solver Based on Subspace and AMG Sam MurgieJames Herzing Research ManagerSimulation Evangelist.
1. Systems of Linear Equations and Matrices (8 Lectures) 1.1 Introduction to Systems of Linear Equations 1.2 Gaussian Elimination 1.3 Matrices and Matrix.
Supercomputing in Plain English What is a Cluster? Blue Waters Undergraduate Petascale Education Program May 23 – June
Parallel Programming & Cluster Computing Grab Bag: Scientific Libraries, I/O Libraries, Visualization Henry Neeman, University of Oklahoma Charlie Peck,
Performance of BLAS-3 Based Tridiagonalization Algorithms on Modern SMP Machines Yusaku Yamamoto Dept. of Computational Science & Engineering Nagoya University.
Lecture Note 1 – Linear Algebra Shuaiqiang Wang Department of CS & IS University of Jyväskylä
Parallel Programming & Cluster Computing Linear Algebra Henry Neeman, University of Oklahoma Paul Gray, University of Northern Iowa SC08 Education Program’s.
Linear Algebra Libraries: BLAS, LAPACK, ScaLAPACK, PLASMA, MAGMA Shirley Moore CPS5401 Fall 2013 svmoore.pbworks.com November 12, 2012.
First INFN International School on Architectures, tools and methodologies for developing efficient large scale scientific computing applications Ce.U.B.
University of Tennessee Automatically Tuned Linear Algebra Software (ATLAS) R. Clint Whaley University of Tennessee
Supercomputing in Plain English Tuning Blue Waters Undergraduate Petascale Education Program May 29 – June
05/23/11 Evaluation and Benchmarking of Highly Scalable Parallel Numerical Libraries Christos Theodosiou User and Application Support.
A computational loop k k Integration Newton Iteration
Linear Systems, Mainly LU Decomposition
ACCELERATING SPARSE CHOLESKY FACTORIZATION ON GPUs
CS 179 Project Intro.
Results (Accuracy of Low Rank Approximation by iSVD)
Fundamentals of Engineering Analysis
MAT 2401 Linear Algebra 7.2 Diagonalization
Linear Algebra Lecture 30.
Eigenvalues and Eigenvectors
A computational loop k k Integration Newton Iteration
Presentation transcript:

Intro to Scientific Libraries Intro to Scientific Libraries Blue Waters Undergraduate Petascale Education Program May 29 – June

Scientific Libraries BWUPEP2011, UIUC, May 29 - June Matrix Multiplication How would/did you program it? How about parallelizing it? -Hint: N 2 operations that look like “ab+cd” that all can be done independently What is the most efficient way?

Answers to the previous questions How would/did you program it? How about parallelizing it? Supercomputing in Plain English: Apps & Par Types BWUPEP2011, UIUC, May 29 - June Lazy answer #1: You don’t need to do either! What is the most efficient way? Lazy answer #2: It depends.

Explanation of Lazy Answer #1 Solution Quality: Don’t reinvent the wheel Supercomputing in Plain English: Apps & Par Types BWUPEP2011, UIUC, May 29 - June The solution of a large number of very smart people over many years Your solution

Scientific Libraries Loose Definition – A collection of mathematical optimized for various data types, computer architectures, numeric types, and scientific fields of study. Common example: Lapack- linear algebra library Supercomputing in Plain English: Apps & Par Types BWUPEP2011, UIUC, May 29 - June

How to identify your matrix General Matrix – Nothing too special going on with it Banded Matrix – A lines of data going diagonally down the matrix. Tri-diagonal matrix- A 3-width banded matrix Symmetric matrix- Supercomputing in Plain English: Apps & Par Types BWUPEP2011, UIUC, May 29 - June

The Sparse Matrix A larger matrix that is mostly empty. A good rule of thumb is approximately 90% - 95% empty. The opposite of a sparse matrix is a dense matrix. Supercomputing in Plain English: Apps & Par Types BWUPEP2011, UIUC, May 29 - June

BLAS Basic Linear Algebra System Fundamental level of linear algebra libraries Various highly optimized implementations by vendors Many other libraries built on top of BLAS Create your own optimized implementation using ATLAS Three levels: Level 1- Vector-vector operations - Level 2- Matrix-vector operations - Level 3- Matrix-matrix operations – Supercomputing in Plain English: Apps & Par Types BWUPEP2011, UIUC, May 29 - June

ATLAS Automatically Tuned Linear Algebra Software Performs a series of timed tests upon installation. These tests are used to tune the libraries for the individual system. Substantially faster on many systems. Supercomputing in Plain English: Apps & Par Types BWUPEP2011, UIUC, May 29 - June

Atlas Performance Supercomputing in Plain English: Apps & Par Types BWUPEP2011, UIUC, May 29 - June

Lapack Written on top of Basic Linear Algebra Subprograms (BLAS) Incorporates/retools EISPACK (eigenvalues) and LINPACK (least squares) Optimized for most modern shared memory architectures Supercomputing in Plain English: Apps & Par Types BWUPEP2011, UIUC, May 29 - June Eigenvalue = Eigenvector

Why LAPACK? Widely available. Lots of documentation and examples. Easy to use. Mostly preinstalled and tuned on most computers. Many versions are tuned for shared memory architectures. Since it is built on top of your BLAS installation, it’ll perform at least as well as BLAS. Supercomputing in Plain English: Apps & Par Types BWUPEP2011, UIUC, May 29 - June

Beginner’s Guide to LAPACK First step: Install LAPACK -May involve installing BLAS first (Optional activity!) Supercomputing in Plain English: Apps & Par Types BWUPEP2011, UIUC, May 29 - June #1 RULE – Documentation is your friend!!

Beginner’s Guide to LAPACK Second step- Look up what you want to do. -Handy naming scheme: Supercomputing in Plain English: Apps & Par Types BWUPEP2011, UIUC, May 29 - June GEGeneral Matrix DIDiagonal Matrix GBGeneral Band Matrix GTTridiagonal Matrix HBHermitian Band matrix SYSymmetric matrix TRFFactorize TRSSolve TRIInvert RFSError bounds SReal DDouble CComplex ZComplex Double Data type + Matrix Type + Problem Not all subroutines have handy naming scheme. USE DOCUMENTATION

EXAMPLES Simple LAPACK call- DGEMM A bunch of calls repeated 1000 times Bonus demo-Difficult part of libraries! Supercomputing in Plain English: Apps & Par Types BWUPEP2011, UIUC, May 29 - June

Leading dimensions? Supercomputing in Plain English: Apps & Par Types BWUPEP2011, UIUC, May 29 - June You have this: You want to perform an operation on this: LDA = M This occurs the most LDA = 3 M=2 N=2

General “ Don’t ”s Don’t invert a matrix if it can be avoided. It is computationally very expensive. Figure out a way around it. Don’t write your own solvers. If it is a common mathematical operation, someone else most likely spent a lot of time and effort solving for the most efficient method. Don’t attempt to use a library without consulting the documentation and attempting a few example problems. Don’t attempt to program a solution (especially with libraries) if you don’t understand the problem’s mathematics/science! Supercomputing in Plain English: Apps & Par Types BWUPEP2011, UIUC, May 29 - June

Preview: Next Week DOE ACTs collection: 2 nd lazy answer- How do we decide what to use to optimize efficiency? Supercomputing in Plain English: Apps & Par Types BWUPEP2011, UIUC, May 29 - June ScaLAPACK