{"title":"KinetiX: A performance portable code generator for chemical kinetics and transport properties","authors":"Bogdan A. Danciu, Christos E. Frouzakis","doi":"10.1016/j.cpc.2025.109504","DOIUrl":null,"url":null,"abstract":"<div><div>We present <span>KinetiX</span>, a software toolkit to generate computationally efficient fuel-specific routines for the chemical source term, thermodynamic and mixture-averaged transport properties for use in combustion simulation codes. The C++ routines are designed for high-performance execution on both CPU and GPU architectures. On CPUs, chemical kinetics computations are optimized by eliminating redundant operations and using data alignment and loops with trivial access patterns that enable auto-vectorization, reducing the latency of complex mathematical operations. On GPUs, performance is improved by loop unrolling, reducing the number of costly exponential evaluations and limiting the number of live variables for better register usage. The accuracy of the generated routines is checked against reference values computed using Cantera and the maximum relative errors are below <span><math><msup><mrow><mn>10</mn></mrow><mrow><mo>−</mo><mn>7</mn></mrow></msup></math></span>. We evaluate the performance of the kernels on some of the latest CPU and GPU architectures from AMD and NVIDIA, i.e., AMD EPYC 9653, AMD MI250X, and NVIDIA H100. The routines generated by <span>KinetiX</span> outperform the general-purpose Cantera library, achieving speedups of up to 2.4x for species production rates and 3.2x for mixture-averaged transport properties on CPUs. Compared to the routines generated by PelePhysics (CEPTR), <span>KinetiX</span> achieves speedups of up to 2.6x on CPUs and 1.7x on GPUs for the species production rates kernel on a single-threaded basis.</div></div><div><h3>Program summary</h3><div><em>Program Title:</em> KinetiX</div><div><em>CPC Library link to program files:</em> <span><span>https://doi.org/10.17632/cjwxfw4btt.1</span><svg><path></path></svg></span></div><div><em>Developer's repository link:</em> <span><span>https://github.com/bogdandanciu/KinetiX</span><svg><path></path></svg></span></div><div><em>Licensing provisions:</em> BSD 2-clause</div><div><em>Programming language:</em> Python, C++</div><div><em>Nature of problem:</em> Combustion simulations require efficient computation of chemical source terms, thermodynamic and transport properties for diverse fuel types. The challenge is optimizing these computations for both CPUs and GPUs without compromising accuracy.</div><div><em>Solution method:</em> Starting from an input file containing kinetic parameters, thermodynamic and transport data, <span>KinetiX</span> generates fuel-specific routines to compute species production rates, thermodynamic and mixture-averaged transport properties for high-performance execution on both CPU and GPU architectures.</div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"310 ","pages":"Article 109504"},"PeriodicalIF":7.2000,"publicationDate":"2025-01-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Computer Physics Communications","FirstCategoryId":"101","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0010465525000074","RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, INTERDISCIPLINARY APPLICATIONS","Score":null,"Total":0}
引用次数: 0
Abstract
We present KinetiX, a software toolkit to generate computationally efficient fuel-specific routines for the chemical source term, thermodynamic and mixture-averaged transport properties for use in combustion simulation codes. The C++ routines are designed for high-performance execution on both CPU and GPU architectures. On CPUs, chemical kinetics computations are optimized by eliminating redundant operations and using data alignment and loops with trivial access patterns that enable auto-vectorization, reducing the latency of complex mathematical operations. On GPUs, performance is improved by loop unrolling, reducing the number of costly exponential evaluations and limiting the number of live variables for better register usage. The accuracy of the generated routines is checked against reference values computed using Cantera and the maximum relative errors are below . We evaluate the performance of the kernels on some of the latest CPU and GPU architectures from AMD and NVIDIA, i.e., AMD EPYC 9653, AMD MI250X, and NVIDIA H100. The routines generated by KinetiX outperform the general-purpose Cantera library, achieving speedups of up to 2.4x for species production rates and 3.2x for mixture-averaged transport properties on CPUs. Compared to the routines generated by PelePhysics (CEPTR), KinetiX achieves speedups of up to 2.6x on CPUs and 1.7x on GPUs for the species production rates kernel on a single-threaded basis.
Program summary
Program Title: KinetiX
CPC Library link to program files:https://doi.org/10.17632/cjwxfw4btt.1
Nature of problem: Combustion simulations require efficient computation of chemical source terms, thermodynamic and transport properties for diverse fuel types. The challenge is optimizing these computations for both CPUs and GPUs without compromising accuracy.
Solution method: Starting from an input file containing kinetic parameters, thermodynamic and transport data, KinetiX generates fuel-specific routines to compute species production rates, thermodynamic and mixture-averaged transport properties for high-performance execution on both CPU and GPU architectures.
期刊介绍:
The focus of CPC is on contemporary computational methods and techniques and their implementation, the effectiveness of which will normally be evidenced by the author(s) within the context of a substantive problem in physics. Within this setting CPC publishes two types of paper.
Computer Programs in Physics (CPiP)
These papers describe significant computer programs to be archived in the CPC Program Library which is held in the Mendeley Data repository. The submitted software must be covered by an approved open source licence. Papers and associated computer programs that address a problem of contemporary interest in physics that cannot be solved by current software are particularly encouraged.
Computational Physics Papers (CP)
These are research papers in, but are not limited to, the following themes across computational physics and related disciplines.
mathematical and numerical methods and algorithms;
computational models including those associated with the design, control and analysis of experiments; and
algebraic computation.
Each will normally include software implementation and performance details. The software implementation should, ideally, be available via GitHub, Zenodo or an institutional repository.In addition, research papers on the impact of advanced computer architecture and special purpose computers on computing in the physical sciences and software topics related to, and of importance in, the physical sciences may be considered.