applications of the parareal algorithm

24
Applications of the Parareal Algorithm Ma. Cristina Bargo Laboratoire Jacques-Louis Lions Université Pierre et Marie Curie University of the Philippines Diliman Groupe de Travail des Thésards June 2, 2009 MC Bargo (UPMC + UPD) Applications of the Parareal Algorithm GTT June 2, 2009 1 / 21

Upload: tinabargo

Post on 07-Apr-2015

117 views

Category:

Documents


0 download

DESCRIPTION

Presented at Groupe de Travail des Thésards, 2 June 2009

TRANSCRIPT

Page 1: Applications of the Parareal Algorithm

Applications of the Parareal Algorithm

Ma. Cristina Bargo

Laboratoire Jacques-Louis LionsUniversité Pierre et Marie Curie

University of the Philippines Diliman

Groupe de Travail des ThésardsJune 2, 2009

MC Bargo (UPMC + UPD) Applications of the Parareal Algorithm GTT June 2, 2009 1 / 21

Page 2: Applications of the Parareal Algorithm

Outline

1 OverviewHistoryThe AlgorithmSome RemarksConvergence ResultsStability ResultsSimple ImplementationComplexity

2 ApplicationsPublished Works on PararealCurrent Work

Parareal with GPUsParareal on Reactive FlowsParareal Applied to the KdVB equation

MC Bargo (UPMC + UPD) Applications of the Parareal Algorithm GTT June 2, 2009 2 / 21

Page 3: Applications of the Parareal Algorithm

History

Lions, Maday and Turinici [5] (2001)Bal and Maday [2] (2002) - equivalent to [5] for linear problems, butwith better results for nonlinear problemsBaffico et al [1] (2002)

MC Bargo (UPMC + UPD) Applications of the Parareal Algorithm GTT June 2, 2009 3 / 21

Page 4: Applications of the Parareal Algorithm

The AlgorithmThe ProblemFind u such that

(1)

{∂tu +A (t,u) = 0, t > t0

u = u0, t = t0

where A : R× V → V ′ (V a Hilbert space) and t0 ≥ 0.

Remarks :If solution to (1) exists : Solution can be written asu(t+ τ) = E(t+ τ, t,v), where v = u(t) and τ > 0, with

∀µ > 0, τ > 0, E (t+ τ + µ, t+ τ, E(t+ τ, t,v)) = E(t+τ +µ, t,v)

Let t0 = T0 < T1 < · · · < TN = T , and ∆Tn = Tn − Tn−1. Then

∀n > 0, u(Tn) = E(Tn, T0,u0) = E(Tn, Tn−1,u(Tn−1))

MC Bargo (UPMC + UPD) Applications of the Parareal Algorithm GTT June 2, 2009 4 / 21

Page 5: Applications of the Parareal Algorithm

The Algorithm

Notations :Fine solver F (t2, t1,u1) - approximation of the solution u(t2) toproblem (1) with initial condition u(t1) = u1

Coarse solver G(t2, t1,u1) - another approximation to u(t2), lessaccurate than F (t2, t1,u1) but cheaper to solve

Parareal AlgorithmU0

0 = u0 (the initial condition in problem (1))U0n+1 = G(tn+1, tn,U0

n) (the coarse solver)For k = 1, 2, · · · , Uk

0 = u0 and

(2) Uk+1n+1 = G(tn+1, tn,Uk+1

n ) + F (tn+1, tn,Ukn)−G(tn+1, tn,Uk

n)

MC Bargo (UPMC + UPD) Applications of the Parareal Algorithm GTT June 2, 2009 5 / 21

Page 6: Applications of the Parareal Algorithm

Some Remarks

F can be a classical discretization scheme with small timestep δtG can be another discretization scheme with a larger timestep δT(δT >> δt)At iteration k + 1 : F (tn+1, tn,Uk

n) and G(tn+1, tn,Ukn) dependent

only on values obtained from iteration k → can be done in parallelwith N processorsFor k →∞, then Uk

n → Un where

Un+1 = F (tn+1, t0,U0) = F (tn+1, tn,Un)

∀n = 0, 1, 2, · · · , N we can show that Unn = Un

MC Bargo (UPMC + UPD) Applications of the Parareal Algorithm GTT June 2, 2009 6 / 21

Page 7: Applications of the Parareal Algorithm

Convergence Results

Maday, Rønquist and Staff, 2006 [6] :Let δF = E − F and δG = E −G. If ∀τ > 0,

|δF (t+ τ, t, x)| ≤ Cτη(1 + |x|), |δG(t+ τ, t, x)| ≤ Cτε(1 + |x|)

and in addition, if ∀τ ,

|δF (t+ τ, t, x)− δF (t+ τ, t, y)| ≤ Cτη|x− y|,

and|δG(t+ τ, t, x)− δG(t+ τ, t, y)| ≤ Cτε|x− y|.

Then the error between the exact solution and the parareal solution satisfies

(3) |Ukn − u(Tn)| ≤ C(εk + η), ∀Tn < T

where k ≤ K with some fixed K < N/2.

MC Bargo (UPMC + UPD) Applications of the Parareal Algorithm GTT June 2, 2009 7 / 21

Page 8: Applications of the Parareal Algorithm

Stability Results

Staff and Rønquist, 2005 [10] :Assume that we want to solve the autonomous differential equation

y′ = µy, y(0) = y0, 0 > µ ∈ R

using the parareal algorithm. Assume also that the system is stiff, meaningthat z = µ∆T << −1, and that the fine propagator is close to exact.Then the stability function can be written as

H(n, k,R) = (−1)k(n− 1k

)Rn,

and stability is guaranteed if the following property is fulfilled :

(4) R∞ = limz→−∞

|R(z)| < 12

MC Bargo (UPMC + UPD) Applications of the Parareal Algorithm GTT June 2, 2009 8 / 21

Page 9: Applications of the Parareal Algorithm

Simple Implementation

Sample Problem : Find u =[u1 u2

]T so that∂u∂t = Au, t ∈ (0, 100]

u = u0 =[

1 0]T, t = 0

where A is the 2× 2 matrix given by

A =[−0.02 0.2−0.2 −0.02

]

MC Bargo (UPMC + UPD) Applications of the Parareal Algorithm GTT June 2, 2009 9 / 21

Page 10: Applications of the Parareal Algorithm

Simple Implementation

t0 = 0 and T = 100N = 100 and ∆Tn = ∆T = 1Coarse scheme : Implicit Euler with δT = ∆T = 1Fine scheme : Implicit Euler with δt = 0.1Horizontal axis is u1 and the vertical axis is u2

fine scheme : 0.62 sparareal scheme : 0.29496 s

MC Bargo (UPMC + UPD) Applications of the Parareal Algorithm GTT June 2, 2009 10 / 21

Page 11: Applications of the Parareal Algorithm

Simple ImplementationIteration 0

MC Bargo (UPMC + UPD) Applications of the Parareal Algorithm GTT June 2, 2009 11 / 21

Page 12: Applications of the Parareal Algorithm

Simple ImplementationIteration 1

MC Bargo (UPMC + UPD) Applications of the Parareal Algorithm GTT June 2, 2009 12 / 21

Page 13: Applications of the Parareal Algorithm

Simple ImplementationIteration 2

MC Bargo (UPMC + UPD) Applications of the Parareal Algorithm GTT June 2, 2009 13 / 21

Page 14: Applications of the Parareal Algorithm

Simple ImplementationIteration 3

MC Bargo (UPMC + UPD) Applications of the Parareal Algorithm GTT June 2, 2009 14 / 21

Page 15: Applications of the Parareal Algorithm

Simple ImplementationIteration 4

MC Bargo (UPMC + UPD) Applications of the Parareal Algorithm GTT June 2, 2009 15 / 21

Page 16: Applications of the Parareal Algorithm

Complexity

complexity α number of time stepsfine scheme : N∆T

δt CFparareal scheme with N processors : KNCG + (K − 1)N ∆T

δt CFlocal complexity for parareal : KNCG + (K − 1)∆T

δt CFRemarks :

if CG is negligible compared with CF → efficiency : N/(K − 1)K should be small (ideally K = 2)choice of G : close enough to F but cheap to solve

MC Bargo (UPMC + UPD) Applications of the Parareal Algorithm GTT June 2, 2009 16 / 21

Page 17: Applications of the Parareal Algorithm

Published Works on Parareal

pricing of an American put (Bal and Maday, 2002 [2])molecular dynamics simulations (Baffico et al, 2002 [1]) - fine schemeuses the full model, coarse scheme is based on a simpler model of theoriginalcontrol problems (Maday and Turinici, 2002 [7])combined with domain-decomposition methods (Maday and Turinici,2005 [8])Navier-Stokes (Fischer, Hecht and Maday, 2005 [4]) - using fine andcoarse mesh in space

MC Bargo (UPMC + UPD) Applications of the Parareal Algorithm GTT June 2, 2009 17 / 21

Page 18: Applications of the Parareal Algorithm

Parareal with GPUs

NVIDIA R© CUDATM (compute unified device architecture) -computations with GPUsCPU : double precision ; GPU : single precisionapplications

I Accelerating numerical solution of Stochastic Differential Equationswith CUDA (Januszewski and Kostur, 2009) : up to 675x

I GPU accelerated Monte Carlo simulation of the 2D and 3D Ising model(Preisa et al, 2009) : up to 60x

I Many-Core Algorithms for Statistical Phylogenetics (Suchard andRambaut, 2009) : up to 90x

I Solving Kinetic Equations on GPUs I : Model Kinetic Equations(Frezzotti et al, 2009) : up to 500x

Idea :I Solve the fine scheme using CPUs (in double precision)I Solve the coarse scheme using GPUs (in single precision)

MC Bargo (UPMC + UPD) Applications of the Parareal Algorithm GTT June 2, 2009 18 / 21

Page 19: Applications of the Parareal Algorithm

Parareal on Reactive Flows

uses the idea in Baffico et al [1] of using the simpler version of theoriginal modeladaptive chemistry approach by Schwer, Lu and Green (2003) [9] -“active species” vary with spatial locationIdea :

I Use the adaptive chemistry for the coarse schemeI Use the full chemistry for the fine scheme

MC Bargo (UPMC + UPD) Applications of the Parareal Algorithm GTT June 2, 2009 19 / 21

Page 20: Applications of the Parareal Algorithm

Parareal Applied to the KdVB equation

KdVB Equation

(5) ut+uux =1Ruxx+uxxx, ux(−∞) = 0, u(−∞) = 1, u(∞) = 0

Idea :uses the idea in Baffico et al [1]uses the idea in Fischer et al [4] - solve the problem in a coarse spatialmesh for the coarse scheme, and use a finer mesh in space for the finescheme

Modified Parareal Algorithm

(6)Uk+1n+1 = πFCG(tn+1, tn, π

CFUk+1

n )+F (tn+1, tn,Ukn)−πFGG(tn+1, tn, π

GFUk

n)

MC Bargo (UPMC + UPD) Applications of the Parareal Algorithm GTT June 2, 2009 20 / 21

Page 21: Applications of the Parareal Algorithm

Coarse Scheme : Average Equation

Based on the work by Chorin [3] :

Let u(x, t) =12`

∫ x+`

x−`u(y, t)dy (local average of the solution u in (5))

Effective Equation

(7) vt + vvx = νeffvxx + vxxx

with the same initial and boundary conditions in (5)

Note : νeff is the constant that minimizes

I =∫ +∞

−∞|u(x, t)− v(x, t)|2dx

and νeff = R3/4Φ(`)

