Docsity

Parallel Threshold-based Incomplete LU Factorization - Lecture Slides | CS 591, Lab Reports of Computer Science

Partial preview of the text

Download Parallel Threshold-based Incomplete LU Factorization - Lecture Slides | CS 591 and more Lab Reports Computer Science in PDF only on Docsity!

Parallel Threshold-basedIncomplete LU Factorization

(ILUT)

Work done summer 1997

Lawrence Livermore National Lab

Based on work done by

George Karypis and Vipin Kumar (UMN)

Mark GatesUniversity of Illinois

Outline^ Motivation^ GMRES overview^ ILU(0) and ILUT overview^ Parallel implementation

GMRES^ Based on Arnoldi iteration^ Krylov subspace^ K

= [n b, Ab, A

2 b, A

3 b, ...A

n−^1 b]

Arnoldi method forms orthonormal basis

Qfor Krylovn^

subspace K=n^

QRn

n

Approximate the solution by

x∈n^

span

(K)n

that

minimizes the residual

=^ b^

−^ Ax

n

Least squares solution of AKn

y^ =^ b x^ =^ K

yn

Basic GMRES algorithm^ Solve

Ax^ =

b

GMRES( A, b ) q=^1

b/|b|

for n = 1, 2, ...

v^ =^ Aq

n

for j = 1 to n

h=jn^

T qvj^ v^ =^ v

−^ hjn

qj

hn+

=^ ,n |v| qn+^

=^ v/h

n+1,n

Solve

Hyn

=^ |b

|efor^1

y

x=n^

Qyn

Spectrum examples^ A “good” spectrum–eigenvalues clustered near 2^ A^ = 2

I^ + 0

.^5 randn

√(n)/ n

−0.5^0

0.5^1

1.5^2

(^1) 0.5 (^0) −0.5 −

A "good" spectrum

0 2

4 6

8 10 12

14 16

18 20

0 10 −2 10 −4 10 −6 10 −8 10 −10 10 −12 10 −14 10

Convergence of "good" spectrum Iterations Residual

Spectrum examples^ A “bad” spectrum–eigenvalues surround origin′^ A=

A^ +

D^ where diagonal

d= (k^

−2 + 2 sin

θ) +k

i^ cos

θk

θ=k^

kπ/(

m^ −^

−0.5^0

0.5^1

1.5^2

(^1) 0.5 (^0) −0.5 −

A "bad" spectrum^ un−conditioned^ diagonal preconditioned

0 10

20 30

40 50

60 70

80 90

0 10 −2 10 −4 10 −6 10 −8 10 −10 10 −12 10 −14 10

Convergence of a "bad" spectrum Iterations Residual

un−conditioned diagonally preconditioned

(example from Trefethen)

Incomplete LU Factorization (ILU)^ For sparse matrix, Gaussian elimination introducesmany

non-zeros (fill)

ILU(0) ignores all fill–it has exactly same sparsitystructure as A ILUT allows fill that is

>^ threshold parameter

Can also have

m^ parameter to keep only

m^ largest

values per row (Saad) Allowing fill makes ILUT better approximation to

A

−^1 M

A^ has better spectral properties and GMRES

converges more quickly

ILU(0) vs. ILUT^ Discrete Laplacian on 2D grid

0 1 2

3 4

5 6 7

8 9

10

−4^ x 10 (^1 0) −

Spectrum of Laplacian^ un−conditioned^ ILUT(1e−4) preconditioned^ ILU(0) preconditioned

0 5

10 15

20 25

30 35

40 45

0 10 −2 10 −4 10 −6 10 −8 10 −10 10 −12 10 −14 10

Convergence of Laplacian Iterations Residual

un−conditioned ILUT(1e−4) preconditioned ILU(0) preconditioned

0.93 sec to solve

A^ using Gaussian elimination

0.44 sec to solve

A^ with gmres

0.15 sec to solve

A^ using ILU(0) with gmres

0.034 sec to solve

A^ using ILUT with gmres

Factor of 28 speed up from G.E. to ILUTFactor of 5 speed up from ILU(0) to ILUT

Parallel ILUT^ ILUT on parallel distributed memory computer^ Use graph partition (e.g. ParMETIS) to minimizedependencies between rows on different processors

The hard part: Interface nodes^ Processors cooperate to factor interface nodes^ Requires communicating results at each step^ ILU(0) has advantage that it doesn’t create fill

Convert to MPI^ ParILUT code written using shmem for Cray T3D^ Want to run code on ASCI and other parallel computers^ Re-write using MPI communication^ MPI has higher communication overhead than shmem^ MPI generally uses 2 sided communication

MIS, revisited^ MIS worked okay with shmem, due to lowcommunication overhead^ Sending tiny messages with MPI killed performance^ MIS didn’t allow dependencies within each processor^ Solution: use processor numbers to determine whogets to factor what rows

No communication to determine sets Con: load balancing problem

Results^ Factorization time comparable to original versionSeconds to factor G40 on 32 processorsSettings (m,t)

shmem w/ MIS

10, 1e-
20, 1e-
  • 5, 1e- MPI w/ psuedo-IS
    • 5, 1e-
      • 5, 1e-
        • 10, 1e-
          • 10, 1e-
            • 10, 1e-
              • 20, 1e-
                • 20, 1e-
                  • 20, 1e-

Results^ Better convergence in GMRESGMRES steps to converge G40 on 16 processorsSettings (m,t)

shmem w/ MIS

MPI w/ psuedo-IS

20, 1e-
20, 1e-

5, 1e-

10, 1e-

10, 1e-

10, 1e-

20, 1e-

20, 1e-

20, 1e-