Comparing CUDA, OpenCL and OpenGL Implementations of the Cardiac Monodomain Equations

  • Rafael Sachetto Oliveira
  • Bernardo Martins Rocha
  • Ronan Mendonça Amorim
  • Fernando Otaviano Campos
  • Wagner MeiraJr.
  • Elson Magalhães Toledo
  • Rodrigo Weber dos Santos
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7204)

Abstract

Computer simulations of cardiac electrophysiology are a helpful tool in the study of bioelectric activity of the heart. The cardiac monodomain model comprises a nonlinear system of partial differential equations and its numerical solution represents a very intensive computational task due to the required fine spatial and temporal resolution. Recent studies have shown that the use of GPU as a general purpose processor can greatly improve the performance of simulations. The aim of this work is to study the performance of different GPU programming interfaces for the solution of the cardiac monodomain equations. Three different GPU implementations are compared, OpenGL, NVIDIA CUDA and OpenCL, to a CPU multicore implementation that uses OpenMP. The OpenGL approach showed to be the fastest with a speedup of 446 (compared to the multicore implementation) for the solution of the nonlinear system of ordinary differential equations (ODEs) associated to the solution of the cardiac model, whereas CUDA was the fastest for the numerical solution of the parabolic partial differential equation with a speedup of 8. Although OpenCL provides code portability between different accelerators, the OpenCL version was slower for the solution of the parabolic equation and as fast as CUDA for the solution of the system of ODEs, showing to be a portable way of programming scientific applications but not as efficient as CUDA when running on Nvidia GPUs.

Keywords

Thread Block CUDA Implementation OpenCL Kernel Monodomain Model Fragment Processor 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Amorim, R.M., Haase, G., Liebmann, M., dos Santos, R.W.: Comparing CUDA and OpenGL implementations for a Jacobi iteration. In: International Conference on High Performance Computing & Simulation (HPCS 2009). pp. 22–32 (2009)Google Scholar
  2. 2.
    Luo, C., Rudy, Y.: A model of the ventricular cardiac action potential. depolarization, repolarization, and their interaction. Circ. Res. 68(6), 1501–1526 (1991)CrossRefGoogle Scholar
  3. 3.
    Sato, D., Xie, Y., Weiss, J.N., Qu, Z., Garfinkel, A., Sanderson, A.R.: Acceleration of cardiac tissue simulation with graphic processing units. Med. Biol. Eng. Comput. 47, 1011–1015 (2009)CrossRefGoogle Scholar
  4. 4.
    Plank, G., Liebmann, M., Santos, R.W., Vigmond, E.J., Haase, G.: Algebraic multigrid preconditioner for the cardiac bidomain model. IEEE Trans. Biomed. Eng. 54(4), 585–596 (2007)CrossRefGoogle Scholar
  5. 5.
    Sundnes, J., Lines, G.T., Cai, X., Nielsen, B.F., Mardal, K.A., Tveito, A.: Computing the Electrical Activity in the Heart. Springer (2006)Google Scholar
  6. 6.
    Maclachlan, M.C., Sundnes, J., Spiteri, R.J.: A comparison of non-standard solvers for odes describing cellular reactions in the heart. Comput. Methods Biomech. Biomed. Engin. 10, 317–326 (2007)CrossRefGoogle Scholar
  7. 7.
    Bell, N., Garland, M.: Efficient Sparse Matrix-Vector Multiplication on CUDA. Tech. rep., NVidia Corporation (2008)Google Scholar
  8. 8.
    Santos, R.W., Plank, G., Bauer, S., Vigmond, E.J.: Parallel multigrid preconditioner for the cardiac bidomain model. IEEE Trans. Biomed. Eng. 51(11), 1960–1968 (2004)CrossRefGoogle Scholar
  9. 9.
    Rocha, B.M., Campos, F.O., Amorim, R.M., Plank, G., dos Santos, R.W., Liebmann, M., Haase, G.: Accelerating cardiac excitation spread simulations using graphics processing units. Concurrency and Computation: Practice and Experience (2010)Google Scholar
  10. 10.
    Weber, R., Gothandaraman, A., Hinde, R.J., Peterson, G.D.: Comparing Hardware Accelerators in Scientific Applications: A Case Study. IEEE Transactions on Parallel and Distributed Systems 22, 58–68 (2011)CrossRefGoogle Scholar
  11. 11.
    Saad, Y.: Iterative Methods for Sparse Linear Systems. PWS Publishing Company (1996)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Rafael Sachetto Oliveira
    • 1
    • 2
  • Bernardo Martins Rocha
    • 3
    • 4
  • Ronan Mendonça Amorim
    • 3
  • Fernando Otaviano Campos
    • 5
  • Wagner MeiraJr.
    • 2
  • Elson Magalhães Toledo
    • 4
  • Rodrigo Weber dos Santos
    • 3
  1. 1.Department of Computer ScienceFederal University of São João Del ReyBrazil
  2. 2.Department of Computer ScienceFederal University of Minas GeraisBrazil
  3. 3.Department of Computer Science and Computational Modeling ProgramFederal University of Juiz de ForaBrazil
  4. 4.National Laboratory of Scientific ComputingBrazil
  5. 5.Institute of BiophysicsMedical University of GrazAustria

Personalised recommendations