Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Algebraic multigrid
Framework
Experiments
Outlook
References
Pavel Jir
anek1
Serge Gratton1 , Xavier Vasseur1 , and Pascal H
enon2
CERFACS, Toulouse, France1
Total SA, Centre Scientifique et Technique Jean-F
eger, Pau, France2
Pavel Jir
anek (CERFACS)
PRECON13
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
Outline
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
Pavel Jir
anek (CERFACS)
PRECON13
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
Outline
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
Pavel Jir
anek (CERFACS)
PRECON13
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
Introduction
Simulations driven by partial differential equations require efficient methods for solving large and
sparse systems of linear algebraic equations
Au = f ,
where A represents a discretised PDE or a system thereof.
Efficient methods should be scalable and robust.
Large sequences of systems often need to be solved, e.g., in time-dependent and/or nonlinear
problems such as these in reservoir simulations.
In order to satisfy the criteria of efficiency, iterative methods need a good preconditioner, which
should be: 1) relatively cheap to compute and 2) substantially accelerate the convergence of the
iteration.
Pavel Jir
anek (CERFACS)
PRECON13
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
Reservoir simulations
Multi-phase porous media flow models depending on the stage of the recovery process (single-,
two-phase, compositional, thermal,...) are often discretised using a finite volume scheme in space
and (full) implicit Euler scheme in time and linearised by a Newton type method: a system of
linear algebraic equations need to be solved at each Newton iteration within each time step.
The systems couple the pressure and saturation/concentration unknowns
App
Asp
Aps
Ass
up
fp
=
us
fs
and are nonsymmetric and ill-conditioned mainly due to the elliptic character of the pressure
block App and heterogeneity and anisotropy of the porous medium.
Example: SPE10 benchmark (Christie and Blunt [2001])
I
Pavel Jir
anek (CERFACS)
PRECON13
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
Preconditioning techniques
Constrained pressure reduction (CPR)
Wallis et al. [1985], Lacroix et al. [2001], Scheichl et al. [2003]
I
Aps
Ass
up
fp
=
us
fs
pp
A
sp
A
0
ss
A
p
u
fp
=
s
u
fs
Motivation: In CPR-AMG, about 80% of the overall setup time is taken by the setup of the AMG
pp (partial) reuse of the preconditioner.
preconditioner for the block A
Pavel Jir
anek (CERFACS)
PRECON13
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
Outline
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
Pavel Jir
anek (CERFACS)
PRECON13
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
AMG basics
Algebraic vs geometric multigrid:
automatic coarsening without a priori knowledge of the geometry,
simple algebraic smoothers,
may be less efficient than the geometric multigrid,
setup phase.
Brandt et al. [1982], Ruge and St
uben [1987], Trottenberg et al. [2001],...
Setup phase:
I
Computing the hierarchy by a recursive application of the setup procedure, which, for a
given A RN N , determines a coarse grid RNc , a prolongation operator P RN Nc , a
restriction operator R (= PT ), and the coarse grid matrix Ac (= RAP).
Solution phase:
I
traditional cycles (V, W, F, ...) combining smoothing and coarse grid correction,
Pavel Jir
anek (CERFACS)
PRECON13
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
P=
P=
PRECON13
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
Parallel coarsening:
I
Decoupled schemes running independently on each process (size of the coarse grid limited
by the number of processors, slow coarsening).
Parallel coarsening schemes are based usually on modifications of parallel independent set
algorithms (Luby [1984], Jones and Plassman [1993], Adams [1998]) or on combinations of
decoupled schemes with a special pre- or post-processing of the processor boundary
variables, e.g., SAMG (Krechel and St
uben [2001]), BoomerAMG (Henson and Yang
[2002]), ML (Tuminaro and Tong [2000]).
Pavel Jir
anek (CERFACS)
PRECON13
10
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
Outline
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
Pavel Jir
anek (CERFACS)
PRECON13
11
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
Goals:
I
no fixed coarsening scheme (C/F splitting, aggregation) and problem type (scalar and
coupled problems, systems of PDEs),
Pavel Jir
anek (CERFACS)
PRECON13
12
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
Design overview
Hierarchy contains
I
Level variables:
I
variable layer used for setup: objects stored in a type-independent string-based dictionary;
Setup of the hierarchy is made by a setup manager containing a set of components, which can be
considered as blind parametrized black boxes with a set of inputs and outputs connected to
certain level variables.
The components are built in the order given by the data dependencies and priorities.
One setup manager can declare several variants: used to modify the behaviour depending on the
data reuse.
Pavel Jir
anek (CERFACS)
PRECON13
13
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
Coarse level
xx<VariableTransfer class="DirectTransfer"/>
A
</SetupManager>
Nullspace
Pavel Jir
anek (CERFACS)
PRECON13
14
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
Coarse level
xx<VariableTransfer class="DirectTransfer"/>
A
xx<Variant id="default">
Nullspace
xx</Variant>
</SetupManager>
Pavel Jir
anek (CERFACS)
PRECON13
14
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
Coarse level
xx<VariableTransfer class="DirectTransfer"/>
A
CouplingGraph
xx<Variant id="default">
Nullspace
xxxx<Component class="AggregationCouplingGraph">
Graph
xxxxxx<Input
xxxxxx
xxxxxx
id="A"
variable="A"
level="fine">
xxxxxx<Output id="Graph"
xxxxxx
variable="Graph"
xxxxxx
level="fine">
xxxxxx<ParameterList>
xxxxxxxx<Parameter .../>
xxxxxxxx<Parameter .../>
xxxxxxxx<Parameter .../>
xxxxxx</ParameterList>
I
xxxx</Component>
Pavel Jir
anek (CERFACS)
xx</Variant>
</SetupManager>
PRECON13
14
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
Coarse level
xx<VariableTransfer class="DirectTransfer"/>
A
xx<Variant id="default">
Nullspace
Graph
xxxx<Component class="StandardUncoupledAggregator">
Aggregator
xxxxxx<Input
xxxxxx
xxxxxx
Aggregates
id="Graph"
variable="Graph"
level="fine">
xxxxxx<Output id="Aggregates"
xxxxxx
variable="Aggregates"
xxxxxx
level="fine">
xxxx</Component>
xx</Variant>
</SetupManager>
I
Pavel Jir
anek (CERFACS)
PRECON13
14
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
Coarse level
xx<VariableTransfer class="DirectTransfer"/>
A
xx<Variant id="default">
Nullspace
Generator
Nullspace
Nullspace
Graph
Aggregates
Normalized
Nullspace
T T
[BT
1 , . . . , Bk ] ,
xxxx<Component class="NullspaceGenerator">
xxxxxx<Input
xxxxxx
xxxxxx
id="A"
variable="A"
level="fine">
xxxxxx<Input
xxxxxx
xxxxxx
id="Fine Nullspace"
variable="Nullspace"
level="fine">
xxxxxx<Input
xxxxxx
xxxxxx
id="Aggregates"
variable="Aggregates"
level="fine">
Bi = Qi Ri .
xxxx</Component>
xx</Variant>
</SetupManager>
Pavel Jir
anek (CERFACS)
PRECON13
14
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
Coarse level
xx<VariableTransfer class="DirectTransfer"/>
A
xx<Variant id="default">
Nullspace
Nullspace
Graph
Aggregates
Tentative
Prolongator
Normalized
Nullspace
PTentative
xxxx<Component class="TentativeProlongator">
xxxxxx<Input
xxxxxx
xxxxxx
id="Aggregates"
variable="Aggregates"
level="fine">
xxxxxx<Input
xxxxxx
xxxxxx
id="Nullspace"
variable="Normalized Nullspace"
level="fine">
xxxxxx<Output id="P"
xxxxxx
variable="PTentative"
xxxxxx
level="fine">
xxxx</Component>
xx</Variant>
</SetupManager>
= blkdiag(Q1 , . . . , Qk ).
P
Pavel Jir
anek (CERFACS)
PRECON13
14
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
Coarse level
xx<VariableTransfer class="DirectTransfer"/>
A
xx<Variant id="default">
Nullspace
Nullspace
Prolongator
Smoother
Graph
xxxx<Component class="JacobiPSmoother">
xxxxxx<Input
xxxxxx
xxxxxx
id="A"
variable="A"
level="fine">
Normalized
Nullspace
xxxxxx<Input
xxxxxx
xxxxxx
id="Graph"
variable="Graph"
level="fine">
PTentative
xxxxxx<Input
xxxxxx
xxxxxx
id="PTentative"
variable="PTentative"
level="fine">
Aggregates
xxxxxx<Output id="PSmoothed"
xxxxxx
variable="P"
xxxxxx
level="coarse">
xxxx</Component>
xx</Variant>
</SetupManager>
P = (I D1 AF )P.
Pavel Jir
anek (CERFACS)
PRECON13
14
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
Coarse level
xx<VariableTransfer class="DirectTransfer"/>
A
xx<Variant id="default">
Nullspace
Nullspace
Graph
Aggregates
Transposer
xxxx<Component class="Transposer">
xxxxxx<Input
xxxxxx
xxxxxx
id="A"
variable="P"
level="coarse">
Normalized
Nullspace
xxxxxx<Output id="AT"
xxxxxx
variable="R"
xxxxxx
level="coarse">
PTentative
xxxx</Component>
xx</Variant>
</SetupManager>
Pavel Jir
anek (CERFACS)
PRECON13
14
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
Coarse level
xx<VariableTransfer class="DirectTransfer"/>
A
RAP
Product
Nullspace
Nullspace
Graph
Aggregates
xx<Variant id="default">
xxxx<Component class="RAPProduct">
xxxxxx<Input
xxxxxx
xxxxxx
id="A"
variable="A"
level="fine">
Normalized
Nullspace
xxxxxx<Input
xxxxxx
xxxxxx
id="R"
variable="R"
level="coarse">
PTentative
xxxxxx<Input
xxxxxx
xxxxxx
id="P"
variable="P"
level="coarse">
Pavel Jir
anek (CERFACS)
xxxxxx<Output id="RAP"
xxxxxx
variable="A"
xxxxxx
level="coarse">
xxxx</Component>
xx</Variant>
</SetupManager>
PRECON13
14
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
Coarse level
Nullspace
Nullspace
Graph
xx</Variant>
Aggregates
</SetupManager>
xx<VariableTransfer class="DirectTransfer"/>
xx<Variant id="default">
xxxx...
Normalized
Nullspace
PTentative
Pavel Jir
anek (CERFACS)
PRECON13
14
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
normally, we keep all the variables created on levels during the setup;
some variables can be declared as temporary: they are deleted as soon as they are not
needed anymore;
reusing parts of the hierarchy can be achieved by clearing certain variables prior to setup or
forcing to build certain components:
<Variant id="reuse operators" parent="default">
xx<PreSetupClear variable="A" level="coarse"/>
</Variant>
<Variant id="reuse operators">
xx<Component class="RAPProduct" build="always">
xxxx<Input id="A"
variable="A" level="fine"/>
xxxx<Input id="R"
variable="R" level="coarse"/>
xxxx<Input id="P"
variable="P" level="coarse"/>
xxxx<Output id="RAP" variable="A" level="coarse"/>
xx</Component>
</Variant>
Pavel Jir
anek (CERFACS)
Hierarchy h("sa.xml");
h[0].setOperator(A);
h.compute();
h.iterate(X, B);
...
h[0].setOperator(A new);
h.compute("reuse operators");
h.iterate(X new, B new);
PRECON13
15
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
Outline
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
Pavel Jir
anek (CERFACS)
PRECON13
16
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
Parameters
GCG-based K-cycle,
Pavel Jir
anek (CERFACS)
PRECON13
17
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
Pavel Jir
anek (CERFACS)
PRECON13
18
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
In CPR-AMG, we solve for each time-step a sequence of pressure systems for each Newton
iteration.
We consider six schemes of the reuse of the AMG preconditioner:
I
S4: recomputed for each system by reusing the initial set of transfer operators,
S5: recomputed for each time-step and updated by reusing the transfer operators,
Pavel Jir
anek (CERFACS)
PRECON13
19
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
S1
S2
S3
S4
S5
S6
Pavel Jir
anek (CERFACS)
Setup
3.09E+000
1.34E+001
6.91E+000
2.61E+001
3.51E+001
6.49E+001
Solve
5.48E+002
5.29E+001
5.88E+001
4.36E+001
4.26E+001
4.26E+001
Total
5.51E+002
6.63E+001
6.57E+001
6.97E+001
7.77E+001
1.08E+002
NIT
1672
260
236
143
140
139
PRECON13
20
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
Outline
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
Pavel Jir
anek (CERFACS)
PRECON13
21
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
Outlook
optimisation,
Pavel Jir
anek (CERFACS)
PRECON13
22
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
Outlook
optimisation,
CPR-related:
I
Pavel Jir
anek (CERFACS)
PRECON13
22
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
Outlook
optimisation,
CPR-related:
I
Pavel Jir
anek (CERFACS)
PRECON13
22
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
References I
M. F. Adams. A parallel maximal independent set algorithm. In Proceedings of the 5th Copper
Mountain Conference on Iterative Methods, 1998.
O. Axelsson and P. S. Vassilevski. Variable-step multilevel preconditioning methods. i. Numer.
Math., 56:157177, 1989.
A. Brandt. General highly accurate algebraic coarsening. Electron. Trans. Numer. Anal., 10:120,
2000.
A. Brandt, S. F. McCormick, and J. W. Ruge. Algebraic multigrid (AMG) for automatic multigrid
solutions with application to geodetic computations. Technical report, Institute for
Computational Studies, Fort Collins, CO, 1982.
J. J. Brannick, M. Brezina, S. P. MacLachlan, T. A. Manteuffel, S. F. McCormick, and J. W.
Ruge. An energy-based AMG coarsening strategy. Numer. Linear Algebra Appl., 13:133148,
2006.
M. Brezina, A. J. Cleary, R. D. Falgout, V. E. Henson, J. E. Jones, T. A. Manteuffel, S. F.
McCormick, and J. W. Ruge. Algebraic multigrid based on element interpolation (AMGe).
SIAM J. Sci. Comput., 22:15701592, 2000.
M. Brezina, R. D. Falgout, S. P. MacLachlan, T. A. Manteuffel, S. F. McCormick, and J. W.
Ruge. Adaptive smoothed aggregation (SA). SIAM J. Sci. Comput., 25(6):18961920, 2004.
M. Brezina, R. D. Falgout, S. P. MacLachlan, T. A. Manteuffel, S. F. McCormick, and J. W.
Ruge. Adaptive algebraic multigrid. SIAM J. Sci. Comput., 27(4):12611286, 2006.
Pavel Jir
anek (CERFACS)
PRECON13
23
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
References II
E. Chow, R. D. Falgout, J. J. Hu, R. S. Tuminaro, and U. M. Yang. A survey of parallelization
techniques for multigrid solvers. In M. A. Heroux, P. Raghavan, and H. D. Simon, editors,
Parallel Processing in Scientific Computing, Software, Environments, Tools, pages 179201.
SIAM, Philadelphia, PA, 2006.
M. A. Christie and M. J. Blunt. Tenth SPE comparative solution project: a comparison of
upscaling techniques. SPE Reservoir Engineering and Evaluation, 4:308317, 2001.
M. W. Gee, J. J. Hu, M. G. Sala, C. M. Seifert, and R. S. Tuminaro. ML 5.0 Smoothed
Aggregation Users Guide. Technical Report SAND2006-2649, Sandia National Laboratories,
2007.
V. E. Henson and U. M. Yang. BoomerAMG: A parallel algebraic multigrid solver and
preconditioner. Appl. Numer. Math., 41:155177, 2002.
M. T. Jones and P. E. Plassman. A parallel graph coloring heuristic. SIAM J. Sci. Comput., 14:
654669, 1993.
A. Krechel and K. St
uben. Parallel algebraic multigrid based on subdomain blocking. Parallel
Comput., 27:10091031, 2001.
S. Lacroix, Y. V. Vassilevski, and M. F. Wheeler. Decoupling preconditioners in the implicit
parallel accurate reservoir simulator (IPARS). Numer. Linear Algebra Appl., 8:537549, 2001.
O. E. Livne. Coarsening by compatible relaxation. Numer. Linear Algebra Appl., 11(23):
205227, 2004.
Pavel Jir
anek (CERFACS)
PRECON13
24
Introduction
Algebraic multigrid
Framework
Experiments
Outlook
References
References III
M. Luby. A simple parallel algorithm for the maximal independent set problem. SIAM J.
Comput., 15:10361053, 1984.
J. Mandel, M. Brezina, and P. Van
ek. Energy optimization of algebraic multigrid bases.
Computing, 62(3):205228, 1999.
A. Napov and Y. Notay. An algebraic multigrid method with guaranteed convergence rate. SIAM
J. Sci. Comput., 34(2):A1079A1109, 2012.
Y. Notay and P. S. Vassilevski. Recursive Krylov-based multigrid cycles. Numer. Linear Algebra
Appl., 15:473487, 2008.
J. W. Ruge and K. St
uben. Algebraic Multigrid. In S. F. McCormick, editor, Multigrid Methods,
Frontiers in Applied Mathematics, pages 73130. SIAM, Philadelphia, PA, 1987.
R. Scheichl, R. Masson, and J. Wendebourg. Decoupling and block preconditioning for
sedimentary basin simulations. Computat. Geosci., 7:295318, 2003.
U. Trottenberg, C. W. Oosterlee, and A. Sch
uller. Multigrid. Academic Press, London, UK, 2001.
R. S. Tuminaro and C. Tong. Parallel smoothed aggregation multigrid: aggregation strategies on
massively parallel machines. In J. Donnelley, editor, Supercomputing 2000 Proceedings, 2000.
P. Van
ek, J. Mandel, and M. Brezina. Algebraic multigrid by smoothed aggregation for second
and fourth order elliptic problems. Computing, 56:179196, 1996.
J. R. Wallis, R. P. Kendal, and T. E. Little. Constrained residual acceleration of conjugate
residual methods. SPE Reservoir Simulation Symposium, SPE 13536, Dallas, TX, February
1013, 1985.
Pavel Jir
anek (CERFACS)
PRECON13
25