A parameter tuning technique of a weighted Jacobi-type preconditioner and its application to supernova simulations

Similar documents
9.1 Preconditioned Krylov Subspace Methods

The amount of work to construct each new guess from the previous one should be a small multiple of the number of nonzeros in A.

Parallel Iterative Methods for Sparse Linear Systems. H. Martin Bücker Lehrstuhl für Hochleistungsrechnen

Variants of BiCGSafe method using shadow three-term recurrence

Performance Evaluation of GPBiCGSafe Method without Reverse-Ordered Recurrence for Realistic Problems

Lecture 11: CMSC 878R/AMSC698R. Iterative Methods An introduction. Outline. Inverse, LU decomposition, Cholesky, SVD, etc.

Solving Symmetric Indefinite Systems with Symmetric Positive Definite Preconditioners

AMS526: Numerical Analysis I (Numerical Linear Algebra) Lecture 23: GMRES and Other Krylov Subspace Methods; Preconditioning

Iterative methods for Linear System of Equations. Joint Advanced Student School (JASS-2009)

Contents. Preface... xi. Introduction...

Iterative Methods and Multigrid

Simple iteration procedure

Multigrid absolute value preconditioning

Iterative Methods for Linear Systems of Equations

Iterative methods for Linear System

Lab 1: Iterative Methods for Solving Linear Systems

The Conjugate Gradient Method

Algebraic Multigrid as Solvers and as Preconditioner

Iterative Methods for Sparse Linear Systems

Fine-Grained Parallel Algorithms for Incomplete Factorization Preconditioning

Lecture 18 Classical Iterative Methods

Formulation of a Preconditioned Algorithm for the Conjugate Gradient Squared Method in Accordance with Its Logical Structure

Stabilization and Acceleration of Algebraic Multigrid Method

Solving Ax = b, an overview. Program

Preface to the Second Edition. Preface to the First Edition

Preconditioned inverse iteration and shift-invert Arnoldi method

Chapter 7 Iterative Techniques in Matrix Algebra

AMS526: Numerical Analysis I (Numerical Linear Algebra)

Lecture 3: Inexact inverse iteration with preconditioning

Solving Sparse Linear Systems: Iterative methods

Solving Sparse Linear Systems: Iterative methods

SOLVING SPARSE LINEAR SYSTEMS OF EQUATIONS. Chao Yang Computational Research Division Lawrence Berkeley National Laboratory Berkeley, CA, USA

ITERATIVE METHODS FOR SPARSE LINEAR SYSTEMS

The flexible incomplete LU preconditioner for large nonsymmetric linear systems. Takatoshi Nakamura Takashi Nodera

In order to solve the linear system KL M N when K is nonsymmetric, we can solve the equivalent system

Chapter 7. Iterative methods for large sparse linear systems. 7.1 Sparse matrix algebra. Large sparse matrices

M.A. Botchev. September 5, 2014

AMS Mathematics Subject Classification : 65F10,65F50. Key words and phrases: ILUS factorization, preconditioning, Schur complement, 1.

Bindel, Fall 2016 Matrix Computations (CS 6210) Notes for

Numerical Methods in Matrix Computations

Motivation: Sparse matrices and numerical PDE's

FEM and sparse linear system solving

JACOBI S ITERATION METHOD

A Domain Decomposition Based Jacobi-Davidson Algorithm for Quantum Dot Simulation

CAAM 454/554: Stationary Iterative Methods

Splitting Iteration Methods for Positive Definite Linear Systems

Inexact inverse iteration with preconditioning

Multilevel low-rank approximation preconditioners Yousef Saad Department of Computer Science and Engineering University of Minnesota

Course Notes: Week 1

A SPARSE APPROXIMATE INVERSE PRECONDITIONER FOR NONSYMMETRIC LINEAR SYSTEMS

On complex shifted Laplace preconditioners for the vector Helmholtz equation

Iterative Solution methods

OUTLINE ffl CFD: elliptic pde's! Ax = b ffl Basic iterative methods ffl Krylov subspace methods ffl Preconditioning techniques: Iterative methods ILU

Conjugate gradient method. Descent method. Conjugate search direction. Conjugate Gradient Algorithm (294)

DELFT UNIVERSITY OF TECHNOLOGY

EIGIFP: A MATLAB Program for Solving Large Symmetric Generalized Eigenvalue Problems

Comparison of Fixed Point Methods and Krylov Subspace Methods Solving Convection-Diffusion Equations

Lecture 17: Iterative Methods and Sparse Linear Algebra

FEM and Sparse Linear System Solving

An Accelerated Block-Parallel Newton Method via Overlapped Partitioning

IDR(s) A family of simple and fast algorithms for solving large nonsymmetric systems of linear equations

Jordan Journal of Mathematics and Statistics (JJMS) 5(3), 2012, pp A NEW ITERATIVE METHOD FOR SOLVING LINEAR SYSTEMS OF EQUATIONS

CME342 Parallel Methods in Numerical Analysis. Matrix Computation: Iterative Methods II. Sparse Matrix-vector Multiplication.

Introduction to Scientific Computing

Topics. The CG Algorithm Algorithmic Options CG s Two Main Convergence Theorems

Parallel Numerics, WT 2016/ Iterative Methods for Sparse Linear Systems of Equations. page 1 of 1

4.6 Iterative Solvers for Linear Systems

The Nullspace free eigenvalue problem and the inexact Shift and invert Lanczos method. V. Simoncini. Dipartimento di Matematica, Università di Bologna

Iterative Methods for Solving A x = b

A parallel exponential integrator for large-scale discretizations of advection-diffusion models

On the Preconditioning of the Block Tridiagonal Linear System of Equations

9. Iterative Methods for Large Linear Systems

arxiv: v1 [hep-lat] 19 Jul 2009

Lecture 17 Methods for System of Linear Equations: Part 2. Songting Luo. Department of Mathematics Iowa State University

arxiv: v2 [math.na] 1 Sep 2016

PROJECTED GMRES AND ITS VARIANTS

Scientific Computing with Case Studies SIAM Press, Lecture Notes for Unit VII Sparse Matrix

A Robust Preconditioned Iterative Method for the Navier-Stokes Equations with High Reynolds Numbers

Multilevel Low-Rank Preconditioners Yousef Saad Department of Computer Science and Engineering University of Minnesota. Modelling 2014 June 2,2014

Numerical Methods I Non-Square and Sparse Linear Systems

Parallel Algorithms for Solution of Large Sparse Linear Systems with Applications

FINE-GRAINED PARALLEL INCOMPLETE LU FACTORIZATION

Algorithms that use the Arnoldi Basis

Notes on Some Methods for Solving Linear Systems

FINE-GRAINED PARALLEL INCOMPLETE LU FACTORIZATION

Incomplete Cholesky preconditioners that exploit the low-rank property

AMS526: Numerical Analysis I (Numerical Linear Algebra)

An advanced ILU preconditioner for the incompressible Navier-Stokes equations

TAU Solver Improvement [Implicit methods]

c 2015 Society for Industrial and Applied Mathematics

Spectral analysis of complex shifted-laplace preconditioners for the Helmholtz equation

Numerical Programming I (for CSE)

Iterative Methods for Ax=b

AMS526: Numerical Analysis I (Numerical Linear Algebra for Computational and Data Sciences)

4.8 Arnoldi Iteration, Krylov Subspaces and GMRES

A METHOD FOR PROFILING THE DISTRIBUTION OF EIGENVALUES USING THE AS METHOD. Kenta Senzaki, Hiroto Tadano, Tetsuya Sakurai and Zhaojun Bai

From Stationary Methods to Krylov Subspaces

Modelling and implementation of algorithms in applied mathematics using MPI

Introduction. Chapter One

