Spectrum Slicing SLEPc Evaluation
Strategies for Spectrum Slicing Based on Restarted Lanczos Methods - - PowerPoint PPT Presentation
Strategies for Spectrum Slicing Based on Restarted Lanczos Methods - - PowerPoint PPT Presentation
Spectrum Slicing SLEPc Evaluation Strategies for Spectrum Slicing Based on Restarted Lanczos Methods Carmen Campos and Jose E. Roman Universitat Polit` ecnica de Val` encia, Spain SC2011 Spectrum Slicing SLEPc Evaluation Goal Context:
Spectrum Slicing SLEPc Evaluation
Goal
Context: symmetric-definite generalized eigenvalue problem Ax = λBx B ≥ 0 Eigenvalues are real: λ1 ≤ λ2 ≤ . . . ≤ λn Very large, sparse matrices → iterative solvers, parallel computing, small part of the spectrum Computational interval
◮ In many applications: structures, electromagnetism, etc. ◮ All eigenvalues in a given interval [a, b] (a or b must be finite) ◮ Do not miss eigenvalues (could be 1000’s) ◮ Determine multiplicity correctly (could be as high as 400)
Spectrum Slicing SLEPc Evaluation
Outline
1
Spectrum Slicing Related work Proposed variants
2
SLEPc Overview of SLEPc Implementation of Spectrum Slicing
3
Evaluation
Spectrum Slicing SLEPc Evaluation
Spectral Transformation
The spectral transformation [Ericsson & Ruhe 1980] enables Lanczos methods to compute interior eigenvalues Ax = λBx = ⇒ (A − σB)−1Bx = θx
◮ Trivial mapping of eigenvalues: θ = (λ − σ)−1 ◮ Eigenvectors are not modified ◮ Very fast convergence close to σ
Things to consider:
◮ Implicit inverse (A − σB)−1 via linear solves ◮ Direct linear solver for robustness ◮ Less effective for eigenvalues far away from σ
Spectrum Slicing SLEPc Evaluation
Spectrum Slicing
Indefinite (block-)triangular factorization: A − σB = LDLT By Sylvester’s law of inertia, we get as a byproduct the number of eigenvalues on the left of σ ν(A − σB) = ν(D) Spectrum slicing
◮ Multi-shift approach that sweeps all the interval ◮ Compute eigenvalues by chunks ◮ Use inertia to validate sub-intervals
a b σ1 σ2 σ3
Spectrum Slicing SLEPc Evaluation
Spectrum Slicing: Grimes et al. Approach
Grimes et al. [1994] proposed an “industrial strength” scheme
◮ Block Lanczos, with blocksize depending on multiplicity ◮ B-orthogonalization, partial and external selective reorthog. ◮ Create an initial trust interval, extend it until finished ◮ Unrestarted Lanczos, tracking eigenvalue convergence
Choice of new shift:
◮ Asumes there are as many eigenvalues around σi and σi+1 ◮ Uses non-converged Ritz approximations if available ◮ Sometimes need to fill-in gaps
Deflation with sentinel mechanism:
◮ Deflation against (at least) one vector from previous shift ◮ Goal: orthogonality in clusters, suppress eigenvectors most
likely to reappear
Spectrum Slicing SLEPc Evaluation
Grimes et al.: Potential Pitfalls
Possible problems of Grimes et al. approach:
◮ Exploits a priori knowledge of multiplicity ◮ Assumes all multiplicities are of same rank ◮ Block size cannot be arbitrarily large, difficulties with high
multiplicities
◮ Irregular spectra produce bad choice of shifts, with big gaps ◮ Wasteful work: many repeated eigenvalues are discarded
Using an unrestarted block Lanczos has strong implications on heuristics
Spectrum Slicing SLEPc Evaluation
New Context: Restarted Lanczos
Now we have restarted Lanczos methods
◮ Thick-restart Lanczos [Wu et al. 1999] ◮ Equivalent to implicit-restart Lanczos, or symm. Krylov-Schur
New assumptions:
◮ Lanczos convergence is not a problem; also multiple eigs. ◮ Orthogonalization is relatively cheap and scales very well ◮ Performance of factorization degrades with n ◮ Triangular solves are not scalable in parallel
Goal: spectrum slicing technique that can be robust enough for irregular spectra with high multiplicity, scalable to 100’s processors Strategy: avoid new shifts by orthogonalizing more
Spectrum Slicing SLEPc Evaluation
Proposed Method (1)
Main idea: At each shift σi request fixed number of eigenvalues (nev), with a limited number of restarts (maxit) Selection of new shift σi+1:
◮ Cannot rely on approximate Ritz values ◮ Separation of eigenvalues computed at σi is not reliable ◮ Use average eigenvalue separation in [σi−1, σi]
Backtrack: if number of eigenvalues computed in [σi−1, σi] does not match inertia, create a new shift somewhere inbetween
◮ All eigenvectors available in [σi−1, σi] are deflated ◮ Guarantees orthogonality of eigenvectors of multiples/clusters
Spectrum Slicing SLEPc Evaluation
Proposed Method (2)
Deflation
◮ Avoid reappearance of already computed eigenvalues ◮ Also allow missing multiples to arise ◮ Two options (flag defl):
- 1. At σi+1, deflate all eigenvectors available in [σi, σi+1]
- 2. Minimal deflation, with sentinels similar to Grimes
If possible, avoid backtracking
◮ A new factorization to compute a few eigenvalues is wasteful ◮ Parameter compl: try to complete interval if missing
eigenvalues less or equal than compl
Spectrum Slicing SLEPc Evaluation
Proposed Method (3)
With backtracking
◮ nev=10, maxit=10, with deflation
a b σ1 σ2 σ3 σ4 Avoiding backtracking
◮ nev=10, maxit=10, with deflation, compl=5
a b σ1 σ2 σ3
Spectrum Slicing SLEPc Evaluation
SLEPc: Scalable Library for Eigenvalue Problem Computations A general library for solving large-scale sparse eigenproblems on parallel computers
◮ For standard and generalized eigenproblems ◮ For real and complex arithmetic ◮ For Hermitian or non-Hermitian problems ◮ Also support for SVD and QEP
Ax = λx Ax = λBx Avi = σiui (λ2M+λC+K)x = 0 Developed at U. Polit` ecnica de Val` encia since 2000 http://www.grycap.upv.es/slepc Current version: 3.1 (released Aug 2010)
Spectrum Slicing SLEPc Evaluation
PETSc/SLEPc Numerical Components
PETSc
Vectors
Standard CUSP
Index Sets
Indices Block Stride Other
Matrices
Compressed Sparse Row Block CSR Symmetric Block CSR Dense CUSP Other
Preconditioners
Additive Schwarz Block Jacobi Jacobi ILU ICC LU Other
Krylov Subspace Methods
GMRES CG CGS Bi-CGStab TFQMR Richardson Chebychev Other
Nonlinear Systems
Line Search Trust Region Other
Time Steppers
Euler Backward Euler Pseudo Time Step Other
SLEPc
SVD Solvers
Cross Product Cyclic Matrix Lanczos Thick R. Lanczos
Quadratic
Linear- ization Q-Arnoldi
Eigensolvers
Krylov-Schur Arnoldi Lanczos GD JD Other
Spectral Transformation
Shift Shift-and-invert Cayley Fold Preconditioner
Spectrum Slicing SLEPc Evaluation
m-step Lanczos Method
Computes Vm and Tm
◮ M = (A − σB)−1B ◮ Vm is a basis of the Krylov space Km(M, v1), V T mBVm = I ◮ Tm = V ∗ mBMVm provides Ritz approximations, (˜
θi, Vmyi) for j = 1, 2, . . . , m w = Mvj t1:j,j = V ∗
j Bw
w = w − Vjt1:j,j tj+1,j = wB vj+1 = w/tj+1,j end Orthogonalization:
◮ Full B-orthogonalization ◮ Do not bother about partial
reorthog.
◮ SLEPc uses iterated CGS
but MGS also available Use MUMPS for (A − σB)−1 = L−T D−1L−1, get inertia info
Spectrum Slicing SLEPc Evaluation
Symmetric Krylov-Schur
A restarting mechanism that filters out unwanted eigenvectors
- 1. Build Lanczos factorization of order m
- 2. Diagonalize projected matrix
- 3. Check convergence, sort
- 4. Truncate to a factorization of order p
- 5. Extend to a factorization of order m
- 6. If not finished, go to step 2
Vm vm+1 Sm b∗
m+1
˜ Vp vm+1 ˜ Sp ˜ b∗
p
˜ Vp vm+1 ˜ Sp ˜ b∗
p
For spectrum slicing, the basis expansion needs to orthogonalize also against an arbitrary set of vectors Restarts until nev converged eigenvalues (or subinterval complete)
Spectrum Slicing SLEPc Evaluation
Computing Platform
IBM BladeCenter cluster with Myrinet interconnect
◮ 256 JS20 nodes ◮ Two 64-bit PowerPC 970+ @ 2.2 GHz processors ◮ 4 GB memory per node (1 TB total)
Tests with up to 128 MPI processes (2 per node)
Spectrum Slicing SLEPc Evaluation
Test Case: Aircraft Fuselage
Simplified but realistic model: cylinder with skin, frames, and stringers Parametric, “scalable”
First vibration mode (5.34 Hz)
Spectrum Slicing SLEPc Evaluation
Test Case: Matrix Properties
Analysis of frequency range [0–60] Hz 1 million dof’s
◮ Dimension: 1,036,698 ◮ Nonzeros: ∼29 million ◮ Eigenvalues in interval: 1989
2 million dof’s
◮ Dimension: 2,141,646 ◮ Nonzeros: ∼59 million ◮ Eigenvalues in interval: 2039
Maximum multiplicity: 2 B is singular
Spectrum Slicing SLEPc Evaluation
Evaluation: Solver Parameters
1 million, 16 processors
nev maxit defl comp Shifts Rest Its Time 80 10 1
- 22
36 5,109 11,074 80 10 1 40 17 35 4,696 9,978 80 10
- 33
48 7,021 14,251 120 10 1
- 14
23 4,874 10,770 120 10 1 50 13 27 4,565 10,125 120 10
- 21
29 6,417 13,052 Unrest., 300 vecs, no defl. 22
- 6,622
13,305
2 million, 32 processors
nev maxit defl comp Shifts Rest Its Time 80 5 1 40 20 40 5,200 14,833 80 5
- 30
47 6,740 18,235 120 5 1 50 12 23 4,500 13,389 120 5
- 24
33 7,290 19,659 Unrest., 300 vecs, no defl. 24
- 7,224
18,605
Spectrum Slicing SLEPc Evaluation
Evaluation: Parallel Performance
1 million, nev=120
p Shft Rest Its Time Num. Sym. Tri. Orth. 8 12 21 4,318 16,399 3,153 594 5,270 6,218 16 13 27 4,565 10,125 1,739 595 4,277 3,364 32 10 21 4,101 5,500 519 653 2,839 1,428 64 12 22 4,338 4,064 375 654 2,482 580 128 12 20 4,155 3,394 273 596 2,265 245
2 million, nev=120
p Shft Rest Its Time Num. Sym. Tri. Orth. 32 13 24 4,873 14,429 2,012 1,691 6,536 3,902 64 12 22 4,472 9,120 922 1,697 4,886 1,263 128 12 23 4,501 7,817 707 1,692 4,709 668
Spectrum Slicing SLEPc Evaluation
Conclusion
We have developed a robust spectrum slicing method, can cope with high multiplicities
◮ Based on previous work by Grimes et al. ◮ Main focus on restarted Lanczos methods ◮ Our heuristics tend to favour scalability
Evaluation
◮ 4 times faster than plain shift-and-invert ◮ Compared to Grimes et al., 30-40% gain ◮ Reasonable scalability up to 128 processors
Future work
◮ Improve scalability by splitting in subcommunicators (similar
to [Zhang et al. 2007])
Spectrum Slicing SLEPc Evaluation