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... Show moreThis 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. Show less
Efficient execution of large-scale application codes is a primary requirement in many cases. High efficiency can only be achieved by utilizing architecture-independent efficient algorithms and... Show moreEfficient execution of large-scale application codes is a primary requirement in many cases. High efficiency can only be achieved by utilizing architecture-independent efficient algorithms and exploiting specific architecture-dependent characteristics of a given computer architecture. However, platform specific versions of source code must be avoided to limit development and maintenance complexity. Usually, the problem can be formulated on an abstract level (mathematical equations, English). At that level, the problem is completely known, and there is no reference to the hardware on which the problem will be solved. Unfortunately, often the advantages of a high level of abstraction are overshadowed by a loss of performance compared to handwritten code. Therefore, a problem-specific code generator, called Ctadel, has been developed in order to exploit architecture-independent and dependent optimizations. We show how to extend Ctadel with more advanced numerical techniques and a interfaces to numerical libraries. A number of numerical models from Hirlam, a numerical weather prediction application in use by a number of meteorological institutes like the Dutch royal meteorological institute (KNMI) where specified using our specification language. We compared the performance of the generated program code with hand-written code. In most case, the code generated by Ctadel performs as well or even better than the hand-written code. Show less