A framework for the vectorization of molecular dynamics kernels
- Ein System zur Vektorisierung von Molekulardynamic-Routinen
Höhnerbach, Markus; Bientinesi, Paolo (Thesis advisor); Naumann, Uwe (Thesis advisor); Kelly, Paul (Thesis advisor)
Aachen : RWTH Aachen University (2020, 2021)
Dissertation / PhD Thesis
Dissertation, RWTH Aachen University, 2020
This thesis introduces a domain-specific language (DSL) for many-body potentials, which are used in molecular dynamics (MD) simulations in the area of materials science. We also introduce a compiler to translate the DSL into high-performance code suitable for modern supercomputers. We begin by studying ways to speedup up potentials on supercomputers using two case studies: The Tersoff and the AIREBO potentials. In both case studies, we identify a number of optimizations, both domain-specific and general, to achieve speedups of up to 5x; we also introduce a method to keep the resulting code performance portable. During the AIREBO case study, we also discover that the existing code contains a number of errors. This experience motivates us to include the derivation step, the most error-prone step in manual optimization, in our automation effort.After having identified beneficial optimization techniques, we create a “potential compiler”, short PotC, which generates fully-usable performance-portable potential implementations from specifications written in our DSL. DSL code is significantly shorter (20x to 30x) than a manual code, reducing both manual work and opportunities to introduce bugs.We present performance results on five different platforms: Three CPU platforms (Broadwell, Knights Landing, and Skylake) and two GPU platforms (Pascal and Volta). While the performance in some cases remains far below that of hand-written code, it also manages to match or exceed manually written implementations in other cases. For these cases, we achieve speedups of up to 9x compared to non-vectorized code.