skip to main content
research-article

Algorithm 997: pySDC—Prototyping Spectral Deferred Corrections

Published: 08 August 2019 Publication History

Abstract

In this article, we present the Python framework pySDC for solving collocation problems with spectral deferred correction (SDC) methods and their time-parallel variant PFASST, the parallel full approximation scheme in space and time. pySDC features many implementations of SDC and PFASST, from simple implicit timestepping to high-order implicit-explicit or multi-implicit splitting and multilevel SDCs. The software package comes with many different, preimplemented examples and has seven tutorials to help new users with their first steps. Time parallelism is implemented either in an emulated way for debugging and prototyping or using MPI for benchmarking. The code is fully documented and tested using continuous integration, including most results of previous publications. Here, we describe the structure of the code by taking two different perspectives: those of the user and those of the developer. The first sheds light on the front-end, the examples, and the tutorials, and the second is used to describe the underlying implementation and the data structures. We show three different examples to highlight various aspects of the implementation, the capabilities, and the usage of pySDC. In addition, couplings to the FEniCS framework and PETSc, the latter including spatial parallelism with MPI, are described.

Supplementary Material

ZIP File (997.zip)
Software for pySDC?Prototyping Spectral Deferred Corrections

References

[1]
Satish Balay, Shrirang Abhyankar, Mark F. Adams, Jed Brown, Peter Brune, Kris Buschelman, Lisandro Dalcin, et al. 2018. PETSc Users Manual. Technical Report ANL-95/11—Revision 3.9. Argonne National Laboratory. http://www.mcs.anl.gov/petsc.
[2]
Matthias Bolten, Dieter Moser, and Robert Speck. 2017. A multigrid perspective on the parallel full approximation scheme in space and time. Numerical Linear Algebra with Applications 24, 6 (2017), e2110.
[3]
Matthias Bolten, Dieter Moser, and Robert Speck. 2018. Asymptotic convergence of the parallel full approximation scheme in space and time for linear problems. Numerical Linear Algebra with Applications 25, 6 (2018), e2208.
[4]
Anne Bourlioux, Anita T. Layton, and Michael L. Minion. 2003. High-order multi-implicit spectral deferred correction methods for problems of reactive flow. Journal of Computational Physics 189, 2 (2003), 651--675.
[5]
Elizabeth L. Bouzarth and Michael L. Minion. 2010. A multirate time integrator for regularized Stokeslets. Journal of Computational Physics 229, 11 (2010), 4208--4224.
[6]
Kevin Burrage. 1997. Parallel methods for ODEs. Advances in Computational Mathematics 7 (1997), 1--3.
[7]
Andrew J. Christlieb, Colin B. Macdonald, and Benjamin W. Ong. 2010. Parallel high-order integrators. SIAM Journal on Scientific Computing 32, 2 (2010), 818--835.
[8]
Lisandro D. Dalcin, Rodrigo R. Paz, Pablo A. Kler, and Alejandro Cosimo. 2011. Parallel distributed computing using Python. Advances in Water Resources 34, 9 (2011), 1124--1139.
[9]
Arjen Doelman, Tasso J. Kaper, and Paul A. Zegeling. 1997. Pattern formation in the one-dimensional Gray-Scott model. Nonlinearity 10, 2 (1997), 523.
[10]
Alok Dutt, Leslie Greengard, and Vladimir Rokhlin. 2000. Spectral deferred correction methods for ordinary differential equations. BIT Numerical Mathematics 40, 2 (2000), 241--266.
[11]
Wael R. Elwasif, Samantha S. Foley, David E. Bernholdt, Lee A. Berry, Debasmita Samaddar, David E. Newman, and Raul Sanchez. 2011. A dependency-driven formulation of Parareal: Parallel-in-time solution of PDEs as a many-task application. In Proceedings of the 2011 ACM International Workshop on Many Task Computing on Grids and Supercomputers (MTAGS’11). ACM, New York, NY, 15--24.
[12]
M. Emmett and M. L. Minion. 2012. Toward an efficient parallel in time method for partial differential equations. Communications in Applied Mathematics and Computational Science 7 (2012), 105--132.
[13]
Xinlong Feng, Tao Tang, and Jiang Yang. 2015. Long time numerical simulations for phase-field problems using p-adaptive spectral deferred correction methods. SIAM Journal on Scientific Computing 37, 1 (2015), A271--A294.
[14]
M. Gander and S. Güttel. 2013. PARAEXP: A parallel integrator for linear initial-value problems. SIAM Journal on Scientific Computing 35, 2 (2013), C123--C142.
[15]
Martin J. Gander. 2015. 50 years of time parallel time integration. In Multiple Shooting and Time Domain Decomposition. Springer.
[16]
Carsten Gräser, Ralf Kornhuber, and Uli Sack. 2013. Time discretizations of anisotropic Allen-Cahn equations. IMA Journal of Numerical Analysis 33, 4 (2013), 1226--1244.
[17]
Carsten Gräser, Uli Sack, and Oliver Sander. 2009. Truncated nonsmooth Newton multigrid methods for convex minimization problems. In Domain Decomposition Methods in Science and Engineering XVIII, M. Bercovier, M. J. Gander, R. Kornhuber, and O. Widlund (Eds.). Springer, Berlin, Germany, 129--136.
[18]
P. Gray and S. K. Scott. 1983. Autocatalytic reactions in the isothermal, continuous stirred tank reactor: Isolas and other forms of multistability. Chemical Engineering Science 38, 1 (1983), 29--43.
[19]
Jingfang Huang, Jun Jia, and Michael Minion. 2006. Accelerating the convergence of spectral deferred correction methods. Journal of Computational Physics 214, 2 (2006), 633--656.
[20]
J. D. Hunter. 2007. Matplotlib: A 2D graphics environment. Computing in Science and Engineering 9, 3 (2007), 90--95.
[21]
Jun Jia, Judith C. Hill, Katherine J. Evans, George I. Fann, and Mark A. Taylor. 2014. A spectral deferred correction method applied to the shallow water equations on a sphere. Monthly Weather Review 141 (2014), 3435--3449.
[22]
Eric Jones, Travis Oliphant, Pearu Peterson, et al. 2018. SciPy Home Page. Retrieved January 30, 2018 from http://www.scipy.org/.
[23]
Jülich Supercomputing Centre. 2016. JURECA: General-purpose supercomputer at Jülich supercomputing centre. Journal of Large-Scale Research Facilities 2, A62 (2016).
[24]
David I. Ketcheson, Kyle T. Mandli, Aron J. Ahmadia, Amal Alghamdi, Manuel Quezada de Luna, Matteo Parsani, Matthew G. Knepley, and Matthew Emmett. 2012. PyClaw: Accessible, extensible, scalable tools for wave propagation problems. SIAM Journal on Scientific Computing 34, 4 (2012), C210--C231.
[25]
Thomas Kluyver, Benjamin Ragan-Kelley, Fernando Pérez, Brian Granger, Matthias Bussonnier, Jonathan Frederic, Kyle Kelley, et al. 2016. Jupyter notebooks—A publishing format for reproducible computational workflows. In Positioning and Power in Academic Publishing: Players, Agents and Agendas, F. Loizides and B. Schmidt (Eds.). IOS Press, 87--90.
[26]
Anita T. Layton and Michael L. Minion. 2004. Conservative multi-implicit spectral deferred correction methods for reacting gas dynamics. Journal of Computational Physics 194, 2 (2004), 697--715.
[27]
J.-L. Lions, Y. Maday, and G. Turinici. 2001. A “Parareal” in time discretization of PDE’s. Comptes Rendus de l’Académie des Sciences—Series I—Mathematics 332 (2001), 661--668.
[28]
LLBL. 2018. PFASST Codes. Retrieved July 30, 2018 from https://pfasst.lbl.gov/codes.
[29]
LLNL. 2018. XBraid. Retrieved July 30, 2018 from https://www.llnl.gov/casc/xbraid.
[30]
Anders Logg, Kent-Andre Mardal, and Garth Wells. 2012. Automated Solution of Differential Equations by the Finite Element Method: The FEniCS Book. Springer, Berlin, Germany.
[31]
Anders Logg and Garth N. Wells. 2010. DOLFIN: Automated finite element computing. ACM Transactions on Mathematical Software 37, 2 (2010), 20.
[32]
Sebastian Lührs, Daniel Rohe, Alexander Schnurpfeil, Kay Thust, and Wolfgang Frings. 2016. Flexible and generic workflow management. In Parallel Computing: On the Road to Exascale. Advances in Parallel Computing, Vol. 27. IOS Press, Amsterdam, Netherlands, 431--438.
[33]
Michael L. Minion. 2003. Semi-implicit spectral deferred correction methods for ordinary differential equations. Communications in Mathematical Sciences 1, 3 (2003), 471--500. http://projecteuclid.org/euclid.cms/1250880097
[34]
Michael L. Minion. 2004. Semi-implicit projection methods for incompressible flow based on spectral deferred corrections. Applied Numerical Mathematics 48, 3–4 (2004), 369--387.
[35]
Michael L. Minion. 2010. A hybrid Parareal spectral deferred corrections method. Communications in Applied Mathematics and Computational Science 5, 2 (2010), 265--301.
[36]
Michael L. Minion, Robert Speck, Matthias Bolten, Matthew Emmett, and Daniel Ruprecht. 2015. Interweaving PFASST and parallel multigrid. SIAM Journal on Scientific Computing 37, 5 (2015), S244--S263.
[37]
Andreas Naumann, Daniel Ruprecht, and Joerg Wensch. 2018. Toward transient finite element simulation of thermal deformation of machine tools in real-time. Computational Mechanics 62, 5 (2018), 929--942.
[38]
Tim O’Brien. 2019. Python 3 Statement. Retrieved February 14, 2019 from https://python3statement.org/.
[39]
Benjamin W. Ong, Ronald D. Haynes, and Kyle Ladd. 2016. Algorithm 965: RIDC methods: A family of parallel time integrators. ACM Transactions on Mathematical Software 43, 1 (2016), Article 8, 13 pages.
[40]
Florian Rathgeber, David A. Ham, Lawrence Mitchell, Michael Lange, Fabio Luporini, Andrew T. T. Mcrae, Gheorghe-Teodor Bercea, Graham R. Markall, and Paul H. J. Kelly. 2016. Firedrake: Automating the finite element method by composing abstractions. ACM Transactions on Mathematical Software 43, 3 (2016), Article 24, 27 pages.
[41]
Daniel Ruprecht and Robert Speck. 2016. Spectral deferred corrections with fast-wave slow-wave splitting. SIAM Journal on Scientific Computing 38, 4 (2016), A2535--A2557.
[42]
Martin Schreiber. 2018. SWEET Home Page. Retrieved July 30, 2018 from https://schreiberx.github.io/sweetsite/.
[43]
Robert Speck. 2018a. Github repository for pySDC. Retrieved February 14, 2019 from https://github.com/Parallel-in-Time/pySDC.
[44]
Robert Speck. 2018b. Parallelizing spectral deferred corrections across the method. Computing and Visualization in Science 19, 3-4 (2018), 75--83.
[45]
Robert Speck. 2018c. PyPI site for pySDC. Retrieved February 14, 2019 from https://pypi.python.org/pypi/pySDC.
[46]
Robert Speck. 2019. Parallel-in-Time/pySDC: The 3.0 Release. Retrieved July 10, 2019 from https://zenodo.org/record/2565062#.XSXsZOtJEyU.
[47]
Robert Speck and Daniel Ruprecht. 2017. Toward fault-tolerant parallel-in-time integration with PFASST. Parallel Computing 62 (2017), 20--37.
[48]
Robert Speck, Daniel Ruprecht, Matthew Emmett, Michael Minion, Matthias Bolten, and Rolf Krause. 2015. A multi-level spectral deferred correction method. BIT Numerical Mathematics 55, 3 (2015), 843--867.
[49]
Robert Speck, Daniel Ruprecht, Rolf Krause, Matthew Emmett, Michael L. Minion, Mathias Winkel, and Paul Gibbon. 2012. A massively space-time parallel N-body solver. In Proceedings of the International Conference on High Performance Computing, Networking, Storage, and Analysis (SC’12). IEEE, Los Alamitos, CA, Article 92, 11 pages.
[50]
Robert Speck, Daniel Ruprecht, Michael Minion, Matthew Emmett, and Rolf Krause. 2016. Inexact spectral deferred corrections. In Domain Decomposition Methods in Science and Engineering XXII, T. Dickopf, M. J. Gander, L. Halpern, R. Krause, and L. F. Pavarino (Eds.). 389--396.
[51]
Tao Tang, Hehu Xie, and Xiaobo Yin. 2013. High-order convergence of spectral deferred correction methods on general quadrature nodes. Journal of Scientific Computing 56, 1 (2013), 1--13.
[52]
Travis CI GmbH. 2018. Travis CI: Test and Deploy with Confidence. Retrieved February 14, 2019 from https://travis-ci.org.
[53]
Ulrich Trottenberg, Cornelius W. Oosterlee, and Anton Schuller. 2000. Multigrid. Academic Press.
[54]
P. J. Van Der Houwen and B. P. Sommeijer. 1990. Parallel iteration of high-order Runge-Kutta methods with stepsize control. Journal of Computational and Applied Mathematics 29, 1 (1990), 111--127.
[55]
S. van der Walt, S. C. Colbert, and G. Varoquaux. 2011. The NumPy array: A structure for efficient numerical computation. Computing in Science Engineering 13, 2 (2011), 22--30.
[56]
Martin Weiser. 2014. Faster SDC convergence on non-equidistant grids by DIRK sweeps. BIT Numerical Mathematics 55, 4 (2014), 1219--1241.
[57]
Martin Weiser and Sunayana Ghosh. 2018. Theoretically optimal inexact SDC methods. Communications in Applied Mathematics and Computational Science 13, 1 (2018), 53--86.
[58]
M. Winkel, R. Speck, and D. Ruprecht. 2015. A high-order Boris integrator. Journal of Computational Physics 295 (2015), 456--474.
[59]
Yinhua Xia, Yan Xu, and Chi-Wang Shu. 2007. Efficient time discretization for local discontinuous Galerkin methods. Discrete and Continuous Dynamical Systems—Series B 8, 3 (2007), 677--693.
[60]
J. Zhang and Q. Du. 2009. Numerical studies of discrete approximations to the Allen-Cahn equation in the sharp interface limit. SIAM Journal on Scientific Computing 31, 4 (2009), 3042--3063.

