Table of Contents Author Guidelines Submit a Manuscript
Scientific Programming
Volume 21, Issue 1-2, Pages 1-16
http://dx.doi.org/10.3233/SPR-130360

From Physics Model to Results: An Optimizing Framework for Cross-Architecture Code Generation

Marek Blazewicz,1,2 Ian Hinder,3 David M. Koppelman,4,5 Steven R. Brandt,4,6 Milosz Ciznicki,1 Michal Kierzynka,1,2 Frank Löffler,4 Erik Schnetter,4,7,8 and Jian Tao4

1Applications Department, Poznań Supercomputing & Networking Center, Poznań, Poland
2Poznań University of Technology, Poznań, Poland
3Max-Planck-Institut für Gravitationsphysik, Albert-Einstein-Institut, Potsdam, Germany
4Center for Computation & Technology, Louisiana State University, Baton Rouge, LA, USA
5Division of Electrical & Computer Engineering, Louisiana State University, Baton Rouge, LA, USA
6Division of Computer Science, Louisiana State University, Baton Rouge, LA, USA
7Perimeter Institute for Theoretical Physics, Waterloo, ON, Canada
8Department of Physics, University of Guelph, Guelph, ON, Canada

Copyright © 2013 Hindawi Publishing Corporation. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Abstract

Starting from a high-level problem description in terms of partial differential equations using abstract tensor notation, the Chemora framework discretizes, optimizes, and generates complete high performance codes for a wide range of compute architectures. Chemora extends the capabilities of Cactus, facilitating the usage of large-scale CPU/GPU systems in an efficient manner for complex applications, without low-level code tuning. Chemora achieves parallelism through MPI and multi-threading, combining OpenMP and CUDA. Optimizations include high-level code transformations, efficient loop traversal strategies, dynamically selected data and instruction cache usage strategies, and JIT compilation of GPU code tailored to the problem characteristics. The discretization is based on higher-order finite differences on multi-block domains. Chemora's capabilities are demonstrated by simulations of black hole collisions. This problem provides an acid test of the framework, as the Einstein equations contain hundreds of variables and thousands of terms.