Parareal Explained

Parareal is a parallel algorithm from numerical analysis and used for the solution of initial value problems.[1] It was introduced in 2001 by Lions, Maday and Turinici. Since then, it has become one of the most widely studied parallel-in-time integration methods.

Parallel-in-time integration methods

In contrast to e.g. Runge-Kutta or multi-step methods, some of the computations in Parareal can be performed in parallel and Parareal is therefore one example of a parallel-in-time integration method. While historically most efforts to parallelize the numerical solution of partial differential equations focussed on the spatial discretization, in view of the challenges from exascale computing, parallel methods for temporal discretization have been identified as a possible way to increase concurrency in numerical software.[2] Because Parareal computes the numerical solution for multiple time steps in parallel, it is categorized as a parallel across the steps method.[3] This is in contrast to approaches using parallelism across the method like parallel Runge-Kutta or extrapolation methods, where independent stages can be computed in parallel or parallel across the system methods like waveform relaxation.[4] [5]

History

Parareal can be derived as both a multigrid method in time method or as multiple shooting along the time axis.[6] Both ideas, multigrid in time as well as adopting multiple shooting for time integration, go back to the 1980s and 1990s.[7] [8] Parareal is a widely studied method and has been used and modified for a range of different applications.[9] Ideas to parallelize the solution of initial value problems go back even further: the first paper proposing a parallel-in-time integration method appeared in 1964.[10]

Algorithm

The Problem

The goal is to solve an initial value problem of the form

du
dt

=f(t,u)overt\in[t0,T]withu(t0)=u0.

The right hand side

f

is assumed to be a smooth (possibly nonlinear) function. It can also correspond to the spatial discretization of a partial differential equation in a method of lines approach. We wish to solve this problem on a temporal mesh of

N+1

equally spaced points

(t0,t1,\ldots,tN)

, where

tj+1=tj+\DeltaT

and

\DeltaT=(T-t0)/N

. Carrying out this discretisation we obtain a partitioned time interval consisting of time slices

[tj,tj+1]

for

j=0,\ldots,N-1

.

The objective is to calculate numerical approximations

Uj

to the exact solution

u(tj)

using a serial time-stepping method (e.g. Runge-Kutta) that has high numerical accuracy (and therefore high computational cost). We refer to this method as the fine solver

l{F}

, which propagates an initial value

Uj

at time

tj

to a terminal value

Uj+1

at time

tj+1

. The goal is to calculate the solution (with high numerical accuracy) using

l{F}

such that we obtain

Uj+1=l{F}(tj,tj+1,Uj),whereU0=u0.

The problem with this (and the reason for attempting to solve in parallel in the first place) solution is that it is computationally infeasible to calculate in real-time.

How it works

Instead of using a single processor to solve the initial value problem (as is done with classical time-stepping methods), Parareal makes use of

N

processors. The aim to is to use

N

processors to solve

N

smaller initial value problems (one on each time slice) in parallel. For example, in a MPI based code,

N

would be the number of processes, while in an OpenMP based code,

N

would be equal to the number of threads.

Parareal makes use of a second time-stepping method to solve this initial value problem in parallel, referred to as the coarse solver

l{G}

.The coarse solver works the same way as the fine solver, propagating an initial value over a time interval of length

\DeltaT

, however it does so at much lower numerical accuracy than

l{F}

(and therefore at much lower computational cost). Having a coarse solver that is much less computationally expensive than the fine solver is the key to achieving parallel speed-up with Parareal.

Henceforth, we will denote the Parareal solution at time

tj

and iteration

k

by
k
U
j
.

Zeroth Iteration

Firstly, run the coarse solver serially over the entire time interval

[t0,T]

to calculate an approximate initial guess to the solution:
0
U
j+1

=l{G}(tj,tj+1

0
,U
j),

j=0,\ldots,N-1.

Subsequent Iterations

Next, run the fine solver on each of the time slices, in parallel, from the most up-to-date solution values:

l{F}(tj,tj+1

k-1
,U
j),

j=0,\ldots,N-1.

Now update the parareal solution values sequentially using the predictor-corrector:

k
U
j+1

=l{G}(tj,tj+1

k
,U
j)

+l{F}(tj,tj+1

k-1
,U
j)

-l{G}(tj,tj+1

k-1
,U
j),

j=0,\ldots,N-1.

At this stage, one can use a stopping criterion to determine whether the solution values are no longer changing each iteration. For example, one may test this by checking if

|

k
U
j

-

k-1
U
j

|<\varepsilon\forallj\leqN,

and some tolerance

\varepsilon>0

. If this critertion is not satisfied, subsequent iterations can then be run by applying the fine solver in parallel and then the predictor-corrector. Once the criterion is satisfied, however, the algorithm is said to have converged in

k\leqN

iterations. Note that other stopping criterion do exist and have been successfully tested in Parareal.

Remarks

Parareal should reproduce the solution that is obtained by the serial application of the fine solver and will converge in a maximum of

N

iterations.For Parareal to provide speedup, however, it has to converge in a number of iterations significantly smaller than the number of time slices, i.e.

k\llN

.

In the Parareal iteration, the computationally expensive evaluation of

l{F}(tj,tj+1

k-1
,U
j)
can be performed in parallel on

N

processing units.By contrast, the dependency of
k
U
j+1
on

l{G}(tj,tj+1

k
,U
j)
means that the coarse correction has to be computed in serial order.

Typically, some form of Runge-Kutta method is chosen for both coarse and fine integrator, where

l{G}

might be of lower order and use a larger time step than

l{F}

.If the initial value problem stems from the discretization of a PDE,

l{G}

can also use a coarser spatial discretization, but this can negatively impact convergence unless high order interpolation is used.[11]

Speedup

Under some assumptions, a simple theoretical model for the speedup of Parareal can be derived.[12] Although in applications these assumptions can be too restrictive, the model still is useful to illustrate the trade offs that are involved in obtaining speedup with Parareal.

First, assume that every time slice

[tj,tj+1]

consists of exactly

Nf

steps of the fine integrator and of

Nc

steps of the coarse integrator.This includes in particular the assumption that all time slices are of identical length and that both coarse and fine integrator use a constant step size over the full simulation.Second, denote by

\tauf

and

\tauc

the computing time required for a single step of the fine and coarse methods, respectively, and assume that both are constant.This is typically not exactly true when an implicit method is used, because then runtimes vary depending on the number of iterations required by the iterative solver.

Under these two assumptions, the runtime for the fine method integrating over

P

time slices can be modelled as

cfine=PNf\tauf.

The runtime of Parareal using

P

processing units and performing

k

iterations is

cparareal=(k+1)PNc\tauc+kNf\tauf.

Speedup of Parareal then is

Sp=

cfine
cparareal

=

1
(k+1)
Nc
Nf
\tauc
\tauf
+
k
P

\leqmin\left\{

Nf\tauf
Nc\tauc

,

P
k

\right\}.

These two bounds illustrate the trade off that has to be made in choosing the coarse method: on the one hand, it has to be cheap and/or use a much larger time step to make the first bound as large as possible, on the other hand the number of iterations

k

has to be kept low to keep the second bound large.In particular, Parareal's parallel efficiency is bounded by

Ep=

Sp
P

\leq

1
k

,

that is by the inverse of the number of required iterations.

Instability for imaginary eigenvalues

The vanilla version of Parareal has issues for problems with imaginary eigenvalues. It typically only converges toward the very last iterations, that is as

k

approaches

N

, and the speedup

Sp

is always going to be smaller than one. So either the number of iterations is small and Parareal is unstable or, if

k

is large enough to make Parareal stable, no speedup is possible. This also means that Parareal is typically unstable for hyperbolic equations.[13] Even though the formal analysis by Gander and Vandewalle covers only linear problems with constant coefficients, the problem also arises when Parareal is applied to the nonlinear Navier–Stokes equations when the viscosity coefficient becomes too small and the Reynolds number too large.[14] Different approaches exist to stabilise Parareal,[15] [16] [17] one being Krylov-subspace enhanced Parareal.

Variants

There are multiple algorithms that are directly based or at least inspired by the original Parareal algorithm.

Krylov-subspace enhanced Parareal

Early on it was recognised that for linear problems information generated by the fine method

l{F}\delta

can be used to improve the accuracy of the coarse method

l{G}\Delta

. Originally, the idea was formulated for the parallel implicit time-integrator PITA,[18] a method closely related to Parareal but with small differences in how the correction is done. In every iteration

k

the result

l{F}\delta

k
(U
j)
is computed for values
k
u
j

\inRd

for

j=0,\ldots,N-1

. Based on this information, the subspace

Sk:=\left\{

k'
U
j

:0\leqk'\leqk,j=0,\ldots,N-1\right\}

is defined and updated after every Parareal iteration.[19] Denote as

Pk

the orthogonal projection from

Rd

to

Sk

. Then, replace the coarse method with the improved integrator

l{K}\Delta(u)=l{F}\delta(Pku)+l{G}\Delta((I-Pk)u)

.

As the number of iterations increases, the space

Sk

will grow and the modified propagator

l{K}\Delta

will become more accurate. This will lead to faster convergence. This version of Parareal can also stably integrate linear hyperbolic partial differential equations.[20] An extension to nonlinear problems based on the reduced basis method exists as well.

Hybrid Parareal spectral deferred corrections

A method with improved parallel efficiency based on a combination of Parareal with spectral deferred corrections (SDC) [21] has been proposed by M. Minion.[22] It limits the choice for coarse and fine integrator to SDC, sacrificing flexibility for improved parallel efficiency. Instead of the limit of

1/k

, the bound on parallel efficiency in the hybrid method becomes

Ep\leq

ks
kp

with

ks

being the number of iterations of the serial SDC base method and

kp

the typically greater number of iterations of the parallel hybrid method. The Parareal-SDC hybrid has been further improved by addition of a full approximation scheme as used in nonlinear multigrid. This led to the development of the parallel full approximation scheme in space and time (PFASST).[23] Performance of PFASST has been studied for PEPC, a Barnes-Hut tree code based particle solver developed at Juelich Supercomputing Centre. Simulations using all 262,144 cores on the IBM BlueGene/P system JUGENE showed that PFASST could produce additional speedup beyond saturation of the spatial tree parallelisation.[24]

Multigrid reduction in time (MGRIT)

The multigrid reduction in time method (MGRIT) generalises the interpretation of Parareal as a multigrid-in-time algorithms to multiple levels using different smoothers.[25] It is a more general approach but for a specific choice of parameters it is equivalent to Parareal. The XBraid library implementing MGRIT is being developed by Lawrence Livermore National Laboratory.

ParaExp

ParaExp uses exponential integrators within Parareal.[26] While limited to linear problems, it can produce almost optimal parallel speedup.

External links

Notes and References

  1. Lions. Jacques-Louis. Maday. Yvon. Turinici. Gabriel. 2015. A "parareal" in time discretization of PDE's]. Comptes Rendus de l'Académie des Sciences, Série I. 332. 7. 661–668. 2001CRASM.332..661L . 10.1016/S0764-4442(00)01793-6.
  2. Jack Dongarra . Jeffrey Hittinger . John Bell . Luis Chacon . Robert Falgout . Michael Heroux . Paul Hovland . Esmond Ng . Clayton Webster . Stefan Wild . March 2014 . Applied Mathematics Research for Exascale Computing . US Department of Energy . August 29, 2015.
  3. Burrage. Kevin. 1997. Parallel methods for ODEs. Advances in Computational Mathematics. 7. 1–2. 1–31. 10.1023/A:1018997130884. 15778447.
  4. Iserles. A.. NøRSETT. S. P.. 1990-10-01. On the Theory of Parallel Runge—Kutta Methods. IMA Journal of Numerical Analysis. en. 10. 4. 463–488. 10.1093/imanum/10.4.463. 0272-4979.
  5. Ketcheson. David. Waheed. Umair bin. 2014-06-13. A comparison of high-order explicit Runge–Kutta, extrapolation, and deferred correction methods in serial and parallel. Communications in Applied Mathematics and Computational Science. 9. 2. 175–200. 10.2140/camcos.2014.9.175. 2157-5452. 1305.6165. 15242644 .
  6. Gander. Martin J.. Vandewalle. Stefan. 2007. Analysis of the Parareal Time-Parallel Time-Integration Method. SIAM Journal on Scientific Computing. 29. 2. 556–578. 10.1137/05064607X. 10.1.1.154.6042.
  7. Book: Hackbusch , Wolfgang . 1985. Parabolic multi-grid methods. Computing Methods in Applied Sciences and Engineering, VI. 189–197 . August 29, 2015. 9780444875976.
  8. Kiehl. Martin. 1994. Parallel multiple shooting for the solution of initial value problems. Parallel Computing. 20. 3. 275–295. 10.1016/S0167-8191(06)80013-X.
  9. Gander . Martin J. . 50 years of Time Parallel Time Integration . Springer International Publishing . Contributions in Mathematical and Computational Sciences . 9 . 1 . 2015 . 10.1007/978-3-319-23321-5 . 978-3-319-23321-5 . free .
  10. Nievergelt. Jürg. 1964. Parallel methods for integrating ordinary differential equations. Communications of the ACM. 7. 12. 731–733. 10.1145/355588.365137. 6361754. free.
  11. Ruprecht. Daniel. 2014-12-01. Convergence of Parareal with spatial coarsening. Proceedings in Applied Mathematics and Mechanics. en. 14. 1. 1031–1034. 10.1002/pamm.201410490. 26356904 . 1617-7061.
  12. Minion. Michael L.. 2010. A Hybrid Parareal Spectral Deferred Corrections Method. Communications in Applied Mathematics and Computational Science. 5. 2. 265–301. 10.2140/camcos.2010.5.265. free.
  13. Book: Stability of the Parareal Algorithm. Staff. Gunnar Andreas. Rønquist. Einar M.. 2005-01-01. Springer Berlin Heidelberg. 9783540225232. Barth. Timothy J.. Lecture Notes in Computational Science and Engineering. 449–456. en. 10.1007/3-540-26825-1_46. Griebel. Michael. Keyes. David E.. Nieminen. Risto M.. Roose. Dirk. Schlick. Tamar. Kornhuber. Ralf. Hoppe. Ronald. Périaux. Jacques.
  14. Book: Steiner. Johannes. Ruprecht. Daniel. Speck. Robert. Krause. Rolf. Numerical Mathematics and Advanced Applications - ENUMATH 2013 . Convergence of Parareal for the Navier-Stokes Equations Depending on the Reynolds Number . 2015-01-01. Springer International Publishing. 9783319107042. Abdulle. Assyr. Lecture Notes in Computational Science and Engineering. 103 . 195–202. en. 10.1007/978-3-319-10705-9_19. Deparis. Simone. Kressner. Daniel. Nobile. Fabio. Picasso. Marco. 10.1.1.764.6242.
  15. Dai. X.. Maday. Y.. 2013-01-01. Stable Parareal in Time Method for First- and Second-Order Hyperbolic Systems. SIAM Journal on Scientific Computing. 35. 1. A52–A78. 10.1137/110861002. 1201.1064 . 2013SJSC...35A..52D . 32336370. 1064-8275.
  16. Farhat. Charbel. Cortial. Julien. Dastillung. Climène. Bavestrello. Henri. 2006-07-30. Time-parallel implicit integrators for the near-real-time prediction of linear structural dynamic responses. International Journal for Numerical Methods in Engineering. en. 67. 5. 697–724. 10.1002/nme.1653. 1097-0207. 2006IJNME..67..697F. 121254646 .
  17. Book: Chen. Feng. Hesthaven. Jan S.. Zhu. Xueyu. Reduced Order Methods for Modeling and Computational Reduction . On the Use of Reduced Basis Methods to Accelerate and Stabilize the Parareal Method . 2014-01-01. Springer International Publishing. 9783319020891. Alfio Quarteroni. Quarteroni. Alfio. MS&A - Modeling, Simulation and Applications. 187–214. en. 10.1007/978-3-319-02090-7_7. Rozza. Gianluigi. Gianluigi Rozza.
  18. Farhat. Charbel. Chandesris. Marion. 2003-11-07. Time-decomposed parallel time-integrators: theory and feasibility studies for fluid, structure, and fluid–structure applications. International Journal for Numerical Methods in Engineering. en. 58. 9. 1397–1434. 10.1002/nme.860. 1097-0207. 2003IJNME..58.1397F. 61667246 .
  19. Gander. M.. Petcu. M.. Analysis of a Krylov subspace enhanced parareal algorithm for linear problems. ESAIM: Proceedings. 25. 114–129. 10.1051/proc:082508. 2008. free.
  20. Ruprecht. D.. Krause. R.. 2012-04-30. Explicit parallel-in-time integration of a linear acoustic-advection system. Computers & Fluids. 59. 72–83. 10.1016/j.compfluid.2012.02.015. 1510.02237. 15703896 .
  21. Dutt. Alok. Greengard. Leslie. Rokhlin. Vladimir. 2000-06-01. Spectral Deferred Correction Methods for Ordinary Differential Equations. BIT Numerical Mathematics. en. 40. 2. 241–266. 10.1023/A:1022338906936. 43449672 . 0006-3835.
  22. Minion. Michael. 2011-01-05. A hybrid parareal spectral deferred corrections method. Communications in Applied Mathematics and Computational Science. 5. 2. 265–301. 10.2140/camcos.2010.5.265. 2157-5452. free.
  23. Emmett. Matthew. Minion. Michael. 2012-03-28. Toward an efficient parallel in time method for partial differential equations. Communications in Applied Mathematics and Computational Science. 7. 1. 105–132. 10.2140/camcos.2012.7.105. 2157-5452. free.
  24. Book: Speck. R.. Ruprecht. D.. Krause. R.. Emmett. M.. Minion. M.. Winkel. M.. Gibbon. P.. 2012 International Conference for High Performance Computing, Networking, Storage and Analysis . A massively space-time parallel N-body solver . 2012-11-01. 1–11. 10.1109/SC.2012.6. 978-1-4673-0805-2. 1620219 .
  25. Falgout. R.. Friedhoff. S.. Kolev. T.. MacLachlan. S.. Schroder. J.. 2014-01-01. Parallel Time Integration with Multigrid. SIAM Journal on Scientific Computing. 36. 6. C635–C661. 10.1137/130944230. 2014SJSC...36C.635F . 1064-8275. 10.1.1.701.2603.
  26. Gander. M.. Güttel. S.. 2013-01-01. PARAEXP: A Parallel Integrator for Linear Initial-Value Problems. SIAM Journal on Scientific Computing. 35. 2. C123–C142. 10.1137/110856137. 2013SJSC...35C.123G . 1064-8275. 10.1.1.800.5938.