Math Introduction to Numerical Analysis - Class Notes. Fernando Guevara Vasquez. Version Date: January 17, 2012.

Transcription:

A parameter tuning technique of a weighted Jacobi-type preconditioner and its application to supernova simulations Akira IMAKURA Center for Computational Sciences, University of Tsukuba Joint work with Tetsuya SAKURAI (University of Tsukuba), Kohsuke SUMIYOSHI (Numazu College of Technology), Hideo MATSUFURU (KEK) 1 / 31

Introduction Today s targets >> Target algorithms -- We consider preconditioning techniques for Krylov subspace methods to solve very large, but sparse, linear systems: where A is assumed to be nonsymmetric and nonsingular. >> Target situation -- The algorithms are used for recent large scale simulations -> high parallel efficiency is recognized as extremely important more than high speed and/or high accuracy 2 / 31

Introduction Today s targets >> Target preconditioner -- Iterative-type preconditioner based on Jacobi iteration, which has high parallel efficiency Today s goals >> Introduce a weighted Jacobi-type iteration as an improvement of the Jacobi iteration >> Propose a parameter tuning technique for the weighted Jacobi-type iteration used for preconditioners >> Evaluate the performance of the parameter tuning technique on the supernova simulation 3 / 31

Outline Introduction Weighted Jacobi-type iteration used for preconditioners >> Krylov subspace methods and preconditioners >> Weighted Jacobi-type iteration Parameter tuning technique Numerical experiments and results Conclusions 4 / 31

Krylov subspace methods Krylov subspace method >> Basic ideal: -- Projection-type iterative method based on the Krylov subspace >> Rough sketch (initial guess: ) 5 / 31

Preconditioners Preconditioners for Krylov subspace methods >> Convergence of Krylov subspace methods Convergence rate depend on eigenvalues distribution >> Preconditioners (in order to improve convergence rate) Distribution of eigenvalues Convergence history Im Re relative residual norm Number of iteration 6 / 31

Krylov method Preconditioners How to apply preconditioners A x = x 0 x 1 x 2 x k-1 x k Computation of 1 iter. (MatVec + DOTs, AXPYs) b Preconditioned Krylov method Pre-processing = A K -1 y b, x = y 0 y 1 y k K -1 Computation of 1 iter. Post-processing (MatVec + Solve K s system + DOTs, AXPYs) y 7 / 31

Preconditioners Classification of preconditioners >> Direct-type preconditioners -- Construct or by direct method such that and can be solved efficiently -- In each iteration, systems is solved Good point: small iteration cost Bad point: large pre-processing cost, large memory >> Iterative-type preconditioners -- Do not construct or -- In each iteration, instead of solving, solve roughly by some iterative method Good point: small memory, small or no pre-processing cost --> Efficient for recent large scale simulations Bad point: have many parameters 8 / 31

Weighted Jacobi-type iteration Stationary iterative methods >> Recurrence formula ( ) >> Convergence rate Standard stationary iterative methods Convergence M Iteration costs N Parallelization Jacobi Bad Good Good Gauss-Seidel Good Good Bad SOR Bad -- Excellent Good Bad 9 / 31

Weighted Jacobi-type iteration Weighted Jacobi iteration >> Basic ideal: Weighted Jacobi iteration transforms the Jacobi s recurrence formula: into by using a weight parameter convergence rate of Jacobi iteration. in order to improve the 10 / 31

Weighted Jacobi-type iteration Weighted Jacobi-type iteration >> Basic ideal: Weighted Jacobi-type iteration transforms the recurrence formula of the weighted Jacobi iteration: into by using some nonsingular scaling diagonal matrix in order to improve the convergence rate without loss of its parallel efficiency. Optimal ω and D are different with respect to each problems --> PARAMETER TUNING TECHNIQUE IS STRONGLY REQUIRED!! 11 / 31

Outline Introduction Weighted Jacobi-type iteration used for preconditioners Parameter tuning technique >> Convergence analysis >> Proposal for parameter tuning technique Numerical experiments and results Conclusions 12 / 31

Convergence analysis Convergence of the weighted Jacobi-type iteration Weighted Jacobi-type iteration can also be recognized as the stationary iterative method with the initial matrix partition: and its convergence rate can be estimated by We analyze 13 / 31

Convergence analysis Convergence theorem of weighted Jacobi-type method Theorem: Optimal weight parameter Let be the inner region of the circle with center and radius on the complex plane, and let be defined by Then we have 14 / 31

Convergence analysis Convergence theorem of weighted Jacobi-type method Remark: Eigenvalue distribution and Optimal parameter Distribution of Weight parameter can be be optimized by by eigenvalue extreme eigenvalues distribution 15 / 31

Parameter tuning technique Parameter tuning technique >> Basic ideal: Offline tuning -- ω and D are tuned before the algorithm runs. Input Initial guess Choice of diagonal matrices Preconditioned Parameter tuning Krylov 1: Run For weighted i = 1, 2, Jacobi-type preconditined 2: Krylov Optimize subspace method and get with from approx. extreme eigenvalues 3: End For 4: Select the best pair s.t. Run weighted Jacobi-type preconditined Preconditioned Krylov subspace method with tuned pair, Krylov 16 / 31

Parameter tuning technique Algorithm of parameter tuning technique >> Approx. eigenvalues are computed by the Arnoldi method >> Iteration of Arnoldi method is stopped by relative error of ω Parameter tuning 1: For i = 1, 2,, s 2: For l = 1, 2,, lmax 3: Operate lth step of the Arnoldi method and get l approx. extreme eigenvalues 4: Compute and from computed eigenvalues 5: IF then exit 6: End For 7: Set 8: End For 9: Select the best pair s.t. 17 / 31

Outline Introduction Weighted Jacobi-type iteration used for preconditioners Parameter tuning technique Numerical experiments and results >> Evaluation of the quality of the parameter tuning >> Evaluation of the performance of the preconditioner >> Evaluation of the performance for real application Conclusions 18 / 31

Numerical experiments I Purpose: Evaluation of quality of parameter tuning for ω Test matrices >> CAVITY05 n = 1182 Fluid dynamics >> FLOWMETER5 n = 9669 Model reduction >> RAEFSKY2 n = 3242 Fluid dynamics >> SHERMAN5 n = 3312 Fluid dynamics Experimental condition >> OS: CentOS, CPU: Intel Xeon X5550 (2.67GHz), Memory: 48GB >> Compiler: GNU Fortran ver.4.1.2, Compile option: -O3 19 / 31

Numerical results I Convergence history of ω >> CAVITY05 Computed weight parameter Optimal weight parameter True Relative Error Relative Error Number of iterations of the Arnoldi method l 20 / 31

Numerical results I Convergence history of ω >> CAVITY05 >> FLOWMETER5 Computed weight parameter Optimal weight parameter Computed weight parameter Optimal weight parameter True Relative Error True Relative Error Relative Error Relative Error >> RAEFSKY2 >> SHERMAN5 Computed weight parameter Optimal weight parameter Computed weight parameter Optimal weight parameter True Relative Error True Relative Error Relative Error Relative Error 21 / 31

Numerical experiments II Purpose: Evaluation of performance of preconditioner Comparison >> with the tuned parameters >> with the default parameters (same as Jacobi iteration) Test matrices (in addition to matrices used in experiments I) >> AF23560 n = 23560 Fluid dynamics >> CHIPCOOL0 n = 20082 Model reduction >> EPB2 n = 25228 Thermal problem >> FEM_3D_THERMAL2 n = 147900 Thermal problem >> POISSON3DA n = 13514 Fluid dynamics >> POISSON3DB n = 85623 Fluid dynamics >> XENON1 n = 48600 Materials problem >> XENON2 n = 157464 Materials problem 22 / 31

