Atmospheric model data layout and memory access design

The Met Office LFRic model aims to provide efficient simulations of the atmosphere on next generation HPC architectures. Efficient memory management will be a key aspect in obtaining optimal performance. One element of that is optimising the level of precision to which data is stored. Another element is ensuring that data layout and access patterns are optimal for a given processor design. 

A recent ExCALIBUR activity completed the first stage in adapting LFRic to achieve these goals. The first part of the activity was to design and implement aspects of the atmospheric software infrastructure (LFRic) to enable it to flexibly deploy mixed-precision data types. This also required some redesign of the underlying numerics. So far, these capabilities are being used in the dynamic solver, but tests have also been carried out with single-precision transport. The second part was to explore adaptations to LFRic and changes to existing physics parametrisations that improve data layout and access patterns. This took the form of enabling a data transpose that can be used to improve cache reuse or vectorization depending on the compute patterns of the underpinning science code.

In tests (on current CPU machines) the speed-up obtained from switching the solver from double-precision to single exhibited roughly 30-40% (with a similar figure for the transport). Changing the data layout for one of the physics parametrisation schemes (microphysics) saw a factor of 4 speed up in this particular component. More work will now build on these capabilities to cover more of the code.