Development of a Many-Core Framework for a Finite-Volume Compressible RANS Code with a Fortran-OpenCL Interface
Computational Fluid Dynamics (CFD) is a highly compute-intensive problem, and so exploitation of high-performance computing (HPC) resources is essential in this field. However, code performance based on conventional domain decomposition is tending to a limit and is not well-suited to exploiting exascale machines leveraging emerging hardware based more on high throughput, in particular graphics processing units (GPUs). To overcome this and close the performance gap between current HPC capability and realised performance, traditional parallel paradigms need to be reformulated for and combined with fine-grain thread-level decompositions. However, many CFD codes are legacy codes, often written on Fortran with years of development effort invested and refactoring these to target thread-based architectures rather than minimising operations and message passing is a major undertaking. Hence, a framework is presented to simplify porting of Fortran numerical codes to many-core architectures. A Fortran-OpenCL API has been developed that abstracts away the manual memory management required with pure OpenCL codes, making kernels straightforward to read and write and, most significantly, enables launching of OpenCL kernels directly from Fortran codes to allow retention of the Fortran code structure. Furthermore, the API provides automatic type safety. Details of code structure and the porting to many-core architectures is presented for an existing structured multiblock finite-volume RANS code, in two dimensions, and the flexibility and efficiency of this approach is demonstrated. Results are presented for two-dimensional calculations using an upwind convective scheme with two-equation turbulence model, on meshes of upto eight million mesh cells. Preliminary results show overall speed-ups approaching 150x on a consumer GPU card compared to the equivalent Fortran version on a single Intel core, and around 28x compared to an MPI-Fortran version of the code using all six Intel cores of a ninth generation Intel CPU, showing that high-fidelity two-dimensional RANS computations can be run on a graphics card in a few seconds.
Authors
- Laurence Kedward (ORCID: https://orcid.org/0000-0002-6456-4951)
- Christian B Allen
Institutions
- University of Bristol (GB)
Publication Details
- Published
- 2025-07-16
- DOI
- https://doi.org/10.2514/6.2025-3432
- Primary Topic
- Spacecraft and Cryogenic Technologies
- Type
- article
- Field-Weighted Citation Impact
- 0.00