Numerical experiments II Other settings >> >> Krylov subspace method: full-gmres method >> Stopping criterion for Krylov method: >> Stopping criterion for Arnoldi method: >> Number of weighted Jacobi-type iteration: 20 >> Choice of scaling diagonal matrices: 23 / 31

Numerical results II # of iteration and Computation time [sec.] 0.4 0.3 0.2 0.1 0.0 : Krylov iteration : tuning >> CAVITY05 >> FLOWMETER5 10.0 5.0 0.0 Non Jacobi Proposed Non Jacobi Proposed 1.0 0.5 0.0 1.5 1.0 0.5 0.0 Did not converged Non Jacobi Proposed ITER 471 64 42 ITER -- 82 140 >> RAEFSKY2 >> SHERMAN5 Did not converged Non Jacobi Proposed ITER 389 750 50 ITER -- 363 47 24 / 31

Numerical results II # of iteration and Computation time [sec.] 10.0 >> AF23560 >> CHIPCOOL0 5.0 0.0 15.0 10.0 5.0 0.0 Did not converged Did not converged Non Jacobi Proposed Non Jacobi Proposed 2.0 1.5 1.0 0.5 0.0 60.0 40.0 20.0 0.0 Did not converged : Krylov iteration : tuning Non Jacobi Proposed ITER -- -- 259 ITER -- 49 63 >> EPB2 >> FEM_3D_THERMAL2 Did not converged Non Jacobi Proposed ITER 650 39 36 ITER 492 -- 11 25 / 31

Numerical results II # of iteration and Computation time [sec.] 6.0 4.0 2.0 0.0 : Krylov iteration : tuning >> POISSON3DA >> POISSON3DB 30.0 20.0 10.0 0.0 Non Jacobi Proposed Non Jacobi Proposed 100.0 50.0 0.0 150.0 100.0 50.0 0.0 Did not converged Non Jacobi Proposed ITER 184 293 31 ITER 848 -- 66 >> XENON1 >> FEM_3D_THERMAL2 Did not converged Did not converged Did not converged Did not converged Non Jacobi Proposed ITER -- -- 284 ITER -- -- 383 26 / 31

Numerical experiments III Purpose: Evaluation of performance for real application Target simulation >> 3D supernova simulation -- Time evolution : Implicit method It is required to solve very large, but sparse, linear systems (n 16 million, Nnz 1.28 billion, Nnz/n 80) -- Required time evolution : t = 1 [sec.] Larger time step (Δt) is required (Δt 10-5 [sec.]) -- Larger Δt leads to more ill-conditioned systems Compared with >> Jacobi preconditioner >> Diagonal scaling 27 / 31

Numerical experiments III Other settings >> Krylov subspace methods: Bi-CGSTAB >> Iteration for preconditioner : 20 >> Cutoff parameter : 0.01 >> Diagonal matrix : Experimental condition >> KEK SR16000/M1 -- 1 node 32 cores (logical 64 cores) 28 / 31

Numerical results III Numerical results >> Time step (Δt) v.s. number of iterations -- Bi-CGSTAB with Diagonal scaling / Proposed preconditioner Number of iterations Can solve 100 times larger Δt with almost the same number of iteration Time step (Δt) >> Computation time -- Diagonal scaling: 0.3 [sec.] / iter -- Proposed: 3.0 [sec.] / iter (parameter tuning: 9.0 [sec.]) 29 / 31

Outline Introduction Weighted Jacobi-type iteration used for preconditioners Auto-tuning technique Numerical experiments and results Conclusions 30 / 31

Conclusion Conclusion >> In this presentation, we have -- introduced a weighted Jacobi-type iteration -- proposed a parameter tuning technique >> From our numerical experiments, we have leaned that our tuning technique well played for solving linear systems. Further investigation >> Further improvement of the parameter tuning technique -- Evaluate the parallel efficiency -- Apply to other application, and evaluate its efficiency 31 / 31