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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
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)
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)
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)
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
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
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)
Levchenko, V., Perepelkina, A.: Locally recursive non-locally asynchronous algorithms for stencil computation. Lobachevskii J. Math. 39(4), 552–561 (2018)
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)
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)
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
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
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)
Perepelkina, A., et al.: Heterogeneous LBM simulation code with LRnLA algorithms. Commun. Comput. Phys. 33(1), 214–244 (2023)
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)
Rupp, K.: Microprocessor trend data. https://github.com/karlrupp/microprocessor-trend-data. Accessed 11 Apr 2023
Taflove, A., Hagness, S.C., Piket-May, M.: Computational electromagnetics: the finite-difference time-domain method. Electr. Eng. Handb. 3, 629–670 (2005)
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
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
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)
Wilde, D.K.: A library for doing polyhedral operations, Tech. Rep. 785, IRISA (1993)
Williams, S., Waterman, A., Patterson, D.: Roofline: an insightful visual performance model for multicore architectures. Commun. ACM 52(4), 65–76 (2009)
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)
Wolfe, M.: Loops skewing: the wavefront method revisited. Int. J. Parallel Prog. 15, 279–293 (1986)
Wonnacott, D.G., Strout, M.M.: On the scalability of loop tiling techniques. Impact 2013, 3 (2013)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
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)