As new heterogeneous high performance computing architectures are being developed and deployed, numerical weather and climate simulation applications are being adapted to take advantage of the computing power these new architectures offer.

Programming technologies like OpenACC have been used successfully to allow parallelism in existing code to be mapped and executed efficiently on many-core devices such as graphics processing units (GPUs). Unfortunately, achieving near optimal performance on different architectures (e.g. CPUs and GPUs) with a single source code is not always possible and architecture specific optimizations and code restructuring is sometimes required for performance critical code sections. This has been observed in both the COSMO weather model in use by the Swiss weather service, as well as the CAM-SE model developed in the U.S.

To alleviate this situation, we are developing a tool named CLAW whose function is to apply the necessary transformations on the code to generate both optimal GPU and CPU code from a single Fortran source code. Our tool utilizes source-to-source compiler techniques to extend the Fortran grammar in a simple manner that allows the developer to activate the necessary transformations for optimal execution on accelerators and CPUs automatically during code compilation. While the focus of this effort is currently on the transformations required in the physical parameterization of the COSMO model, a cross-organizational effort is in place to generalize the CLAW tool for use with other applications as well, beginning with the HAMMOZ aerosol and chemistry model and the ICON general circulation model.


Slides to this talk