550 likes | 638 Vues
Explore the obstacles in multiscale computation, from slow converging iterations to local processing constraints, and discover solutions like fast solvers and multigrid methods to enhance efficiency and accuracy in solving complex problems.
E N D
MULTISCALE COMPUTATION:From Fast SolversTo Systematic Upscaling A. Brandt The Weizmann Institute of Science UCLA www.wisdom.weizmann.ac.il/~achi
Major scaling bottlenecks:computing Elementary particles (QCD) Schrödinger equationmoleculescondensed matter Molecular dynamicsprotein folding, fluids, materials Turbulence, weather, combustion,… Inverse problemsda, control, medical imaging Vision, recognition
Scale-born obstacles: • Many variablesn gridpoints / particles / pixels / … • Interacting with each otherO(n2) • Slowness Slowly converging iterations / Slow Monte Carlo / Small time steps / … • due to • Localness of processing
small step Moving one particle at a timefast local ordering slow global move
Solving PDE: Influence of pointwise relaxation on the error Error of initial guess Error after 5 relaxation sweeps Error after 10 relaxations Error after 15 relaxations Fast error smoothingslow solution
Scale-born obstacles: • Many variablesn gridpoints / particles / pixels / … • Interacting with each otherO(n2) • Slowness Slowly converging iterations / Slow Monte Carlo / Small time steps / … • due to • Localness of processing 2. Attraction basins
t Macromolecule Dihedral potential G2 G1 T t 0 -p p + Lennard-Jones + Electrostatic ~104Monte Carlo passes for one T Gi transition
E(r) r Optimizationmin E(r) multi-scale attraction basins
Scale-born obstacles: • Many variablesn gridpoints / particles / pixels / … • Interacting with each otherO(n2) • Slowness Slowly converging iterations / Slow Monte Carlo / Small time steps / … • due to • Localness of processing 2. Attraction basins Removed by multiscale processing
Solving PDE: Influence of pointwise relaxation on the error Error of initial guess Error after 5 relaxation sweeps Error after 10 relaxations Error after 15 relaxations Fast error smoothingslow solution
h LU = F LhUh = Fh 2h L2hU2h = F2h L2hV2h = R2h 4h L4hV4h = R4h
Multigrid solversCost: 25-100 operations per unknown Linear scalar elliptic equation (~1971)
Multigrid solversCost: 25-100 operations per unknown Linear scalar elliptic equation (~1971)* Nonlinear Grid adaptation General boundaries, BCs* Discontinuous coefficients Disordered: coefficients, grid (FE) AMG Several coupled PDEs* (1980) Non-elliptic: high-Reynolds flow Highly indefinite: waves Many eigenfunctions (N) Near zero modes Gauge topology: Dirac eq. Inverse problems Optimal design Integral equations Statistical mechanics Massive parallel processing *Rigorous quantitative analysis (1986) (1977,1982) FAS (1975) Withinonesolver
Multigrid solversCost: 25-100 operations per unknown Linear scalar elliptic equation (~1971)* Nonlinear Grid adaptation General boundaries, BCs* Discontinuous coefficients Disordered: coefficients, grid (FE) AMG Several coupled PDEs* (1980) Non-elliptic: high-Reynolds flow Highly indefinite: waves Many eigenfunctions (N) Near zero modes Gauge topology: Dirac eq. Inverse problems Optimal design Integral equations Statistical mechanics Massive parallel processing *Rigorous quantitative analysis (1986) (1977,1982) FAS (1975) Withinonesolver
h LhUh = Fh LU = F 2h U2h = Uh,approximate +V2h L2hV2h = R2h L2hU2h = F2h Fine-to-coarse defect correction 4h L4hU4h = F4h
Multigrid solversCost: 25-100 operations per unknown Linear scalar elliptic equation (~1971)* Nonlinear Grid adaptation General boundaries, BCs* Discontinuous coefficients Disordered: coefficients, grid (FE) AMG Several coupled PDEs* (1980) Non-elliptic: high-Reynolds flow Highly indefinite: waves Many eigenfunctions (N) Near zero modes Gauge topology: Dirac eq. Inverse problems Optimal design Integral equations Statistical mechanics Massive parallel processing *Rigorous quantitative analysis (1986) (1977,1982) FAS (1975) Withinonesolver
Same fast solver Local patches of finer grids • Each level correct the equations of the next coarser level • Each patch may use different coordinate system and anisotropic grid “Quasicontiuum” method [B., 1992] and differet physics; e.g.atomistic • Each patch may use different coordinate system and anisotropic grid anddifferent physics; e.g. Atomistic
Multigrid solversCost: 25-100 operations per unknown Linear scalar elliptic equation (~1971)* Nonlinear Grid adaptation General boundaries, BCs* Discontinuous coefficients Disordered: coefficients, grid (FE) AMG Several coupled PDEs* (1980) Non-elliptic: high-Reynolds flow Highly indefinite: waves Many eigenfunctions (N) Near zero modes Gauge topology: Dirac eq. Inverse problems Optimal design Integral equations Statistical mechanics Massive parallel processing *Rigorous quantitative analysis (1986) (1977,1982) FAS (1975) Withinonesolver
Multigrid solversCost: 25-100 operations per unknown Linear scalar elliptic equation (~1971)* Nonlinear Grid adaptation General boundaries, BCs* Discontinuous coefficients Disordered: coefficients, grid (FE) AMG Several coupled PDEs* (1980) Non-elliptic: high-Reynolds flow Highly indefinite: waves Many eigenfunctions (N) Near zero modes Gauge topology: Dirac eq. Inverse problems Optimal design Integral equations Statistical mechanics Massive parallel processing *Rigorous quantitative analysis (1986) (1977,1982) FAS (1975) Withinonesolver
ALGEBRAIC MULTIGRID (AMG) 1982 Coarse variables - a subset 1. “General” linear systems 2. Variety of graph problems
Graph problems Partition: min cut Clustering (bioinformatics) Image segmentation VLSI placement Routing Linear arrangement: bandwidth, cutwidth Graph drawing low dimension embedding Coarsening: weighted aggregation Recursion: inherited couplings (like AMG) Modified by properties of coarse aggregates General principle: Multilevel objectives
Data: Filippi Detected Lesions Tagged Our results
Multigrid solversCost: 25-100 operations per unknown Linear scalar elliptic equation (~1971)* Nonlinear Grid adaptation General boundaries, BCs* Discontinuous coefficients Disordered: coefficients, grid (FE) AMG Several coupled PDEs* (1980) Non-elliptic: high-Reynolds flow Highly indefinite: waves Many eigenfunctions (N) Near zero modes Gauge topology: Dirac eq. Inverse problems Optimal design Integral equations Statistical mechanics Massive parallel processing *Rigorous quantitative analysis (1986) (1977,1982) FAS (1975) Withinonesolver
Generally: LU=F Non-local part of U has the form m Σ Ar(x) φr(x) r = 1 L φr ≈ 0 Ar(x) smooth {φr } found by local processing Ar represented on a coarser grid
Multigrid solversCost: 25-100 operations per unknown Linear scalar elliptic equation (~1971)* Nonlinear Grid adaptation General boundaries, BCs* Discontinuous coefficients Disordered: coefficients, grid (FE) AMG Several coupled PDEs* (1980) Non-elliptic: high-Reynolds flow Highly indefinite: waves Many eigenfunctions (N) Near zero modes Gauge topology: Dirac eq. Inverse problems Optimal design Integral equations Statistical mechanics Massive parallel processing *Rigorous quantitative analysis (1986) (1977,1982) FAS (1975) Withinonesolver
N eigenfunctions Electronic structures (Kohn-Sham eq): i = 1, …, N= # electrons O(N) gridpoints per yi O(N2 ) storage Orthogonalization O(N3) operations Multiscale eigenbase 1D: Livne O(NlogN) storage & operations V = Vnuclear+ V(y) One shot solver
Multigrid solversCost: 25-100 operations per unknown Linear scalar elliptic equation (~1971)* Nonlinear Grid adaptation General boundaries, BCs* Discontinuous coefficients Disordered: coefficients, grid (FE) AMG Several coupled PDEs* (1980) Non-elliptic: high-Reynolds flow Highly indefinite: waves Many eigenfunctions (N) Near zero modes Gauge topology: Dirac eq. Inverse problems Optimal design Integral equationsFull matrix Statistical mechanics Massive parallel processing *Rigorous quantitative analysis (1986) (1977,1982) FAS (1975) Withinonesolver
Integro-differential Equation differential , dense Multigrid solver Distributive relaxation: 1st order 2nd order Solution cost ≈ one fast transform(one matrix multiply)
Integral Transforms G(x,x) Transform Complexity O(n logn) Fourier Laplace O(n logn) O(n) Gauss Potential O(n) G(x,x) * Exp(ikx) O(n logn) Waves
G(x,y) Glocal Gsmooth s |x-y| ~ 1 / | x – y | s ~ next coarser scale G(x,y) = Gsmooth(x,y) + Glocal(x,y) Gsmooth(x,y) tranferred directly to coarser O(n) not static!
Multigrid solversCost: 25-100 operations per unknown Linear scalar elliptic equation (~1971)* Nonlinear Grid adaptation General boundaries, BCs* Discontinuous coefficients Disordered: coefficients, grid (FE) AMG Several coupled PDEs* (1980) Non-elliptic: high-Reynolds flow Highly indefinite: waves Many eigenfunctions (N) Near zero modes Gauge topology: Dirac eq. Inverse problems Optimal design Integral equations Statistical mechanics Monte-Carlo Massive parallel processing *Rigorous quantitative analysis (1986) (1977,1982) FAS (1975) Withinonesolver
Multiscale ~ DiscretizationLattice for accuracy Monte Carlocost ~ “volume factor” “critical slowing down” Multigrid moves Many sampling cycles at coarse levels
Scale-born obstacles: • Many variablesn gridpoints / particles / pixels / … • Interacting with each otherO(n2) • Slowness Slowly converging iterations / Slow Monte Carlo / Small time steps / … • due to • Localness of processing • Attraction basins Removed by multiscale processing
Repetitive systemse.g., same equations everywhere UPSCALING: Derivation of coarse equationsin small windows Small scale ratio at a time
Systematic Upscaling • Choosing coarse variablesCriterion: Fast equilibration of “compatible Monte Carlo” OR: Fast convergence of “compatible relaxation” Local dependence on coarse variables • Constructing coarse-leveloperational rules Done locally In representative “windows” fast
E ri tijkl rij rl rj Potential Energy Lennard-Jones Electrostatic Bond length strain Bond angle strain torsion hydrogen bond rk
Macromolecule Two orders of magnitude faster simulation
Total mass • Total momentum • Total dipole moment • average location Fluids
Windows Coarser level Larger density fluctuations Still coarser level
Total mass: Fluids Summing
Lower Temperature T Summing also Still lower T: More precise crystal direction and periods determined at coarser spatial levels Heisenberg uncertainty principle: Better orientational resolution at larger spatial scales
Optimization byMultiscale annealing Identifying increasingly larger-scale degrees of freedom at progressively lower temperatures Handling multiscale attraction basins E(r) r