3.9 Numerical Experiments
3.9.1 Poisson Problem
In this experiment we use a Matlab [82] implementation of the referred methods and we attempt to reproduce the results for BFGMRESD in [96] (see Table 2.6 in [96]). It consists of the two-dimensional Poisson problem
3.9. NUMERICAL EXPERIMENTS 47 with Dirichlet boundary conditions, discretized with a second-order finite differences scheme for a vertex- centred grid, with a mesh-grid equal to 1/128. The coefficient matrix was taken using Matlab’s routine gallery(’poisson’,128).
In all numerical experiments, the convergence and deflation threshold are set as ε = εd = 10−6. We are interested in analysing the behaviour of the deflation as the number of right-hand sides increases. We start with 5 right-hand sides and proceed by doubling the number of right-hand sides until 160 right-hand sides. All right-hand sides are canonical vectors in this test.
We show in the Tables3.2to3.4the number of iterations (It), the number of matrix-vector products on a single vector (MV P ) and number of preconditioner applications on a single vector (P r) required for various restarted block flexible Krylov subspace methods performing no deflation (BFGMRES(m)), deflation at the beginning of cycle only (BFGMRESD(m)) and deflation at each iteration (BFGMRES- R(m) and DMBR(m)). We note that all selected methods solve the minimization problem over a subspace of similar maximal dimension (mp). Since the algorithm we propose aims at saving matrix-vector product and preconditioner application, for this numerical experiment we only focus on this factor (cf. Remark 3.9.1
for some comments on the orthogonalization cost).
Remark 3.9.1. During iteration j, DMBR orthogonalizes kj vectors against sj+ dj vectors, whereas BFGMRESD orthogonalizes k1 vectors against j × k1. Since kj ≤ k1 and sj ≤ j × k1 (both due to
Corollary 3.4.7), DMBR may actually perform less orthogonalizations per iterations than BFGMRESD. Therefore, we highlight that although we do not detail the orthogonalization cost for this illustration, the number of orthogonalization steps performed by DMBR is equal or smaller than those performed by BGMRES and BGMRES-R, and in some cases also smaller than those performed by BFGMRESD depending on how early in the cycle the deflation takes place. InSubsection 3.9.3andSubsection 3.9.4we show numerical experiments addressing the total computational time, including matrix-vector products,
preconditioner applications and orthogonalization.
For the first experiment, in Table 3.2 we use 5 cycles of BGMRES(5) as variable preconditioner, meaning that each preconditioning application involves 25 matrix vector products. We provide in the ρ column the following ratio:
ρ(method) = M V P (method(m)) + 25 × P r(method(m))
M V P (DM BR(m)) + 25 × P r(DM BR(m)). (3.9.1) which scales the number of matrix-vector product operations performed with respect to the DMBR method. A value of ρ greater than one indicates that the given block subspace method performs more matrix-vector products than DMBR. We set the restart parameter m = 5 and kmax = p. The second experiment, in Table 3.3, we increase the number of iterations per cycle, but reduce the quality of the preconditioner in order to observe the behaviour along several cycles. We use 3 cycles of BGMRES(3) as variable preconditioner (thus, each preconditioning application involves 9 matrix vector products), restart parameter m = 5 and kmax= p, and we update the ratio to
ˆ
ρ(method) = M V P (method(m)) + 9 × P r(method(m))
M V P (DM BR(m)) + 9 × P r(DM BR(m)). (3.9.2) instead of ρ(method). The third experiment, shown in Table 3.4, considers a more limited memory setting. We set use again 5 cycles of BGMRES(5) as variable preconditioner, but we set kmax = 20 while maintaining the other parameters unchanged. We start with p = 40 and proceed by adding 20 right-hand sides until it reaches the 160 limit. Since BGMRES-R cannot limit the memory in such fashion (p1 is always equal to p in BGMRES-R), we let it aside in this test, and we compare only DMBR with BFMGREST, using ρ(method) from (3.9.1).
Table 3.2reveals that for this particular problem, DMBR performance is clearly superior to BGMRES- R and BFGMRESD, and that the gap between DMBR and the other methods increases with the number of right-hand sides. Notice that, since the restart size is small, BFGMRESD converges performing less matrix- vector products and preconditioning applications than BFGMRES-R. This behaviour is expected since
Poisson equation - Grid : 128 × 128 m = 5, no truncation (kmax= p) p = 5 p = 10 It M V P P r ρ It M V P P r ρ BFGMRES 18 115 90 2.75 19 240 190 4.08 BFGMRES-R 22 77 47 1.45 24 139 79 1.72 BFGMRESD 22 72 42 1.30 23 133 73 1.60 DMBR 23 62 32 1 25 105 45 1 p = 20 p = 40 It M V P P r ρ It M V P P r ρ BFGMRES 16 420 320 4.46 15 760 600 5.13 BFGMRES-R 25 260 140 1.98 26 578 298 2.60 BFGMRESD 27 272 132 1.88 31 566 246 2.17 DMBR 26 208 68 1 27 389 109 1 p = 80 p = 160 It M V P P r ρ It M V P P r ρ BFGMRES 14 1440 1120 5.65 11 2400 1760 5.35 BFGMRES-R 26 1127 567 2.92 27 2199 1079 3.35 BFGMRESD 29 1019 459 2.38 28 1983 863 2.70 DMBR 28 742 182 1 28 1417 297 1
Table 3.2: Poisson equation discretized with h = 1/128 with 5 cycles of BGMRES(5) as variable preconditioner, restart size 5 and a number of right-hand sides given at once ranging from p = 5 to p = 160. It denotes the number of iterations, M V P the number of matrix-vector applications on a single vector, P r the number of preconditioner applications on a single vector and ρ a scaled measure of efficiency in terms of number of matrix-vector products performed both by the method and its preconditioner.
3.9. NUMERICAL EXPERIMENTS 49
Poisson equation - Grid : 128 × 128 m = 15, no truncation (kmax= p) p = 5 p = 10 It M V P P r ρˆ It M V P P r ρˆ BFGMRES 49 275 245 2.99 52 590 520 4.67 BFGMRES-R 55 132 97 1.21 60 221 151 1.39 BFGMRESD 52 137 102 1.27 67 247 167 1.54 DMBR 57 115 80 1 60 177 107 1 p = 20 p = 40 It M V P P r ρˆ It M V P P r ρˆ BFGMRES 48 1080 960 5.59 38 1720 1520 5.63 BFGMRES-R 65 429 269 1.62 67 791 471 1.82 BFGMRESD 72 472 292 1.76 73 883 523 2.02 DMBR 68 321 161 1 70 568 248 1 p = 80 p = 160 It M V P P r ρˆ It M V P P r ρˆ It MVP PC Ratio It MVP PC Ratio BFGMRES 29 2640 2320 5.23 27 4960 4320 6.02 BFGMRES-R 65 1498 858 2.02 69 2844 1564 2.29 BFGMRESD 70 1610 970 2.27 75 3235 1795 2.63 DMBR 67 1039 399 1 69 1907 627 1
Table 3.3: Poisson equation discretized with h = 1/128 with 3 cycles of BGMRES(3) as variable preconditioner, restart size 15 and a number of right-hand sides given at once ranging from p = 5 to p = 160. It denotes the number of iterations, M V P the number of matrix-vector applications on a single vector, P r the number of preconditioner
applications on a single vector and ˆρ a scaled measure of efficiency in terms of number of matrix-vector products
performed both by the method and its preconditioner.
Poisson equation - Grid : 128 × 128 m = 5, truncation with kmax= 20
p = 40 p = 80 It M V P P r ρ It M V P P r ρ BFGMREST 26 531 251 2.06 27 1066 506 1.98 DMBR 27 397 117 1 26 806 246 1 p = 120 p = 160 It M V P P r ρ It M V P P r ρ BFGMREST 40 1880 800 1.94 52 2952 1032 1.80 DMBR 31 1359 399 1 32 1846 566 1
Table 3.4: Poisson equation discretized with h = 1/128 with 5 cycles of BGMRES(5) as variable preconditioner,
with a number of right-hand sides given at once ranging from p = 40 to p = 160 and using truncation (kmax= 20).
It denotes the number of iterations, M V P the number of matrix-vector applications on a single vector, P r the number of preconditioner applications on a single vector and ρ a scaled measure of efficiency in terms of number of matrix-vector products performed both by the method and its preconditioner.
BFGMRESD is supposed to benefit from small restart sizes. In Table 3.3, as expected, we observe that BFGMRES-R benefits from the larger restart size and performs considerably less matrix-vector products and preconditioner applications than BFGMRESD. However, DMBR method is still the cheapest in terms of matrix-vector and preconditioner applications. In the more memory constrained test, inTable 3.4, we see that once again the reduction on the number of matrix-vector products of DMBR over BFGMREST is considerable, but this time the difference between the methods does not seem to increase with the number of right-hand sides p.