Algorithm 1016

In this article, we introduce the Python framework PyMGRIT, which implements the multigrid-reduction-in-time (MGRIT) algorithm for solving (non-)linear systems arising from the discretization of time-dependent problems. The MGRIT algorithm is a reduction-based iterative method that allows parallel-in-time simulations, i.e., calculating multiple time steps simultaneously in a simulation, using a time-grid hierarchy. The PyMGRIT framework includes many different variants of the MGRIT algorithm, ranging from different multigrid cycle types and relaxation schemes, various coarsening strategies, including time-only and space-time coarsening, and the ability to utilize different time integrators on different levels in the multigrid hierachy. The comprehensive documentation with tutorials and many examples and the fully documented code allow an easy start into the work with the package. The functionality of the code is ensured by automated serial and parallel tests using continuous integration. PyMGRIT supports serial runs suitable for prototyping and testing of new approaches, as well as parallel runs using the Message Passing Interface (MPI). In this manuscript, we describe the implementation of the MGRIT algorithm in PyMGRIT and present the usage from both a user and a developer point of view. Three examples illustrate different aspects of the package itself, especially running tests with pure time parallelism, as well as space-time parallelism through the coupling of PyMGRIT with PETSc or Firedrake.

[1]  Christophe Geuzaine,et al.  Analysis of a permanent magnet generator with dual formulations using periodicity conditions and moving band , 2002 .

[2]  L. Vandevelde,et al.  Multi-slice FE modeling of electrical machines with skewed slots-the skew discretization error , 2001 .

[3]  A. Katz,et al.  Parallel Time Integration with Multigrid Reduction for a Compressible Fluid Dynamics Application , 2014 .

[4]  Christophe Geuzaine,et al.  A general environment for the treatment of discrete problems and its application to the finite element method , 1998 .

[5]  Robert D. Falgout,et al.  Parallel-in-Time Solution of Power Systems with Scheduled Events , 2018, 2018 IEEE Power & Energy Society General Meeting (PESGM).

[6]  Hans De Sterck,et al.  Parallel-In-Time Multigrid with Adaptive Spatial Coarsening for The Linear Advection and Inviscid Burgers Equations , 2019, SIAM J. Sci. Comput..

[7]  Joel Nothman,et al.  SciPy 1.0-Fundamental Algorithms for Scientific Computing in Python , 2019, ArXiv.

[8]  Sebastian Schöps,et al.  Parallel-In-Time Simulation of Eddy Current Problems Using Parareal , 2017, IEEE Transactions on Magnetics.

[9]  Sebastian Schöps,et al.  Multigrid-reduction-in-time for Eddy Current problems , 2019, ArXiv.

[10]  Stephanie Friedhoff,et al.  PyMGRIT: A Python Package for the parallel-in-time method MGRIT , 2020, ACM Trans. Math. Softw..

[11]  Sebastian Schöps,et al.  Structural analysis of electrical circuits including magnetoquasistatic devices , 2011 .

[12]  Martin J. Gander,et al.  PARAEXP: A Parallel Integrator for Linear Initial-Value Problems , 2013, SIAM J. Sci. Comput..

[13]  Christophe Geuzaine,et al.  GetDP: a general environment for the treatment of discrete problems , 1997 .

[14]  Jan S. Hesthaven,et al.  Communication-aware adaptive Parareal with application to a nonlinear hyperbolic system of partial differential equations , 2018, J. Comput. Phys..

[15]  Thomas A. Manteuffel,et al.  Multigrid Reduction in Time for Nonlinear Parabolic Problems: A Case Study , 2017, SIAM J. Sci. Comput..

[16]  Andrew T. T. McRae,et al.  Firedrake: automating the finite element method by composing abstractions , 2015, ACM Trans. Math. Softw..

[17]  Lisandro Dalcin,et al.  Parallel distributed computing using Python , 2011 .

[18]  L. Greengard,et al.  Spectral Deferred Correction Methods for Ordinary Differential Equations , 2000 .

[19]  Martin J. Gander,et al.  50 Years of Time Parallel Time Integration , 2015 .

[20]  Lydia Kronsjö,et al.  A note on the “nested iterations” method , 1975 .

[21]  Robert D. Falgout,et al.  A parallel multigrid reduction in time method for power systems , 2016, 2016 IEEE Power and Energy Society General Meeting (PESGM).

[22]  Colin B. Macdonald,et al.  Parallel High-Order Integrators , 2010, SIAM J. Sci. Comput..

[23]  J. Lions,et al.  Résolution d'EDP par un schéma en temps « pararéel » , 2001 .

[24]  Matthew G. Knepley,et al.  PyClaw: Accessible, Extensible, Scalable Tools for Wave Propagation Problems , 2011, SIAM J. Sci. Comput..

[25]  Christophe Geuzaine,et al.  Gmsh: A 3‐D finite element mesh generator with built‐in pre‐ and post‐processing facilities , 2009 .

[26]  Michael L. Minion,et al.  TOWARD AN EFFICIENT PARALLEL IN TIME METHOD FOR PARTIAL DIFFERENTIAL EQUATIONS , 2012 .

[27]  Lydia Kronsjö,et al.  On the design of nested iterations for elliptic difference equations , 1972 .

[28]  Robert D. Falgout,et al.  A parallel-in-time algorithm for variable step multistep methods , 2019, J. Comput. Sci..

[29]  Barry F. Smith,et al.  PETSc Users Manual , 2019 .

[30]  Robert D. Falgout,et al.  Parallel time integration with multigrid , 2013, SIAM J. Sci. Comput..

[31]  Anders Logg,et al.  Automated Solution of Differential Equations by the Finite Element Method: The FEniCS Book , 2012 .

[32]  J. Remacle,et al.  Gmsh: A 3‐D finite element mesh generator with built‐in pre‐ and post‐processing facilities , 2009 .

[33]  Dorian Krause,et al.  JUWELS: Modular Tier-0/1 Supercomputer at Jülich Supercomputing Centre , 2019, Journal of large-scale research facilities JLSRF.

[34]  Sebastian Schöps,et al.  Exploring Parallel-in-Time Approaches for Eddy Current Problems , 2018, ArXiv.

[35]  John D. Hunter,et al.  Matplotlib: A 2D Graphics Environment , 2007, Computing in Science & Engineering.

[36]  Christophe Geuzaine,et al.  GetDP: a general finite‐element solver for the de Rham complex , 2007 .

[37]  D. Brandt,et al.  Multi-level adaptive solutions to boundary-value problems math comptr , 1977 .

[38]  S. Schöps,et al.  Parallel-in-time simulation of an electrical machine using MGRIT , 2019, ArXiv.

[39]  Lars Ruthotto,et al.  Layer-Parallel Training of Deep Residual Neural Networks , 2018, SIAM J. Math. Data Sci..

[40]  Herbert De Gersem,et al.  A structural analysis of field/circuit coupled problems based on a generalised circuit element , 2019, Numerical Algorithms.

[41]  Hans De Sterck,et al.  Optimizing MGRIT and Parareal coarse-grid operators for linear advection , 2019, ArXiv.

[42]  et al.,et al.  Jupyter Notebooks - a publishing format for reproducible computational workflows , 2016, ELPUB.

[43]  Gaël Varoquaux,et al.  The NumPy Array: A Structure for Efficient Numerical Computation , 2011, Computing in Science & Engineering.