APS Logo

Porting the GEM Gyrokinetic Turbulence Code fromFortran to C++ for Improved Performance and Portability

POSTER

Abstract

We port the GEM gyrokinetic turbulence code originally written in Fortran to C++ toimprove both portablility and performance. GEM is a comprehensive global electromagnetic gyrokinetic particle simulation[1]. We are converting the inner-time loop functions to C++first, eventually converting the entire code. In the intermediary, we employ a binding library to link Fortran and C++. A pointer allocation algorithm generalized to higher dimensions isimplemented for optimal multidimensional array indexing of Fortran global arrays in C++. We also remove the use of MPI in Fortran and call MPI with the MPI C++ library. Long term, we are preparing to run on future exascale computers such as Frontier and Aurora. In preliminary conversions, we see nearly identical performance between the pure Fortran codeand C++/Fortran hybrid code. There is some minor additional compile/link time when using both C++ and Fortran. Additionally, we will show recent optimization/performance results using OpenMP GPU offloading and discuss the methods used to optimize C++ for numerical analysis.

[1] Y. Chen and S.E. Parker, J. Comput. Phys., Vol. 189, pp.463-475 (2003).

Presenters

  • Sophie M Redd

    University of Colorado, Boulder

Authors

  • Sophie M Redd

    University of Colorado, Boulder

  • Stefan Tirkas

    University of Colorado, Boulder

  • Yang Chen

    University of Colorado, Boulder

  • Junyi Cheng

    University of Colorado, Boulder

  • Qiheng Cai

    University of Colorado, Boulder

  • Scott E Parker

    University of Colorado, Boulder