An Intelligent Method For Accelerating The Convergence of Different Versions of SGMRES Algorithm
An Intelligent Method For Accelerating The Convergence of Different Versions of SGMRES Algorithm
2, April 2016
ABSTRACT
In a wide range of applications, solving the linear system of equations Ax = b is appeared. One of the best
methods to solve the large sparse asymmetric linear systems is the simplified generalized minimal residual
(SGMRES(m)) method. Also, some improved versions of SGMRES(m) exist: SGMRES-E(m, k) and
SGMRES-DR(m, k). In this paper, an intelligent heuristic method for accelerating the convergence of three
methods SGMRES(m), SGMRES-E(m, k), and SGMRES-DR(m, k) is proposed. The numerical results
obtained from implementation of the proposed approach on several University of Florida standard
matrixes confirm the efficiency of the proposed method.
Keywords
Artificial Intelligence, Heuristic Algorithms, Linear systems of equations, SGMRES.
1. INTRODUCTION
In a wide range of applied sciences, solution of problems is obtained from solving a linear system
of equations Ax = b. In numerical analysis, the algorithms for solving linear systems commonly
use one of the two following methods: Direct methods, Iterative methods.
According to the coefficient of linear devices and matrix A, we can use one of these methods. If
the matrix dimension is too small, direct methods such as Gaussian elimination method, GaussJordan and LU decomposition is preferred. These methods are composed of a finite number of
steps. On the other hand, iterative methods are based on calculating a sequence of approximations
to find the solution. In these methods, to stop the algorithm either an accurate solution is found or
a certain number of iterations is performed. If the matrix A is relatively large, triangular-based
direct methods are not recommended, because this method requires plenty of time and storage
space. In addition, in many cases the coefficient matrix is sparse and triangular process destroys
the sparseness of matrix, such we are faced with a large dense matrix. To solve such problems, it
is recommended to use iterative methods which do not change the sparseness nature of matrix A.
DOI:10.5121/acii.2016.3201
Advanced Computational Intelligence: An International Journal (ACII), Vol.3, No.2, April 2016
One of the main iterative methods, which nowadays has found many applications, is the
generalized minimal residual method (GMRES) proposed by Saad and Schultz [1]. Simpler
GMRES (SGMRES) method is a new version of GMRES, which was proposed by Walker and
Zhou [2] and analyzed by Jirnek et al. [4]. SGMRES(m)) is a restarted version of SGMRES
which restarts at the iteration when the Krylov subspace reaches dimension m, then the current
solution is used as the new initial guess for the next m iterations.
Despite the good performance of these methods, it seems that we can make changes in their
structure to accelerate their convergence. In this study, an intelligent heuristic method to change
the update equations of three methods SGMRES(m), SGMRES-E(m, k), and SGMRES-DR(m, k)
is proposed. The experimental results on several University of Florida standard matrixes confirm
the efficiency of the proposed method.
min
(, )
) (1)
Note that (, ) = , , , "# $is the mthKrylov subspace constructed by the
matrix A and the initial residual vector r0. It is obvious that (1) is corresponding to the
orthogonality condition, i.e.:
(, )
(2)
where the orthogonality relation is established upon the Euclidean inner product.
The traditional implementation of GMRES is inspired from the Arnoldi process [3]. Application
of m steps of the Arnoldi process to the matrix A with the nonzero residual vector r0 yields the
Arnoldi factorization
)
& = &'# (
where the columns of the matrix Vm form the orthonormal basis of the Krylov subspace Km(A, r0)
) R(m+1)m is an upper Hessenberg matrix. We can reformulate the least-squares problem as
and (
the reduced minimization problem
) * = ( + & * ) = min-./# (
+,
Advanced Computational Intelligence: An International Journal (ACII), Vol.3, No.2, April 2016
Simpler GMRES (SGMRES) method is a new version of GMRES, which was proposed by
Walker and Zhou [2] and analyzed by Jirnek et al. [4]. In their method, instead of building an
orthonormal basis of Km(A, r0), an orthonormal basis Vmof AKm(A, r0) is established and then
carries out the orthogonality relation (2). In a specific manner, suppose Zm= [z1,z2, . . ., zm] be a
basis of Km(A, r0). Then, the QR factorization of AZmcan be used to acquire the orthonormal basis
VmofAKm(A, r0), i.e.
AZ2 = V2 R 2
whereVm=[v1, v2, . . . , vm] has orthonormal columns and Rmis an mm upper triangular and
nonsingular matrix. By accomplishing the orthogonality relation (2), we can compute the mth
residual vector rmrecursively as
7
r 8 = r2"# 2 v2 m 1
r2 = r V2 6V2
where m=vTmr0. The corresponding approximate solution is
x2 = x + Z2 t 2
where tm is the solution of the upper triangular system
R 2 t 2 = =# , ? , , 2 @7.
By lapse of iterations, the amount of required computational time and space for GMRES or
simpler GMRES increases meaningfully; and this subject makes GMRES and simpler GMRES
impractical. In order to overcome this shortcoming, the restarted version of these algorithms is
proposed. In restarted GMRES (GMRES(m)) or restarted simpler GMRES (SGMRES(m)),
GMRES or SGMRES is restarted at the moment that the Krylov subspace reaches dimension m,
then the current solution is used as the new initial guess for the next m iterations. Some details of
SGMRES(m) is presented in Algorithm 1[13].
Algorithm 1 (SGMRES(m)).
Input: A : the coefficient matrix; b : the right-hand side; x0 : an initial approximation; m : the
maximal dimension of the Krylov subspace; : a tolerance.
Output: An approximate solution x.
1. Compute r = b Ax , z# = r r , zD# = Az# , r## = zD# , v# = zD# /r##
2. Compute # = v#7 r , r# = r # v#
3. For j = 2,3, , m
3.1. zI = vI"#
3.2.zDI = AzI
3.3. For i = 1,2, , j 1
rJI = vJ7 zDI
zDI = zDI rJI vJ
End For
3.4. rJI = -zDI - , vI = zDI rII , I = vI7 rI"#
3
Advanced Computational Intelligence: An International Journal (ACII), Vol.3, No.2, April 2016
3.5. rI = rI"# I vI
3.6. If -rI - < Lthen solve the linear triangular system
R I t =
7
This implementation of SGMRES(m) was proposed by Walker and Zhou [2]. In their
implementation, they used O = =r r , V2"# @. Note that different restarted simpler GMRES,
called the residual-based restarted simpler GMRES (RB-SGMRES(m)), is proposed in [4]. RBSGMRES(m) uses
Z2 = =r r , r# r# , , r2"# r2"# @
and is equivalent to SGMRES(m). The implementation of RB-SGMRES(m) is closely similar to
that of SGMRES(m) except that
P = P"# /-P"# - in Step 3.1 in Algorithm 1. In [4], it has been
shown that SGMRES(m) is essentially unstable, but RB-SGMRES(m) is conditionally stable
provided that we have some reasonable residual decrease.
In general, because the Krylov subspace dimension is restricted at each cycle for the restarted
methods, often, the convergence for the matrix with Ahaving small eigenvalues slows down. The
main reason of this is that the Krylov subspace used at each cycle does not include good
approximations to the eigenvectors corresponding to small eigenvalues. To accelerate the
convergence of restarted GMRES, it is proposed to compute the approximate eigenvectors
corresponding to small eigenvalues in modulus at each restart, and then augment the Krylov
subspace by these approximate eigenvectors to improve the convergence of restarted GMRES.
This kind of methods includes GMRES-E [5], GMRES-IR [6], and GMRES-DR [7]. These
methods are equivalent at the end of each cycle. Although, GMRES-IR needs less matrix-vector
products than GMRES-E at each cycle, it is slightly more complicated to implement. Moreover,
GMRES-IR suffers from stability problems because it uses the implicitly restarted Arnoldi
process [8], which may suffer from stability when a shift used in the implicitly restarted Arnoldi
process is close to a true eigenvalue of the problem. GMRES-DR which is a good improvement
of GMRES-IR has the efficiency of GMRES-IR, but is simpler to use and does not have the
numerical stability problems [7].
Boojhawon and Bhuruth[9] by using augmentation technique applied the idea in GMRES-E to
SGMRES, and proposed the simpler GMRES method augmented with approximate eigenvectors
(SGMRES-E). The main advantage of SGMRES-E over GMRES-E is SGMRES-E requires a less
computational time than GMRES-E.
Ref [13] improves the SGMRES-E by following the idea behind GMRES-DR and proposed the
simpler GMRES method with deflated restarting (SGMRES-DR). SGMRES-DR includes the
harmonic Ritz vectors corresponding to the smallest eigenvalues of the coefficient matrix A at the
4
Advanced Computational Intelligence: An International Journal (ACII), Vol.3, No.2, April 2016
beginning of each cycle. SGMRES-DR requires less matrix-vector products than SGMRES-E,
and thus is more efficient.
we have:
AZ2 = V2 R 2 (4)
and applying the orthogonality relation (3), the expression of the mth residual vector is obtained:
7
7
r2 = r V2 V2
r = r2"# v2 6v2
r 8
The harmonic Ritz vectors corresponding to the smallest eigenvalues of A is used in SGMRESDR because they are better approximate eigenvectors for eigenvalues with small modulus [10].
Note that the term the smallest eigenvalues means the smallest eigenvalues in modulus. The
harmonic Ritz vector u = Zmy satisfies the following orthogonality condition
(Au u) AZ2
which is equivalent to
i.e.,
7 (AZ
V2
2 y Z2 y) = 0
7
R 2 y = V2
Z2 y (5)
Suppose y1, y2, . . .,ykare k eigenvectors corresponding to k smallest eigenvalues of the reduced
generalized eigenvalue problem (5).
In the SGMRES-E, proposed by Boojhawon and Bhuruth in [9], approximate eigenvectors used
to augment the Krylov subspaces are harmonic Ritz vectorsxDI = Z2 yI , j = 1,2, , k. The
implementation of SGMRES-E is outlined in Algorithm 2[13].
Algorithm 2(SGMRES-E(m, k)).
Input:A : the coefficient matrix; b : the right-hand side; x0 : an initial approximation; m : the
maximal dimension of the Krylov subspace; k : the number of harmonic Ritz vectors; : a
tolerance.
Output:An approximate solution x.
5
Advanced Computational Intelligence: An International Journal (ACII), Vol.3, No.2, April 2016
1. Apply one cycle of SGMRES(m) to generate Zm, Vm, Rm, xm, and rm.
2. Compute the eigenvalues and eigenvectors of the generalized eigenvalue problem (6) by
the QZ algorithm [11]. Let y1, y2, . . .,yk be k eigenvectors corresponding to k smallest
eigenvalues of (6).
3. Form k harmonic Ritz vectors xDI = Z2 yI , j = 1,2, , k
4. Set x0 = xm, and compute r = r2 , z# = r r , zD# = Az# , r## = zD# , v# = zD# /r##
5. Compute # = v#7 r , r# = r # v#
6. For j = 2,3, , m
6.1. If j m kthen zI = vI"# else zI = xDI"2'[
6.2. zDI = AzI
6.3. For i = 1,2, , j 1
rJI = vJ7 zDI zDI = zDI rJI vJ
End For
6.4. rII = -zDI - , vI = zDI rII , I = vI7 rI"#
6.5.rI = rI"# I vI
6.6. If -rI - < L then solve the linear triangular system
R I t =
7
with = M0, ,0, ['# , , I N and form the approximate solution x = x + ZI t, and
stop.
7
Z[`ab = Z2 P[ ,
V[`ab = V2 Q [
where Z[`ab , V[`ab R`[ , and V[`ab has orthonormal columns, defgh d ee is an upper
triangular matrix. This is aQR decomposition with k new vectors.We now restart the GMRES
method. Note that
7
x`ab = x2 , r`ab = r2 = r V2 V2
r
7
7
7
(V[`ab )7 r`ab = Q7[ V2
r2 = Q7[ V2
r 8 = 0
6r V2 V2
Advanced Computational Intelligence: An International Journal (ACII), Vol.3, No.2, April 2016
we obtain
r[`ab = r`ab
to extend the new QR factorization of order k (7) to obtain a QR factorization of order m, i.e., a
QR factorization with m vectors.
In SGMRES-DR, we have
`ab
`ab
zI'#
. j = k, k + 1, , m 1aszI'#
= vI`ab
Then, the expansion of (7) to a QR factorization of order m can be done as follows: the vector
`ab
`ab
Az['#
= Av[`ab is orthogonalized against V[`aband normalized to give v['#
, after which R`ab
['# is
`ab
`ab
`ab
formed from R [ . With zI'# = vI , j = k, k + 1, , m 1 , the process is iterated until a QR
factorization of order m is obtained. The implementation of SGMRES-DR is outlined in
Algorithm 3[13].
Algorithm 3 (SGMRES-DR(m, k)).
Input: A : the coefficient matrix; b : the right-hand side; x0 : an initial approximation; m : the
maximal dimension of the Krylov subspace; k : the number of harmonic Ritz vectors; : a
tolerance.
Output: An approximate solution x.
1. Apply one cycle of SGMRES(m) to generate Zm, Vm, Rm, xm, and rm.
2. Compute the eigenvalues and eigenvectors of the generalized eigenvalue problem (6) by
the QZ algorithm [11]. Set Y[ = =y# , y? , , y[ @, where y# , y? , , y[ are k eigenvectors
corresponding to k smallest eigenvalues of (6).
3. Compute the QR decomposition of Y[ :P[ L[ = Y[ and the QR decomposition of
R 2 P[ : Q [ R`ab
= R 2 P[ .
[
`ab
4. Set Z[ = Z2 P[ and V[`ab = V2 Q [.
5. Let Z[ = Z[`ab , V[ = V[`ab , R [ = R`ab
[ , x = x2 , r = r2 , r[ = r
6. For j = k + 1, k + 2, , m
6.1. zI = vI"#
6.2.zDI = AzI
6.3. For i = 1,2, , j 1
rJI = vJ7 zDI zDI = zDI rJI vJ
End For
6.4.rII = -zDI - , vI = zDI rII , I = vI7 rI"#
6.5. rI = rI"# I vI
6.6. If -rI - < L, then solve the linear triangular system
RIt =
With = =0, ,0, ['# , , 2 @7, and form the approximate solution x2 = x + Z2 t.
Go to Step 2.
Advanced Computational Intelligence: An International Journal (ACII), Vol.3, No.2, April 2016
If the eigenvector yiat Step 2 in Algorithm 3 is complex, the matrix Ykshould include both the real
and imaginary parts of yi. In this situation, we may have to tune k eigenvectors at a restart.
After running one cycle of SGMRES(m), we reach toZ2 = =r r , V2"# @. Based on [12], the
7
matrix V2
Z2 in the generalized eigenvalue problem (5) can be formulated as
v7r
v7r
m # 1
q m #
q
1
l r
p l r
p
v#7
l v?7 r
p l v?7 r#
p
m 7q
0 1
0 1
l
p
l
p
7
Z2 = l v? p =r r V2"# @ = l r
= l r
V2
p
p
l p
l
p
l
p
7
0
0
kv2
o
l 7
p
l
1
1 p
7
lv2 r
p lv2 r2"#
p
0
0
k r
o k r
o
Here, the next identity: for all j > i, vI7 rJ = vI7 rI"#, has been used. BecausevI7 rI"# , j = 1,2, m ,
7
has been generated in applying one cycle of SGMRES (m), the matrix V2
Z2 without additional
inner products of vectors can be formed with order n.
For other cycles, we have
So,
Z2 = =z# , , z[ , v[ , , v2"# @
v7z
v#7 z[
m # #
v#7
m
q
l 7
7
l 7 p
v
z
v
l [ #
[ z[
l v[ p
7
7
7
V2 Z2 = l 7 p =z# , , z[ , v[ , , v2"# @ = l v['# z# v['# z[
l 7
7
lv['# p
lv['? z# v['? z[
l p
7
l
k v2
o
7
7
k v2
z# v2
z[
1
0
1
0
q
p
p
p
p
p
1p
0o
7
Thus, km additional inner products of vectors with order n to form V2
Z2 is required.
Advanced Computational Intelligence: An International Journal (ACII), Vol.3, No.2, April 2016
4. Experimental results
To investigate the performance of proposed methods, several experiments on a number of
standard matrices of the University of Florida has been carried out. In all these experiments, the
vector x0 is initialized by zero, and computational error intended. In Table 1,
SGMRES(m) and ISGMRES(m) are compared. According to Table 1, Figure1, and Figure 2, the
performance of ISGMRES(m) is better than SGMRES(m).
Table 1: Comparison of the results of SGMRES(m) and ISGMRES(m)
Problem
error
0.2375
0.1847
0.9585
0.9584
0.9898
SGMRES
iteration
200
500
200
500
200
Tols1090
Tols1090
Zenios
Zenios
Qh148
20
20
30
30
20
c
10
10
5
5
5
Qh148
20
0.9898
500
ISGMRES
iteration
.
0.05
144
0.007
458
0.00006
84
0.00007
252
0.005
200
0.9
257
9
Figure 1: Comparison of convergence of SGMRES(m) and ISGMRES(m) on Zenios matrix with up to 200
iteration
Figure 2: Comparison off convergence of SGMRES(m) and ISGMRES(m) on Zenios matrix with up to 500
iteration
In Table 2, SGMRES-E(m,k)
E(m,k) and ISGMRES
ISGMRES-E(m,k)
E(m,k) is compared. According to Table 2,Figure3,
and Figure 4, the performance of ISGMRES
ISGMRES-E(m,k) is better than SGMRES-E(m,k).
Tablee 2: Comparison of the results of SGMRES
SGMRES-E(m,k) and ISGMRES-E(m,k)
E(m,k)
Problem
Tols1090
Tols1090
Zenios
Zenios
Qh148
Qh148
20
20
30
30
20
20
5
5
10
10
5
5
error
0.2603
0.2063
0.9574
0.9570
0.9758
0.9750
SGMRESE
iteration
200
500
200
500
200
500
ISGMRES--E
c
20
20
5
10
1
15
iteration
.
0.8
128
0.4
408
0.00005
182
0.0005
500
0.006
190
0.1
500
10
In Table 3, SGMRES-DR(m,k)
DR(m,k) and ISGMRES
ISGMRES-DR(m,k)
DR(m,k) is compared. According to Table
3,Figure5, and Figure 6, the performance of ISGMRES
ISGMRES-DR(m,k)
DR(m,k) is better than SGMRESSGMRES
DR(m,k).
Table
le 3: Comparison of the results of SGMRES
SGMRES-DR(m,k) and ISGMRES-DR(m,k)
DR(m,k)
Problem
error
Tols1090
Tols1090
Zenios
Zenios
Qh148
Qh148
20
20
30
30
20
20
5
5
10
10
5
5
0.3292
0.0327
0.9576
0.9575
0.9758
0.9757
SGMRESDR
iteration
200
500
200
500
200
500
ISGMRES-DR
DR
c
10
5
10
10
5
5
iteration
.
0.3
119
0.005
355
0.00005
182
0.0005
500
0.04
164
0.02
453
11
5. CONCLUSIONS
Based on the mathematical techniques, to improve the performance of SGMRES(m), SGMRESSGMRES
E(m, k) and SGMRES-DR(m,
DR(m, k) methods, [5] - [8] - [7] - [13], that each of which have their own
computational complexity and sometimes execution time and nnumber
umber of operations in the matrix
vector multiplication greatly increase, a modified technique is proposed. Although, improving the
12
Advanced Computational Intelligence: An International Journal (ACII), Vol.3, No.2, April 2016
efficiency of these algorithms by using the concepts and techniques of artificial intelligence has
received little attention, in this paper, an intelligent heuristic method that has very little
computational complexity is used to improve the performance of procedures SGMRES(m),
SGMRES-E(m, k) and SGMRES-DR(m, k).The numerical results obtained from implementation
of the proposed method on several University of Florida standard matrixes confirm the efficiency
of the proposed method.
REFERENCES
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]
[12]
[13]
Y. Saad, M.H. Schultz, (1986) GMRES: a generalized minimal residual algorithm for solving
nonsymmetric linear systems, SIAM Journal on Scientific and Statistical Computing 7, 865869.
H.F. Walker, L. Zhou, (1994) A simpler GMRES, Numerical Linear Algebra with Applications 1,
571581.
Y. Saad, (2003) Iterative Methods for Sparse Linear Systems, 2nd ed., SIAM, Philadelphia.
P. Jirnek, M. Rozloznk, M.H. Gutknecht, (2008) How to make simpler GMRES and GCR more
stable, SIAM Journal on Matrix Analysis andApplications 30, 14831499.
R.B. Morgan, (1995) A restarted GMRES method augmented with eigenvectors, SIAM Journal on
MatrixAnalysis and Applications 16, 11541171.
R.B. Morgan,(2000) Implicitly restarted GMRES and Arnoldi methods for nonsymmetric systems
of equations, SIAM Journal on Matrix Analysisand Applications 21 , 11121135.
R.B. Morgan, (2002) GMRES with deflated restarting, SIAM Journal on Scientific Computing 24,
2037.
R.B. Lehoucq, D.C. Sorensen, (1996) Deflation techniques for an implicitly restarted Arnoldi
iteration, SIAM Journal on Matrix Analysis and Applications 17, 789821.
R. Boojhawon, M. Bhuruth, (2004) Restartedsimpler GMRES augmented with harmonic Ritz
vectors, Future Generation Computer Systems 20,389397.
R.B. Morgan, M. Zeng, (1998) Harmonic projection methods for large non-symmetric eigenvalue
problems, Numerical Linear Algebra with Applications 5, 3355.
G.H. Golub, C.F.V. Loan ,(1996) Matrix Computations, 3rd ed., John Hopkins University Press,
Baltimore, MD.
S. Goossens, D. Roose, (1999) Ritz and harmonic Ritz values and the convergence of FOM and
GMRES, Numerical Linear Algebra with Applications6, 281293.
Yiqin Lin, Liang Baob, Qinghua Wu. (2012)Simpler GMRES with deflated restarting,
Mathematics and Computers in Simulation 82, 22382252.
13