Skip to main content

Construction of Locality-Aware Algorithms to Optimize Performance of Stencil Codes on Heterogeneous Hardware

  • Conference paper
  • First Online:
Supercomputing (RuSCDays 2023)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 14389))

Included in the following conference series:

  • 137 Accesses

Abstract

Recently, an increase in code performance has been obtained mainly through parallelism. For codes that implement stencil schemes, parallel processing requires data-intensive exchange. When parallel threads need to communicate, memory bandwidth becomes the bottleneck in performance. To overcome this bottleneck, processors have advanced caches. However, when developing codes for the purposes of scientific modeling, it is still the task of a programmer to make sure that every tool available is used to its highest limit and the best performance is obtained. To simplify this task, we use locally recursive non-locally asynchronous (LRnLA) algorithms. In this work, we develop an algorithm that efficiently localizes data in caches for advanced many-core CPUs with heterogeneous cores. We demonstrate the method by optimizing the performance of a fluid dynamics code on a computer with a many-core CPU with different types of cores.

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 59.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 74.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. Endo, T.: Applying recursive temporal blocking for stencil computations to deeper memory hierarchy. In: 2018 IEEE 7th Non-Volatile Memory Systems and Applications Symposium (NVMSA), pp. 19–24. IEEE (2018)

    Google Scholar 

  2. Ho, M.Q.: Optimization of data transfer on many-core processors, applied to dense linear algebra and stencil computations, Ph. D. thesis, Université Grenoble Alpes (2018)

    Google Scholar 

  3. Kogge, P., Bergman, K., et al.: Exascale computing study: Technology challenges in achieving exascale systems, Tech. Rep 15, Defense Advanced Research Projects Agency Information Processing Techniques Office (DARPA IPTO) (2008)

    Google Scholar 

  4. Kogge, P.M., Page, B.A.: Locality: the 3rd wall and the need for innovation in parallel architectures. In: Hochberger, C., Bauer, L., Pionteck, T. (eds.) ARCS 2021. LNCS, vol. 12800, pp. 3–18. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-81682-7_1

    Chapter  Google Scholar 

  5. Krüger, T., Kusumaatmaja, H., Kuzmin, A., Shardt, O., Silva, G., Viggen, E.M.: The Lattice Boltzmann Method. GTP, Springer, Cham (2017). https://doi.org/10.1007/978-3-319-44649-3

    Book  Google Scholar 

  6. Lehmann, M., Krause, M.J., Amati, G., Sega, M., Harting, J., Gekle, S.: Accuracy and performance of the lattice Boltzmann method with 64-bit, 32-bit, and customized 16-bit number formats. Phys. Rev. E 106(1), 015308 (2022)

    Article  Google Scholar 

  7. Levchenko, V., Perepelkina, A.: Locally recursive non-locally asynchronous algorithms for stencil computation. Lobachevskii J. Math. 39(4), 552–561 (2018)

    Article  MathSciNet  Google Scholar 

  8. McCalpin, J.D.: Memory bandwidth and machine balance in current high performance computers. IEEE Comput. Soc. Tech. Committee Comput. Architect. Newsl. 2, 19–25 (1995)

    Google Scholar 

  9. Nguyen, A., Satish, N., Chhugani, J., Kim, C., Dubey, P.: 3.5-D blocking optimization for stencil computations on modern CPUs and GPUs. In: SC 2010: Proceedings of the 2010 ACM/IEEE International Conference for High Performance Computing, Networking, Storage and Analysis, pp. 1–13. IEEE (2010)

    Google Scholar 

  10. Perepelkina, A., Levchenko, V.: LRnLA algorithm ConeFold with non-local vectorization for LBM implementation. In: Voevodin, V., Sobolev, S. (eds.) RuSCDays 2018. CCIS, vol. 965, pp. 101–113. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-05807-4_9

    Chapter  Google Scholar 

  11. Perepelkina, A., Levchenko, V.D.: Functionally arranged data for algorithms with space-time Wavefront. In: Sokolinsky, L., Zymbler, M. (eds.) PCT 2021. CCIS, vol. 1437, pp. 134–148. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-81691-9_10

    Chapter  Google Scholar 

  12. Perepelkina, A., Levchenko, V., Zakirov, A.: New compact streaming in LBM with ConeFold LRnLA algorithms. In: Voevodin, V., Sobolev, S. (eds.) Supercomputing. RuSCDays 2020. Communications in Computer and Information Science, vol. 1331, pp. 50–62 (2020)

    Google Scholar 

  13. Perepelkina, A., et al.: Heterogeneous LBM simulation code with LRnLA algorithms. Commun. Comput. Phys. 33(1), 214–244 (2023)

    Article  MathSciNet  Google Scholar 

  14. Riesinger, C., Bakhtiari, A., Schreiber, M., Neumann, P., Bungartz, H.J.: A holistic scalable implementation approach of the lattice Boltzmann method for CPU/GPU heterogeneous clusters. Computation 5(4), 48 (2017)

    Article  Google Scholar 

  15. Rupp, K.: Microprocessor trend data. https://github.com/karlrupp/microprocessor-trend-data. Accessed 11 Apr 2023

  16. Taflove, A., Hagness, S.C., Piket-May, M.: Computational electromagnetics: the finite-difference time-domain method. Electr. Eng. Handb. 3, 629–670 (2005)

    Article  Google Scholar 

  17. Toro, E.F.: Riemann Solvers and Numerical Methods for Fluid Dynamics: A Practical Introduction. Springer Science & Business Media (2013). https://doi.org/10.1007/978-3-662-03915-1

  18. Virieux, J., et al.: Modelling seismic wave propagation for geophysical imaging. In: Kanao, M. (ed.) Seismic Waves, chap. 13. IntechOpen, Rijeka (2012). https://doi.org/10.5772/30219

  19. Wellein, G., Hager, G., Zeiser, T., Wittmann, M., Fehske, H.: Efficient temporal blocking for stencil computations by multicore-aware WaveFront parallelization. In: 2009 33rd Annual IEEE International Computer Software and Applications Conference, vol. 1, pp. 579–586. IEEE (2009)

    Google Scholar 

  20. Wilde, D.K.: A library for doing polyhedral operations, Tech. Rep. 785, IRISA (1993)

    Google Scholar 

  21. Williams, S., Waterman, A., Patterson, D.: Roofline: an insightful visual performance model for multicore architectures. Commun. ACM 52(4), 65–76 (2009)

    Article  Google Scholar 

  22. Wittmann, M., Haag, V., Zeiser, T., Köstler, H., Wellein, G.: Lattice Boltzmann benchmark kernels as a testbed for performance analysis. Comput. Fluids 172, 582–592 (2018)

    Article  MathSciNet  Google Scholar 

  23. Wolfe, M.: Loops skewing: the wavefront method revisited. Int. J. Parallel Prog. 15, 279–293 (1986)

    Article  Google Scholar 

  24. Wonnacott, D.G., Strout, M.M.: On the scalability of loop tiling techniques. Impact 2013, 3 (2013)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Anastasia Perepelkina .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Levchenko, V., Perepelkina, A. (2023). Construction of Locality-Aware Algorithms to Optimize Performance of Stencil Codes on Heterogeneous Hardware. In: Voevodin, V., Sobolev, S., Yakobovskiy, M., Shagaliev, R. (eds) Supercomputing. RuSCDays 2023. Lecture Notes in Computer Science, vol 14389. Springer, Cham. https://doi.org/10.1007/978-3-031-49435-2_11

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-49435-2_11

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-49434-5

  • Online ISBN: 978-3-031-49435-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics