Skip to main content

Solving Ordinary Differential Equations on GPUs

  • Chapter
  • First Online:
Book cover Numerical Computations with GPUs

Abstract

Ordinary Differential Equations (ODEs) are a fundamental mathematical tool to model physical, biological or chemical systems, and they are widely used in engineering, economics and social sciences. Given their vast appearance, it is of crucial importance to develop efficient numerical routines for solving ODEs that employ the computational power of modern GPUs. Here, we present a high-level approach to compute numerical solutions of ODEs by developing a generic implementation of the most common algorithms and combining this with modern C\(++\) libraries like VexCL and Thrust. Our approach is based on generic programming and results in highly scalable and easy-to-use source code.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 119.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD 159.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    http://www.odeint.com.

  2. 2.

    http://thrust.github.com.

  3. 3.

    http://www.simunova.com/gpu_mtl4.

  4. 4.

    https://github.com/ddemidov/vexcl.

  5. 5.

    http://viennacl.sourceforge.net/.

  6. 6.

    https://github.com/kylelutz/compute.

  7. 7.

    In Mathematics, the independent variable is often called x and the function is y(x).

References

  1. Ahnert, K.: Odeint v2 - Solving Ordinary Differential Equations in C\(++\). http://www.codeproject.com/Articles/268589/odeint-v2-Solving-ordinary-differential-equations (Oct 2011)

  2. Ahnert, K., Mulansky, M.: Odeint — solving ordinary differential equations in C++. AIP Conf. Proc. 1389, 1586–1589 (2011)

    Article  Google Scholar 

  3. Alexandrescu, A.: Modern C++ Design: Generic Programming and Design Patterns Applied. Addison-Wesley Longman Publishing, Boston (2001)

    Google Scholar 

  4. Bell, N., Hoberock, J.: Thrust: A Productivity-Oriented Library for CUDA, Chap. 26, pp. 359–371. Elsevier, USA (2011)

    Google Scholar 

  5. Cohen, A.H., Holmes, P.J., Rand, R.H.: The nature of the coupling between segmental oscillators of the lamprey spinal generator for locomotion: a mathematical model. J. Math. Biol. 13, 345–369 (1982)

    Article  MATH  MathSciNet  Google Scholar 

  6. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms. MIT Press, Cambridge (2001)

    MATH  Google Scholar 

  7. Demidov, D.: VexCL: Vector Expression Template Library for OpenCL. http://www.codeproject.com/Articles/415058/VexCL-Vector-expression-template-library-for-OpenC (July 2012)

  8. Demidov, D., Ahnert, K., Rupp, K., Gottschling, P.: Programming CUDA and OpenCL: a case study using modern C++ libraries. SIAM J. Sci. Comput. 35(5), C453–C472 (2013)

    Article  MATH  MathSciNet  Google Scholar 

  9. Frenkel, D., Smit, B.: Understanding Molecular Simulation from Algorithms to Applications. Academic, San Diego (2002)

    Google Scholar 

  10. Galassi, M., Davies, J., Theiler, J., Gough, B., Jungman, G., Alken, P., Booth, M., Rossi, F.: GNU Scientific Library. Network Theory, Bristol (2007)

    Google Scholar 

  11. Gottschling, P., Wise, D.S., Adams, M.D.: Representation-transparent matrix algorithms with scalable performance. In: Proceedings of the 21st Annual International Conference on Supercomputing, pp. 116–125. ACM, New York (2007)

    Google Scholar 

  12. Gregor, D.: The Boost Function Library. http://www.boost.org/doc/libs/release/libs/function (2001)

  13. Guennebaud, G., Jacob, B., et al.: Eigen v3. http://eigen.tuxfamily.org (2010)

  14. Hairer, E., Nørsett, S.P., Wanner, G.: Solving Ordinary Differential Equations I: Nonstiff Problems, 2nd edn. Springer, Berlin (1993) (corr. 3rd printing 1993; corr. 3rd edn. 2009)

    MATH  Google Scholar 

  15. Hairer, E., Wanner, G.: Solving Ordinary Differential Equations II: Stiff and Differential-Algebraic Problems, 2nd edn. Springer, Berlin (1996) (2nd printing edn. 2010)

    Book  MATH  Google Scholar 

  16. Hindmarsh, A.C., Brown, P.N., Grant, K.E., Lee, S.L., Serban, R., Shumaker, D.E., Woodward, C.S.: SUNDIALS: suite of nonlinear and differential/algebraic equation solvers. ACM Trans. Math. Softw. (TOMS) 31(3), 363–396 (2005)

    Google Scholar 

  17. Intel Math Kernel Library Reference Manual, Intel, Version 11.1 (2013)

    Google Scholar 

  18. Izhikevich, E.M., Ermentrout, B.: Phase model. Scholarpedia 3(10), 1487 (2008)

    Article  Google Scholar 

  19. Jones, J.E.: On the determination of molecular fields. II. From the equation of state of a gas. R. Soc. Lond. Proc. Ser. A 106, 463–477 (1924)

    Article  Google Scholar 

  20. Kuramoto, Y.: Chemical Oscillations, Waves, and Turbulence. Springer, New York (1984)

    Book  MATH  Google Scholar 

  21. Leimkuhler, B., Reich, S.: Simulating Hamiltonian Dynamics, vol. 14. Cambridge University Press, Cambridge (2004)

    MATH  Google Scholar 

  22. Moore, R.E., Kearfott, R.B., Cloud, M.J.: Methods and Applications of Interval Analysis, vol. 2. SIAM, Philadelphia (1979)

    Book  MATH  Google Scholar 

  23. Munshi, A., et al.: The OpenCL Specification. Khronos OpenCL Working Group 1, pp. 11–15 (2009)

    Google Scholar 

  24. NVIDIA CUDA Programming Guide. NVIDIA Corporation, Version 5.5 (2013)

    Google Scholar 

  25. OpenMP Architecture Review Board: OpenMP Application Program Interface Version 3.0. http://www.openmp.org/mp-documents/spec30.pdf (May 2008)

  26. Ott, E.: Chaos in Dynamical Systems. Cambridge University Press, Cambridge (2002)

    Book  MATH  Google Scholar 

  27. Pikovsky, A., Rosenblum, M., Kurths, J.: Synchronization: A Universal Concept in Nonlinear Sciences. Cambridge University Press, Cambridge (2001)

    Book  Google Scholar 

  28. Poschel, T., Schwager, T.: Computational Granular Dynamics: Models and Algorithms. Springer, Berlin/Heidelberg [u.a.] (2010)

    Google Scholar 

  29. Press, W.H., Teukolsky, S.A., Vetterling, W.T., Flannery, B.P.: Numerical Recipes: The Art of Scientific Computing, 3rd edn. Cambridge University Press, Cambridge (2007)

    Google Scholar 

  30. R Core Team: R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna (2013)

    Google Scholar 

  31. Reinders, J.: Intel Threading Building Blocks: Outfitting C++ for Multi-core Processor Parallelism. O’Reilly Media, Inc., Sebastopol (2010)

    Google Scholar 

  32. Rupp, K., Rudolf, F., Weinbub, J.: ViennaCL - A High Level Linear Algebra Library for GPUs and Multi-Core CPUs. In: International Workshop on GPUs and Scientific Applications, pp. 51–56 (2010)

    Google Scholar 

  33. Schabel, M.C., Watanabe, S.: The Boost Units Library. http://www.boost.org/doc/libs/release/libs/units (2010)

  34. Soetaert, K., Cash, J.R., Mazzia, F.: Solving Differential Equations in R. Springer, Berlin/New York (2012)

    Book  MATH  Google Scholar 

  35. Sparrow, C.: The Lorenz Equations: Bifurcations, Chaos, and Strange Attractors, vol. 41. Springer, New York (1982)

    MATH  Google Scholar 

  36. Stepanov, A., Lee, M: The Standard Template Library, vol. 1501. Hewlett Packard Laboratories, Palo Alto (1995)

    Google Scholar 

  37. Teschl, G.: Ordinary Differential Equations and Dynamical Systems, vol. 140. AMS Bookstore, Providence (2012)

    MATH  Google Scholar 

  38. Verlet, L.: Computer “experiments” on classical fluids. I. Thermodynamical properties of Lennard-Jones molecules. Phys. Rev. 159(1), 98–103 (1967)

    Google Scholar 

  39. Walter, J., Koch, M.: The Boost uBLAS Library. http://www.boost.org/doc/libs/release/libs/numeric/ublas/doc/index.htm (2002)

Download references

Acknowledgements

This work has been partially supported by the Russian Foundation for Basic Research (RFBR) grants No. 12-07-0007, 12-01-00333a, and by the Russian Government Program of Competitive Growth of Kazan Federal University. M. M. thankfully acknowledges financial support through the visitors program of the MPIPKS, Dresden (Germany).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Karsten Ahnert .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer International Publishing Switzerland

About this chapter

Cite this chapter

Ahnert, K., Demidov, D., Mulansky, M. (2014). Solving Ordinary Differential Equations on GPUs. In: Kindratenko, V. (eds) Numerical Computations with GPUs. Springer, Cham. https://doi.org/10.1007/978-3-319-06548-9_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-06548-9_7

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-06547-2

  • Online ISBN: 978-3-319-06548-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics