Using Automated Code Generation to Support High Performance Extended MHD Integration in OpenGGCM
K. Germaschewski, J. Raeder · 2011
Abstract. Automatic code generation is a technique that takes the specification of an algorithm at a high abstraction level and turns it into a well-tuned computer code. For finite-volume / finite-difference based discretizations, this higher abstraction level can be a stencil computation. At the backend, the code generator features modules which generate optimal code for specific hardware architectures, for example conventional ar-chitectures (x86) using SIMD instructions (e.g. SSE2), or heterogeneous architectures like the Cell processor or GPGPUs. The definition of the computation is agnostic to the actual hardware used, as a high-performance implementation tailored to the specific architecture will be generated automatically. The OpenGGCM code, a global magnetosphere model, has been converted to use an automatically generated implementation of its magnetohydrodynamics (MHD) integrator. The new version enables us to take advantage of the Cell processor’s com-putational capability and also shows performance improvements of up to 2.3 × on a conventional Intel processor. The code generation approach also facilitated the recent extension of the MHD model to incorporate Hall physics. 1.