MC Bargo (UPMC + UPD) Applications of the Parareal Algorithm GTT June 2, 2009 21 / 21

Page 22: Applications of the Parareal Algorithm

L. Baffico, S. Bernard, Y. Maday, G. Turinici, and G. Zérah.Parallel-in-time molecular-dynamics simulations.Phys. Rev. E, 66(5) :057701, Nov 2002.

Guillaume Bal and Yvon Maday.A “parareal” time discretization for nonlinear PDE’s with application tothe pricing of an american put.In L.F. Pavarino and A. Toselli, editors, Recent Developments inDomain Decomposition Methods, volume 23 of Lecture Notes inComputational Science and Engineering, pages 189–202.Springer-Verlag, Berlin, 2002.

Alexandre J. Chorin.Averaging and renormalization for the Korteveg-deVries-Burgersequation.Proc. Natl. Acad. Sci. USA, 100(17) :9674–9679, 2003.

Paul F. Fischer, Frédéric Hecht, and Yvon Maday.A parareal in time semi-implicit approximation of the Navier-Stokesequations.

MC Bargo (UPMC + UPD) Applications of the Parareal Algorithm GTT June 2, 2009 21 / 21

Page 23: Applications of the Parareal Algorithm

In Domain Decomposition Methods in Science and Engineering,volume 40 of Lecture Notes in Computational Science and Engineering,pages 433–440. Springer, Berlin, 2005.

Jacques-Louis Lions, Yvon Maday, and Gabriel Turinici.Résolution d’EDP par un schéma en temps “pararéel”.C. R. Acad. Sci. Paris Sér. I Math., 332(7) :661–668, 2001.

Y. Maday, E.M. Rø nquist, and G.A. Staff.The parareal-in-time algorithm : basics, stability and more.2006.

Yvon Maday and Gabriel Turinici.A parareal in time procedure for the control of partial differentialequations.C. R. Math. Acad. Sci. Paris, 335(4) :387–392, 2002.

Yvon Maday and Gabriel Turinici.The parareal in time iterative solver : a further direction to parallelimplementation.

MC Bargo (UPMC + UPD) Applications of the Parareal Algorithm GTT June 2, 2009 21 / 21

Page 24: Applications of the Parareal Algorithm

In Domain decomposition methods in science and engineering,volume 40 of Lecture Notes in Computational Science and Engineering,pages 441–448. Springer, Berlin, 2005.

Douglas A Schwer, Pisi Lu, and William Jr. H. Green.An adaptive chemistry approach to modeling complex kinetics inreacting flows.Combustion and Flame, 133(4) :451–465, 2003.

Gunnar Andreas Staff and Einar M. Rønquist.Stability of the parareal algorithm.In Domain Decomposition Methods in Science and Engineering,volume 40 of Lecture Notes in Computational Science and Engineering,pages 449–456. Springer, Berlin, 2005.

MC Bargo (UPMC + UPD) Applications of the Parareal Algorithm GTT June 2, 2009 21 / 21