Opportunities for performance optimization of applications through code generation
Abstract
This thesis presents the new approaches to improve the performance of a weather forecast model. These approaches require the code complexities, which can be resolved by code generation. In Chapter 2 we investigated the extension to the code generation tool CTADEL to generate code for Galerkin finite element methods. Applying to generate code for the Shallow-Water equations, we found that the generated code is 3 and 1.2 times faster than the handwritten code with the gfortran 4.1.2 and pathscale 3.0 compiler, respectively. In Chapter 3, we optimized the parallel implementation of the HIRLAM weather forecast model by overlapping communications with calculations. We found that the performance of this parallel implementation can be significantly improved by overlapping communications with calculations. In Chapter 4 we extended CTADEL to generate parallel programs. By applying this technique we have successfully generated efficient parallel code for the Shallow-Water equations. In Chapter 5 we investigated a method to speed up the HIRLAM weather forecast model. We accelerated the dynamics routine by porting it on GPUs. We found that using GPUs for weather forecasting yields an order of magnitude performance improvement over the use of conventional CPUs. In Chapter 6 we showed our extension to CTADEL to automatically generate high efficient CUDA codes. Then, we applied to generate CUDA stream code for the dynamics routine of the HIRLAM weather forecast model. The results showed that the generated code is more efficient than the optimized handwritten program.

