Incorporation of PSyclone processing into the NEMO build process
Development description
The PSyclone domain-specific-language framework provides functionality to support and enhance performance portability for the NEMO framework through targeted transformations of the NEMO Fortran source code. In particular, successful GPU-based acceleration of the ocean-physics component of NEMO v4.0 in commonly used configurations using PSyclone has been demonstrated to date, and further work on achieving performance portability for the the NEMO codebase led by the PSyclone development team is ongoing.
The inclusion of a generic PSyclone processing step in the NEMO build system, which is based on the build sub-system of the Flexible Configuration Management system, has been proposed in order to establish the routine availability of PSyclone-based transformations and to facilitate performance portability in future NEMO versions.
In a first phase, an existing prototype implementation of a PSyclone processing step in the NEMO build system based on NEMO v4.0 will be adapted for and transferred to a current NEMO version. While this prototype implements the independent PSyclone transformation of individual source-code files as part of the source-code pre-processing step, recent PSyclone developments require the co-processing of multiple source-code files (in particular to retrieve information about use-associated variables) in order to apply some specific transformations. As the source-code pre-processing step of the NEMO build process is not carried out in a squence that respects module dependencies, such co-processing is not normally possible. Therefore, in a second phase, this shortcoming will be addressed, and, if feasible, an appropriate dependency-resolution scheme for the PSyclone pre-processing step will be implemented.
[ Update (9 March 2023) — Instead of the originally proposed two-stage development, PSyclone processing will be incorporated into the NEMO build system in the form of an additional build process as outlined in the comment below. ]
Code implementation
The proposed modification primarily comprises an extension of the NEMO build system, which will be made available as a build option via the makenemo
script.
Documentation updates
Relevant documentation (incl. the "Usage" information output by makenemo --help
) will be updated to describe the NEMO PSyclone pre-processing build option.