Generative programming methods for parallel partial differential field equation solvers : a thesis presented in partial fulfilment of the requirements for the degree of Doctor of Philosophy in Computer Science at Massey University, Albany, New Zealand
This thesis describes a generative programming system that automatically constructs parallel simulations
of complex systems that are based on field equations using finite differencing and explicit
Runge-Kutta integration methods. Programming computational simulations by hand for different
parallel architectures is both tedious and time consuming. Simulation frameworks struggle to target
different architectures without losing performance. Automating the process of constructing simulation
codes can significantly improve productivity.
Three computational models based on field equations are discussed in depth along with numerical
methods for discretising and simulating them. The Cahn-Hilliard model of phase separation,
the Ginzburg-Landau model of superconductivity and the Lotka-Volterra model of interacting populations
are discussed in detail and are used as examples. A number of modern parallel computing
architectures and associated parallel programming languages are also discussed and simulation implementations
that run upon these architectures are presented. The performance results from these
implementations are used to compare the parallel architectures and their relative performance capabilities
for processing each type of simulation.
The key elements of a simulation are identified as being: the computational model, the stencil
operators, the explicit integration methods and the configuration information. A domain specific
language for defining these elements is developed and presented. A generative programming system
is described that parses these element definitions and combines them together to form a complete
simulation definition. It is then shown that code generators can be readily developed to produce very
efficient implementations from these simulation definitions in any parallel programming language
including C, TBB, MPI and CUDA for which explicit examples are given. It is shown that this method
is effective, extensible and can considerably reduce the programmer effort required to develop fast
parallel simulations of complex systems.