harrachov 2007
DESCRIPTION
-Computational Methods with Applications- Aug. 19-25. Harrachov 2007. On a weighted quasi-residual minimization strategy of QMR for solving complex symmetric shifted linear systems. Tomohiro Sogabe. (Joint work with S.-L. Zhang). Dept. of Computational Science & Engineering,. - PowerPoint PPT PresentationTRANSCRIPT
On a weighted quasi-residual minimization strategy of QMR for solving complex
symmetric shifted linear systems
Harrachov 2007
Nagoya University, Japan
Dept. of Computational Science & Engineering,
Tomohiro Sogabe
(Joint work with S.-L. Zhang)
-Computational Methods with Applications- Aug. 19-25
・ Complex symmetric shifted linear systems
Outline
・ Conclusion
・ Improving the speed of convergence of shifted QMR_SYM
・ Numerical examples
miii ,...,2,1,)( bxIA σσ- Shifted linear systems
- Shifted COCG, Shifted COCR, Shifted QMR_SYM
- A proposal of a weight
- Large scale electronic structure calculation ( Si & Cu atoms )
・ Shifted QMR_SYM
(On a weighted quasi-residual minimization strategy )
- Advantages and shortcomings over shifted COCG(R)
- Comparison of computational cost
List of main symbols
・ Krylov subspace : },...,,{span:),( 1bAAbbbA nnK
・ W-dot product on :NC Wyxyx WH:),(
・ W-norm on : Wxxx WH:|||| NC
(W : N-by-N h.p.d. matrix)
NoteMatrix A is complex symmetric if A is not Hermitian but symmetric, i.e. .HT AAA
Linear systems
.,,, NNN CbxCAbAx
.,...,2,1,)( miii bxIA σσ
Shifted linear systems
Shifted linear systems
・ Lattice QCD Numerical computation of the strong interaction between quarks mediated by gluons
・ Large scale electronic structure calculationDynamics computation of nanostructures based on quantum mechanics
.,...,2,1,)( miii bxIA σσ
Complex symmetric shifted linear systems
Our main interest
Krylov subspace (KS) methods
for solving complex symmetric linear systems
bxA 1I)( 1σσ
bxA mm
σσ I)(
KS methods for shifted linear systems
KS methods
KS methods
KS methods
bxA 1I)( 1σσ
bxA mm
σσ I)(
),(),( bIAbIA σσ nn KKi j
For more efficient computaion,
Reuse of the basisNo need for matrix-vector and dot products.
Generate Krylov basis
KS solvers for non-Hermitian shifted linear systems
QMR for SLS ( Freund, 1993 )
BiCGSTAB-M
BiCGSTAB(ℓ)GMRES(k)
Non-Hermitian
( Jegerlehner, 1996 )
( Frommer & Grassner, 2003 )
( Jegerlehner, 1996 )
( Frommer, 2003 )ShiftedShifted
BiCG-M
..
GMRES ( Datta & Saad, 1991 )
KS methods for complex symmetric shifted linear systems
Complex symmetric linear systems
COCG (van der Vorst & Melissen, 1990)
COCR (S. & Zhang, 2007)
QMR_SYM (Freund, 1992)
Shifted COCR ( S. & Zhang, manuscript 2007 )
Complex symmetric shifted linear systems
Shifted COCG ( Takayama et al., 2006 )
Shifted QMR_SYM ← Readily obtained from two papers by Freund, 1992, 1993.
Property of each method
COCG:
COCR:
QMR_SYM:
),( 0rAr nn K
]:[ nn Axbr
),( 0rAAr nn KQnnn rVr 1
bAx
Shifted COCR:
Shifted COCG:
Shifted QMR_SYM:Q
nnnσσ rVr 1
Crr nnnn ππσ ,
Crr nnnn ππσ ,
bxIA σσ )(])(:[ nn xIAbr σσ
QMR_SYM bAxComp. symm. linear systems
)( ,11 nnnn TVAVn
nnnn CyyVx ,The comp. symm.
Approximate solutions
nnn yAVbr 2,111 ||||:),( byTeV ββ nnnn
||||minarg ,11 innn ni
zTeyCz
β1
H1 nn WW
,1 IW n),...,,( 1211 nn ωωωΩ diag
2121
11 |||||||| nnn VV Ωs.t.
Choice for weight, e.g.
Lanczos process
(Freund, 1992)
nnnnn CyyVx ,
1. Run nth step of the complex symmetric Lanczos process
||||minarg ,11 innn ni
zTeyCz
β
3. Update
For n=1,2,…
End
11 nHn WW
bAxComp. symm. linear systems
QMR_SYM
):( 1 nnn RVP
4-term recurrences relation
nnnn g pxx 1
nnnnnnnnnn ttt ,1,12,2 /)( ppvp
2. Solve
(Freund, 1992)
Shifted QMR_SYM mii
i ,...,2,1,)( bxIA σσ
)( ,11 nnnn TVAVn
nnnniii CyyVx σσσ ,
Approximate solutions
iinninσσ σ yVIAbr )(
.||||:),( ,111 byTeV ββ σσ iinnnn
T,1,1 0
: ninnnn
iI
TTσσ
||||minarg ,11 innni
ni
i zTeyCz
σσ β
1
H1 nn WW
The comp. symm. Lanczos process
Shifted comp. symm. linear systems
Shifted QMR_SYM
nnnnniii CyyVx σσσ ,
1. Run nth step of the complex symmetric Lanczos process
||||minarg ,11 innni
ni
i zTeyCz
σσ β
2. Solve
3. Update
For n=1,2,…
End
(i=1,2,…,m)
(i=1,2,…,m)
):( 1 nnn RVP
iiinnnn g σσσ pxx 1
nnnnnnnnnn ttt iii,1,12,2 /)( σσσ
ppvp
1H
1 nn WW
miii ,...,2,1,)( bxIA σσ
Shifted comp. symm. linear systems
4-term recurrences relation
Advantage and shortcoming of the shifted QMR_SYM
・ Shifted COCG
・ Shifted QMR_SYM ・ Shifted COCR
highlow
・ ShiftedCOCG ・ Shifted QMR_SYM
・ ShiftedCOCR
Required Not required
Possible to avoid(Cf. S. et al. 2007)
Cost per iteration (1<<m)
Need for the choice of a suitable seed system
Re(σ)
||||
||||log
b
rn
0.4 0.6 0.8 1.0 1.2 1.4
4
0
-4
-8
-12
Number of systems: 1001, seed system: σ=0.900+0.001i
Need for the choice of a suitable seed system
Shifted COCG
Comparison of costs per iteration step
Least squares problems
ShiftedQMR_SYM COCG(R)
Shifted COCG(R)
m: number of shifted linear systems N: order of matrices
1 1 m
6NmUpdate solutions 4Nm 4Nm
O(m)
O(m)
O(m)
Polynomial comp.
If 1<<m, update solutions require the dominant computational cost
matrix ・ vector multiplication
Main idea
||||minarg ,11 innni
ni
i zTeyCz
σσ β
1
H1 nn WW
),...,,( 1211 nn ωωωΩ diag212
111 ||||||||
nnn VV Ωs.t.
1nW
)1,...,1,1(1 diagI n
1nL
T,11 0
BTL n
nnns.t. ( : upper bidiagonal )nB
A proposal of a weight for least squares problems to reduce the computational cost per iteration
Main idea (cont.)
||||minarg ,11 innni
ni
i zTeyCz
σσ β
1
H1 nn WW
iiinnnn g σσσ pxx 1
nnnnnnnnnn ttt iii,1,12,2 /)( σσσ
ppvp
,iinnnσσ yVx ):( 1 nnn RVP
11 nn LW
2,1111 ||)(|| innnni zTLeL σβ
ni Cz
minarg
0
0
T,11
0
BTL
σσ n
nnn
0
0
4Nm
11 nn LW
1nL
Comparison of costs per iteration step
Generate bases of KS
(matrix ・ vector)
Least squares problems
ShiftedQMR_SYM COCG(R)
Shifted COCG(R)
1 1 m
6NmUpdate solutions 4Nm 4Nm
O(m) O(m)
O(m)
Polynomial comp.
How is chosen?
1
1
1
1
1
)1(2
2
αβ
2W
4
43
332
2)1(
2
11
0
β
αβ
βαβ
βα
βα
�
1
1
1
1
1
1
1
αβ
1W
4
43
332
2)1(
2
11
0
β
αβ
βαβ
βα
βα
�
4
43
3)2(
3
2)1(
2
11
0
0
β
αβ
βα
βα
βα
�
4
43
332
221
11
β
αβ
βαβ
βαβ
βα
�
4,5T
4,51234 TWWWW
0
0
0
0
)3(4
3)2(
3
2)1(
2
11
α
βα
βα
βα
�
5L
1
1
1
1
)1(
ii
i
αβ:iW
1WW n
1nL
nn ,1T
T,
0
B nn
For convenience shifted QMR_SYM with the weightis referred to as shifted QMR_SYM( B ).
On property of each method
・ Shifted COCG
・ Shifted QMR_SYM(B)
・ Shifted QMR_SYM ・ Shifted COCR
highlow
・ ShiftedCOCG
・ Shifted QMR_SYM(B)
・ Shifted QMR_SYM
・ ShiftedCOCR
Required Not required
Possible to avoid(Cf. S. et al. 2007)
Cost per iteration (1<<m)
Need for the choice of a suitable seed system
Some properties of shifted QMR_SYM
,,...,2,1,)( miii bxIA σσ
,Ciσ .NRb
For each system i, each approximate solution holds minimal residual norm.
⇒ In terms of number of iterations, shifted QMR_SYM always converges at fewer iterations than shifted COCG(R) .
2.
1. All matrix-vector multiplications can be done in real arithmetic.
Theorem 1. Let A be real symmetric,
If shifted QMR_SYM is applied to the systems of the form
then, shifted QMR_SYM has the following properties:
The QMR_SYM holds the above two properties. (Cf. Freund, 1992)
Some properties of shifted QMR_SYM(B)
,,...,2,1,)( miii bxIA σσ
,Ciσ .NRb
2.
1. All matrix-vector multiplications can be done in real arithmetic.
Theorem 2. Let A be real symmetric,
If shifted QMR_SYM(B) is applied to the systems of the form
then, shifted QMR_SYM(B) has the following properties:
.|||||||||||| 2SQMR_SYM
2SCOCG
2)(SQMR_SYM
nnB
n rrr
⇒ Shifted QMR_SYM(B) and shifted COCG generate approximate solutions with the same residual 2-norm .
Comparison of costs per iteration step
1 (real ・ real)
1
1(real ・ complex)
Least squares
problems
ShiftedQMR_SYM(B)
Shifted COCG(R)
Shifted QMR_SYM
(real ・ real)
Update solutions
O(m)
4Nm 6Nm 4Nm
O(m)
O(m)
m: number of shifted linear systems, N: order of matrices
Polynomial comp.
matrix ・ vector multiplication
Numerical examples
VT64 Workstation 2100
CPU: 2.4GHz (AMD Opteron 252)
Memory: 8GB
Fortran 77
(double precision arithmetic)
Initial guess all zeros
1210||||
|||| b
rn
Code
Stopping criterion
Example 1( large scale electronic structure calculation )
Si512 atoms surface reconstructuring simulation
,2048Ckσ
bxIA kk
σσ )(
2048Rb,20482048RA
(Cf. Takayama et al., Phys. Rev. B, 2006)
Shifted COCG
Shifted QMR_SYM
Shifted QMR_SYM( B )
Shifted COCG
Shifted QMR_SYM
Example 1
Number of iterations
R
elat
ive
resi
du
al 2
- rn
omσ=1.000+0.001i
0 50 100 150 200 250
-8
0
-12
-4
(log
10 | |
rn ||
/ || b
| |)
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
0 200 400 600 800 1000 1200
Example 1 (Ratio of computation time)
( The computational time for shifted COCG is scaled to 1. )Reσ∈ [0.4, 1.4]
Shifted QMR_SYMShifted QMR_SYM(B)■
◆
5.1[s]
5.2[s]
7.2[s]
Number of shifted linear systems
Rat
io o
f co
mp
uta
t ion
tim
e
Example 2
Cu1568 atoms surface reconstructuring simulation
,41121Ckσ
bxIA kk
σσ )(
14112Rb,1411241121 RA
(Cf. Takayama et al., Phys. Rev. B, 2006)
( large scale electronic structure calculation )
0
0.2
0.4
0.6
0.8
1
1.2
1.4
0 500 1000 1500
Example 2 (Ratio of computation time)
Shifted QMR_SYM
Reσ∈ [-0.5, 1.0]
Shifted QMR_SYM(B)■
◆
87[s]
103[s]118[s]
Number of shifted linear systems
Rat
io o
f co
mp
uta
t ion
tim
e
( The computational time for shifted COCG is scaled to 1. )
Conclusion
1 . Shifted QMR_SYM(B) is proposed.
3 . In terms of computational time
2 . In terms of number of iteration stepsShifted QMR_SYM(B) required almost the same iteration steps as shifted COCG and shifted QMR_SYM,
4 . No need for the choice of a suitable seed system.
For large m, it converged in the almost the same time as shifted COCG and converged about 20% faster than shifted QMR_SYM .
For small m, it converged faster than the others.
||||||)(|||||| ,11,111iiiiinnnnnnnnσσσσσ ββ yTeyTeVr
),( 111)1(
1
nnTn
nNn IVVRV
Appendix 1
Proof of Theorem 2
||||min||||min ,11),(
ii
nin
i
nin
nnnnK
σσσ
σβ
σσyTer
CybIAx
Shifted COCR
)(11 σσ nn R
nnnn αα σσσ )/( 1
12
11 )/( nnnn ββ σσσ
bxA
σσσσ β11
/1
nnn nn prp
σσσσ αnnn n pxx
1
bxIA σσ )(
r,, βαCOCR
)()1()( 11
111
σσσσ ππααβ
πσασπ
nnn
n
nnnnn R
Appendix 3
Shifted COCG
)(11 σσ nn R
nnnn αα σσσ )/( 1
12
11 )/( nnnn ββ σσσ
bxA
σσσσ β11
/1
nnn nn prp
σσσσ αnnn n pxx
1
bxIA σσ )(
r,, βαCOCG
)()1()( 11
111
σσσσ ππααβ
πσασπ
nnn
n
nnnnn R
Appendix 4
LS-electronic structure calculation
jiji i ,1
, ])[( HIG δε
1. Computation of Green’s function
Tkfd
Bjiji
μεεε
π)(Im
1,, Gρ
2. Computation of density matrices
3. Physical quantity
]X[TrX ρ
Appendix 5
jiji i ,1
, ])[( HIG δε
1. Computation of Green’s function
ji eie 1])[( HIδε
ji i exHIxe ])[(),,( δε
Tkfd
Bjiji
μεεε
π)(Im
1,, Gρ
),,( ε Numerical integration
The number of mesh ⇒The number of shifted linear systems
Appendix 6 LS-electronic structure calculation
補足資料 8
多項式前処理は適用可能( Cf. Jegerlehner, 1996 )
yxbAybxA nnnn PPPP and1
ησσ AA nPIP )(n
)),((),( 1111 bMIAMbMAM σnn KK
前処理がシフト方程式に対して適用できない例
前処理について