Skip to main content

Solving the Heat Transfer Equation by a Finite Difference Method Using Multi-dimensional Arrays in CUDA as in Standard C

  • Conference paper
  • First Online:
High Performance Computing (CARLA 2021)

Abstract

In recent years the increasing necessity to speed up the execution of numerical algorithms has leaded researchers to the use of co-processors and graphic cards such as the NVIDIA GPU’s. Despite CUDA C meta-language was introduced to facilitate the development of general purpose-applications, the solution to the common question: How to allocate (cudaMalloc) two-dimensional array?, is not simple. In this paper, we present a memory structure that allows the use of multidimensional arrays inside a CUDA kernel, to demonstrate its functionality, this structure is applied to the explicit finite difference solution of the non-steady heat transport equation.

This work was partially supported by the project IPN-SIP 20210291.

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 64.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 84.99
Price excludes VAT (USA)
  • Compact, lightweight 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

References

  1. Al-Refaie, A.F., Yurchenko, S.N., Tennyson, J.: GPU accelerated INtensities MPI (GAIN-MPI): a new method of computing Einstein-\(A\) coefficients. Comput. Phys. Commun. 214, 216–224 (2017)

    Article  Google Scholar 

  2. Calore, E., Gabbana, A., Kraus, J., Pellegrini, E., Schifano, S., Tripiccione, R.: Massively parallel lattice-Boltzmann codes on large GPU clusters. Parallel Comput. 58, 1–24 (2016)

    Article  MathSciNet  Google Scholar 

  3. Couder-Castañeda, C., Ortiz-Alemán, C., Orozco-Del-Castillo, M., Nava-Flores, M.: Tesla GPUs versus MPI with OpenMP for the forward modeling of gravity and gravity gradient of large prisms ensemble. J. Appl. Math. 2013, 1–7 (2013)

    Article  Google Scholar 

  4. Galizia, A., D’Agostino, D., Clematis, A.: An MPI-CUDA library for image processing on HPC architectures. J. Comput. Appl. Math. 273, 414–427 (2015)

    Article  Google Scholar 

  5. Huang, C., Shi, B., He, N., Chai, Z.: Implementation of multi-GPU based lattice Boltzmann method for flow through porous media. Adv. Appl. Math. Mech. 7(1), 1–12 (2015)

    Article  MathSciNet  Google Scholar 

  6. Kaczmarski, K., Przymus, P., Rzazewski, P.: Improving high-performance GPU graph traversal with compression. Adv. Intell. Syst. Comput. 312, 201–214 (2015)

    Google Scholar 

  7. Krol, D., Harris, J., Zydek, D.: Hybrid GPU/CPU approach to multi-physics simulation. Adv. Intell. Syst. Comput. 1089, 893–899 (2015)

    Google Scholar 

  8. Köhler, M., Saak, J.: On GPU acceleration of common solvers for (quasi-) triangular generalized Lyapunov equations. Parallel Comput. 57, 212–221 (2016)

    Article  MathSciNet  Google Scholar 

  9. Lin, M., Xu, M., Fu, X.: GPU-accelerated computing for Lagrangian coherent structures of multi-body gravitational regimes. Astrophys. Space Sci. 362(4), 1–11 (2017). https://doi.org/10.1007/s10509-017-3050-y

    Article  MathSciNet  Google Scholar 

  10. Michéa, D., Komatitsch, D.: Accelerating a three-dimensional finite-difference wave propagation code using GPU graphics cards. Geophys. J. Int. 182(1), 389–402 (2010)

    Google Scholar 

  11. Nakata, N., Tsuji, T., Matsuoka, T.: Acceleration of computation speed for elastic wave simulation using a graphic processing unit. Explor. Geophys. 42(1), 98–104 (2011)

    Article  Google Scholar 

  12. Owens, J., et al.: A survey of general-purpose computation on graphics hardware. Comput. Graph. Forum 26(1), 80–113 (2007)

    Article  MathSciNet  Google Scholar 

  13. Priimak, D.: Finite difference numerical method for the superlattice Boltzmann transport equation and case comparison of CPU(c) and GPU(CUDA) implementations. J. Comput. Phys. 278(1), 182–192 (2014)

    Article  MathSciNet  Google Scholar 

  14. Recktenwald, G.W.: Finite-difference approximations to the heat equation. Mech. Eng. 10(01), 1–10 (2004)

    Google Scholar 

  15. Rosen, P.: A visual approach to investigating shared and global memory behavior of CUDA kernels. Comput. Graph. Forum. 32(3 PART2), 161–170 (2013). https://doi.org/10.1111/cgf.12103

  16. Strohm, P., Wittmer, S., Haberstroh, A., Lauer, T.: GPU-accelerated quantification filters for analytical queries in multidimensional databases. Adv. Intell. Syst. Comput. 312, 229–242 (2015)

    Google Scholar 

  17. Vuduc, R., Czechowski, K.: What GPU computing means for high-end systems. System 8, 10 (2011)

    Google Scholar 

  18. Wienke, S., Terboven, C., Beyer, J.C., Müller, M.S.: A pattern-based comparison of OpenACC and OpenMP for accelerator computing. In: Silva, F., Dutra, I., Santos Costa, V. (eds.) Euro-Par 2014. LNCS, vol. 8632, pp. 812–823. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-09873-9_68

    Chapter  Google Scholar 

  19. Xu, C., et al.: Collaborating CPU and GPU for large-scale high-order CFD simulations with complex grids on the Tianhe-1a supercomputer. J. Comput. Phys. 278(1), 275–297 (2014)

    Article  Google Scholar 

  20. Zhang, T., Du, Y., Huang, T., Li, X.: GPU-accelerated 3D reconstruction of porous media using multiple-point statistics. Comput. Geosci. 19, 79–98 (2014)

    Article  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Carlos Couder-Castañeda .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Sanchez-Noguez, J., Couder-Castañeda, C., Hernández-Gómez, J.J., Navarro-Reyes, I. (2022). Solving the Heat Transfer Equation by a Finite Difference Method Using Multi-dimensional Arrays in CUDA as in Standard C. In: Gitler, I., Barrios Hernández, C.J., Meneses, E. (eds) High Performance Computing. CARLA 2021. Communications in Computer and Information Science, vol 1540. Springer, Cham. https://doi.org/10.1007/978-3-031-04209-6_16

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-04209-6_16

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-04208-9

  • Online ISBN: 978-3-031-04209-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics