Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
Generative Code Specialisation for High-Performance Monte-Carlo Simulations
[go: Go Back, main page]

Blue PiLlS

Generative Code Specialisation for High-Performance Monte-Carlo Simulations

Don Stewart1, Hugh Chaffey-Millar2, Gabriele Keller1 , Manuel M. T. Chakravarty1 and Christopher Barner-Kowollik2.

1Computer Science & Engineering
University of New South Wales

2Centre for Advanced Macromolecular Design
School of Chemical Sciences and Engineering
University of New South Wales


Submitted

Abstract

We address the tension between software generality and performance in the domain of scientific and financial simulations based on Monte-Carlo methods. To this end, we present a novel software architecture, centred around the concept of a specialising simulator generator, that combines and extends methods from generative programming, partial evaluation, runtime code generation, and dynamic code loading. The core tenet is that, given a fixed simulator configuration, a generator in a functional language can produce low-level code that is more highly optimised than a manually implemented generic simulator. We also introduce a skeleton, or template, capturing a wide range of Monte-Carlo methods and use it to explain how to design specialising simulator generators and how to generate parallelised simulators for multi-core and distributed-memory multiprocessors.

We evaluated the practical benefits and limitations of our approach by applying it to a highly relevant problem in computational chemistry. More precisely, we used a Markov-chain Monte-Carlo method for the study of advanced forms of polymerisation kinetics. The resulting implementation executes faster than all competing software products, while at the same time also being more general. The generative architecture allows us to cover a wider range of chemical reactions and to target a wider range of high-performance architectures (such as PC clusters and SMP multiprocessors).

We show that it is possible to outperform low-level languages with functional programming in domains with very stringent performance requirements if the domain also demands generality.

Full Text

The full text of the paper can be downloaded: (ps.gz ,pdf)

Source code

The source code for the polymer simulators described in this paper, and examples, can be downloaded from the project website.


Sun Apr 8 14:17:11 EST 2007