Refactoring for Performance with Semantic Patching: Case Study with Recipes
Abstract
Development of an HPC simulation code may take years of a domain scientists' work. Over that timespan, the computing landscape evolves, efficient programming best practices change, APIs of performance libraries change, etc. A moment then comes where the entire codebase requires a thorough performance lift. In the luckiest case, the required intervention is limited to a few hot loops. In practice, much more is needed. This paper describes an activity of programmatic refactoring of ≈200k lines of C code by means of source-to-source translation. The context is that of a so-called high level support provided to the domain scientists community by a HPC service center. The motivation of this short paper is the immediate reuse potential of these techniques.
Origin : Files produced by the author(s)