Cited By

View all
  • (2024)Spectral Deferred Correction Methods for Second-Order ProblemsSIAM Journal on Scientific Computing10.1137/23M159259646:3(A1690-A1713)Online publication date: 14-May-2024
  • (2024)Parallel-in-time integration of the Landau–Lifshitz–Gilbert equation with the parallel full approximation scheme in space and timeJournal of Magnetism and Magnetic Materials10.1016/j.jmmm.2024.171998597(171998)Online publication date: May-2024
  • (2023)A parallel-in-time collocation method using diagonalization: theory and implementation for linear problemsCommunications in Applied Mathematics and Computational Science10.2140/camcos.2023.18.5518:1(55-85)Online publication date: 21-Dec-2023
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Mathematical Software
ACM Transactions on Mathematical Software  Volume 45, Issue 3
September 2019
357 pages
ISSN:0098-3500
EISSN:1557-7295
DOI:10.1145/3349340
Issue’s Table of Contents
Publication rights licensed to ACM. ACM acknowledges that this contribution was authored or co-authored by an employee, contractor or affiliate of a national government. As such, the Government retains a nonexclusive, royalty-free right to publish or reproduce this article, or to allow others to do so, for Government purposes only.

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 08 August 2019
Accepted: 01 February 2019
Received: 01 August 2018
Published in TOMS Volume 45, Issue 3

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. PFASST
  2. Spectral deferred corrections
  3. multigrid
  4. parallel-in-time integration

Qualifiers

  • Research-article
  • Research
  • Refereed

Funding Sources

  • IKT 2020-Forschung für Innovationen
  • German Federal Ministry of Education and Research

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)37
  • Downloads (Last 6 weeks)4
Reflects downloads up to 21 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Spectral Deferred Correction Methods for Second-Order ProblemsSIAM Journal on Scientific Computing10.1137/23M159259646:3(A1690-A1713)Online publication date: 14-May-2024
  • (2024)Parallel-in-time integration of the Landau–Lifshitz–Gilbert equation with the parallel full approximation scheme in space and timeJournal of Magnetism and Magnetic Materials10.1016/j.jmmm.2024.171998597(171998)Online publication date: May-2024
  • (2023)A parallel-in-time collocation method using diagonalization: theory and implementation for linear problemsCommunications in Applied Mathematics and Computational Science10.2140/camcos.2023.18.5518:1(55-85)Online publication date: 21-Dec-2023
  • (2023)Task graph-based performance analysis of parallel-in-time methodsParallel Computing10.1016/j.parco.2023.103050118(103050)Online publication date: Nov-2023
  • (2021)Algorithm 1016ACM Transactions on Mathematical Software10.1145/344697947:2(1-22)Online publication date: 20-Apr-2021
  • (2021)Using Performance Analysis Tools for a Parallel-in-Time IntegratorParallel-in-Time Integration Methods10.1007/978-3-030-75933-9_3(51-80)Online publication date: 25-Aug-2021
  • (2020)Deferred Correction Methods for Ordinary Differential EquationsJournal of Scientific Computing10.1007/s10915-020-01235-883:3Online publication date: 11-Jun-2020
  • (2020)PFASST-ER: combining the parallel full approximation scheme in space and time with parallelization across the methodComputing and Visualization in Science10.1007/s00791-020-00330-523:1-4Online publication date: 1-Dec-2020
  • (undefined)Task Graph-Based Performance Analysis of Parallel-in-Time MethodsSSRN Electronic Journal10.2139/ssrn.4201056

View Options

Get Access

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

HTML Format

View this article in HTML Format.

HTML Format

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media