Developing a Monte Carlo mini-app for exascale co-design

L. J. Cox, Ryan MarcusOSTI 2011

Abstract

The transition to exascale computing requires a "co-design" approach where hardware and software are developed in tandem. However, standard Monte Carlo radiation transport codes like MCNP are often too complex and restricted for open collaboration. This paper introduces a simplified Monte Carlo "mini-app" that retains the essential computational and memory-access patterns of full-scale simulations while removing export-controlled physics. This portable benchmark allows researchers to test and optimize performance on emerging hardware architectures.

The Challenge of Exascale Co-Design

As supercomputing moves toward the exascale—systems capable of $10^{18}$ calculations per second—researchers face a significant hurdle: software must be written to exploit new hardware that is still being designed. Traditional radiation transport codes, the "gold standard" for nuclear simulations, present two major obstacles for this co-design process:

  1. Architectural Complexity: Millions of lines of legacy code make porting to experimental architectures extremely difficult.
  2. Security Restrictions: Export-controlled physics data prevents open collaboration with international hardware vendors or academic researchers.

To address these issues, the authors developed a neutral-particle (neutron and gamma) mini-app. This tool mimics the memory intensity and computational patterns of production codes like MCNP without the overhead of restricted data or legacy complexity.

A Modular Algorithmic Pipeline

The mini-app decomposes the Monte Carlo transport process into a modular, discrete pipeline. This separation allows computer scientists to independently optimize each step for parallelism:

  1. Source: Generation of radiation "packets" with specific initial states.
  2. RayTrace: Calculation of distances to geometric boundaries.
  3. Segment: Determination of the ordered list of zones a particle intercepts.
  4. Attenuate: Weight reduction based on material interaction probabilities.
  5. Tally: Accumulation of results (e.g., flux) into geometric zones.
  6. Spawn: Creation of secondary "child" packets from reactions.
  7. Normalize: Conversion of tallies into physical units.
A sample RayTrace through a 2D mesh, illustrating how a particle path is calculated relative to geometric boundaries.

The "Segment" step is particularly critical for performance, as it merges intercepts from different axes into a coherent path for material interaction.

The Segment step merges X and Y intercepts into an ordered list of zones, a critical step for determining how particles interact with materials.

Computational Strategy and Data Abstraction

A key insight of this work is that for hardware co-design, computational representativeness is more important than physical fidelity. The specific isotopic cross-section used matters less than the pattern of how that data is fetched from memory.

The app utilizes a 3D Cartesian "product mesh" and represents particles as 80-byte "packets." This abstraction treats the simulation as a high-throughput data problem, making it an ideal candidate for testing:

  • Memory Hierarchies: Evaluating how different data layouts (Array of Structures vs. Structure of Arrays) affect cache performance.
  • Fine-Grained Parallelism: Exploiting the independence of RayTrace calculations across different axes (X, Y, and Z).
  • Branching Logic: Managing the unpredictable creation of "child" packets during the "Spawn" phase, which is often the most difficult part of parallelizing Monte Carlo codes.

Conclusion and Future Work

The mini-app provides a formal specification for exascale benchmarking, defining data structures and algorithmic logic that can be implemented across various languages and architectures. While currently limited to Cartesian meshes and simplified multi-group physics, future iterations will incorporate unstructured meshes and "image tallies" for radiography. This framework serves as a vital tool for exploring emerging paradigms like non-volatile memory and specialized co-processors.

Summary updated

BibTeX
@inproceedings{cox2011developing,
  author = {L. J. Cox and Ryan Marcus},
  title = {{Developing a Monte Carlo mini-app for exascale co-design}},
  booktitle = {OSTI},
  year = {2011},
}
Figure