Feasibility Study of the Parareal Algorithm
Total Page:16
File Type:pdf, Size:1020Kb
Feasibility study of the parareal algorithm Allan S. Nielsen Kongens Lyngby 2012 IMM-MSc-2012-nr.134 Technical University of Denmark Informatics and Mathematical Modelling Building 321, DK-2800 Kongens Lyngby, Denmark Phone +45 45253351, Fax +45 45882673 [email protected] www.imm.dtu.dk IMM-MSc-2012-nr.134 Summary (English) A general introduction to the topic of time-domain parallelism with motivation is given in Chapter1. The ’parareal’ algorithm itself along with pseudo-code for a simple implementation and all the basic properties are presented in chapter2. Chapter3 contains a comprehensive review of the research literature available as well as current state-of-the-art implementations of parareal. Investigations on the convergence rate of the algorithm applied to various types of differential equations using various numerical schemes as operators in the algorithm is pre- sented in Chapter4, followed by an investigation in Chapter5 on optimal coarse propagator parameter choice when considering the distribution of parallel work. In this context a heuristic for the optimal choice of coarse propagator accuracy is proposed. In Chapter6 the parareal algorithm is applied to a non-linear free surface water wave model. The convergence rate is analysed in a Matlab implementations of the algorithm, simulating the parallelism for a range of dif- ferent wave types. As will be shown, the non-linearity of the wave and the water depth influence the parallel efficiency that can be obtained using the parareal algorithm. In Chapter7 a large scale implementation of parareal is tested using a fully distributed task scheduling model to distribute the work that is to be computed concurrently on GPUs. The GPU implementation constitute a novel contribution to the literature on parareal. The findings in the report are sum- marized with a discussion on the feasibility and future outlook of the parareal algorithm for the parallel solution of initial value problems. ii Summary (Danish) En general introduktion til tids domæne parallisme samt grunde og motivation for at indføre dette er givet i kapitel1, mens basale egenskaber ved algorithm præsenteres i kapitel2. Kapitel3 indeholder et omfattende litteraturstudie samt oversigt over nuværende state-of-the-art forskning indenfor parareal algoritmen. Undersøgelser af algoritmens konvergens rate for forskellige differential syste- mer med anvendelser af en række numeriske operatorer præsenteres i kapitel4 efterfulgt af en undersøgelse i kapitel5 omkring optimal parameter valg af den grove numeriske tids-integrator når der tages højde for distribution af parallelt arbejde. I denne sammenhæng forslås en heuristik til optimal valg af præcision af denne integrator. I kapitel6 anvendes parareal algorithm til parallel accelera- tion af en ikke-lineær fri overflade vandbølge model. Her undersøges konvergens raten først grundigt ved hjælp af en rent sekventiel matlab implementering for forskellige bølge typer da det viser sig at ikke-lineariteten af modellen samt vand- dybden influere den opnåelige parallelle effektivitet. I kapitel7 introduceres en stor skala model af parareal ved anvendelse af en fuldt distribueret arbejds- delings model og mange GPUer, hvilket udgør et nyt bidrag til litteraturen. Afslutningsvis opsummeres rapportens konklusioner i kapitel 7.4 med en diskus- sion af de anvendelsemæssige perspektiver af parareal til parallel acceleration af løsningen af begyndelsesværdiproblemer. iv Preface This thesis was prepared at the department of Informatics and Mathematical Modelling at the Technical University of Denmark in partial fulfilment of the requirements for acquiring the Master of Science in Mathematical Modelling and Computation. The topic of the thesis is the parareal algorithm, a method for extracting par- allelism in the solution of evolution problems. The potential for extracting parallelism in an otherwise seemingly sequential integration makes the parareal method interesting in the light of modern many-core architecture developments. The idea and purpose of the thesis is to investigate the applicability and poten- tial usefulness of the algorithm as much work at DTU Informatics is somehow affiliated with the numerical solution of differential equations. Lyngby, 5th of September 2012 Allan S. Nielsen vi Acknowledgements I would like acknowledge my gratitude towards my thesis supervisor Allan P. Engsig Karup for advice and guidance as well as many thorough discussions throughout the project. I would also like to thank my external supervisor Jan S. Hesthaven for supplying valuable literature contributions and feedback as well as access to the Oscar cluster at Brown University for tests using many GPUs. In addition i have had the pleasure to work with Stefan L. Glimberg and his GPUlab library, supplying numerical solvers for the solution of the non-linear free surface water wave model to be tested with parareal. Throughout the project i have made use of various compute resources and Bernd Dammann at IMM has been very kind to assist with questions arising in the usage of these resources, including the IMM GPUlab workstations, the General Access Central DTU HPC Cluster as well as the Oscar Compute Cluster at the Center for Computation & Visualization at Brown University. viii Contents Summary (English)i Summary (Danish) iii Prefacev Acknowledgements vii 1 Introduction1 1.1 Motivation for parallelism in numerical algorithms.......2 1.2 Parallelism in the time domain..................4 2 The Parareal Method7 2.1 The Algorithmic Idea........................7 2.2 An algebraic interpretation..................... 11 2.3 A Visual Presentation........................ 12 2.4 Complexity and parallel efficiency.................. 15 2.5 Summary............................... 17 3 A Survey of Present Work 19 3.1 Stability and Convergence...................... 20 3.2 Strong and Weak Scaling...................... 27 3.3 Distribution of parallel work..................... 29 3.4 Stopping criteria........................... 34 3.5 Various ways to reduce the coarse propagation.......... 38 3.6 Combination with Domain Decomposition............. 39 3.7 Problems on which Parareal has been applied........... 41 3.8 Ongoing challenges and further work................ 44 x CONTENTS 4 Experimental investigation of convergence and stability 47 4.1 Test Equation............................. 49 4.2 Bernoulli............................... 51 4.3 Linear ODE system......................... 53 4.4 Van der Pol Oscillator........................ 56 4.5 Two-dimensional diffusion...................... 58 4.6 Summary............................... 62 5 Efficiency and speed-up 63 5.1 The issue of optimal efficiency................... 64 5.2 Experimental investigations.................... 66 5.3 Summary.............................. 75 6 Application to nonlinear free surface flows 77 6.1 Introducing the PDE system.................... 78 6.2 Weak and Strong Scaling...................... 81 6.3 Stability of long time integration................. 83 6.4 Convergence speed on parameter space.............. 94 6.5 Summary.............................. 100 7 A Large-Scale GPU Based Implementation 101 7.1 The fully distributed task scheduling model........... 102 7.2 Single node implementation.................... 104 7.3 Grid level implementation..................... 107 7.4 Summary.............................. 108 Concluding remarks 109 Bibliography 111 Chapter 1 Introduction In 2001, a new algorithm for the solution of evolution problems in parallel was proposed by Lions, Maday and Turinici [41]. The algorithm was named parareal on the prospects of being able to perform real time simulations by introducing large-scale parallelism in the time domain. In this introductory chapter, the motivation for increased parallelism in numer- ical algorithms for the solution of ordinary and partial differential equations is clarified with respect to current hardware trends and modern compute architec- tures. As well as serving as a motivation, the chapter includes a short review of previous attempts at introducing parallelism in the time domain such as the time parallel multigrid methods and the waveform relaxation techniques. The methods are briefly illustrated and discussed with respect to the parareal al- gorithm proposed by Lion et. al. (2001) The current predictor-corrector form of parareal algorithm was first proposed in 2002 by Baffico et. al. [4] and sev- eral variants of the method has been proposed [23, 29]. The parareal algorithm has received a lot of attention over the past few years, particularly from the domain decomposition literature. In chapter2, the algorithm is presented as in [27] where it was shown that the parareal algorithm can be seen as either a variant of the multiple shooting method, or a two level multigrid method with aggressive time coarsening. The chapter also includes a simple implementation example and an overview of essential algorithmic properties. Chapter3 contains an extensive survey of the present state of research as well as an overview of 2 Introduction which problems the algorithm has been tested on. In chapter4 the implementation of the parareal algorithm applied to a range of equations from ODE systems to PDEs are presented along with convergence measurements and parallel speedup estimates. Chapter5 extend the demon- strations of chapter4 with a theoretical analysis of convergence in conjunction with an efficiency analysis, followed by a discussion on heuristics for optimal parameter choice. The final two chapters of the report are