Presentation
Leveraging AI to port from legacy Fortran to GPU enabled C++
DescriptionMany High-Performance Computing (HPC) applications have large code-bases written in legacy Fortran. Porting these applications to C++ enables us to leverage GPU programming frameworks such as Kokkos and AMReX but can be time-intensive. We present our use of LLM-powered code converters to expedite this process using three available code converters: ChatGPT, CodeConvert, and DeepAI. Our findings indicate that CodeConvert produce superior results compared to ChatGPT and DeepAI, requiring only minor adjustments by the user. However, we note that particular care must be taken with preprocessing directives, as all the converters tend to omit them when converting longer functions. Finally, we demonstrate that CodeConvert gives an identical bit-for-bit comparison of simulation results when porting MYNN-EDMF, a widely used climate subgrid model, to C++. By showcasing the effectiveness of this approach, we highlight that readily available LLM converters can be effectively used to accelerate the optimization of Fortran applications.