Table of Contents
Fetching ...

An Alternative to Stride-Based RNG for Monte Carlo Transport

Braxton S. Cuneo, Ilham Variansyah

TL;DR

The paper addresses scalability and reproducibility challenges in Monte Carlo transport RNGs by moving from stride-based LCG seeding to a hash-based seed splitting approach. It introduces hash$(k,s)$ as the core seed-generation primitive and develops seed splitting, hierarchical chaining, and on-demand generation to produce deterministic, per-unit seeds without fixed stride calibration. Empirical results on a AZURV1-inspired test show that tallies remain normally distributed and runtimes are comparable to traditional methods, supporting the method's viability. This hash-based strategy offers scalable concurrency and reproducibility for exascale MC transport codes, reducing the burden of stride management while preserving statistical properties of the outputs.

Abstract

The techniques used to generate pseudo-random numbers for Monte Carlo (MC) applications bear many implications on the quality and speed of that programs work. As a random number generator (RNG) slows, the production of random numbers begins to dominate runtime. As RNG output grows in correlation, the final product becomes less reliable. These difficulties are further compounded by the need for reproducibility and parallelism. For reproducibility, the numbers generated to determine any outcome must be the same each time a simulation is run. However, the concurrency that comes with most parallelism introduces race conditions. To have both reproducibility and concurrency, separate RNG states must be tracked for each independently schedulable unit of simulation, forming independent random number streams. We propose an alternative to the stride-based parallel LCG seeding approach that scales more practically with increased concurrency and workload by generating seeds through hashing and allowing for repeated outputs. Data gathered from normality tests of tally results from simple MC transport benchmark calculations indicates that the proposed hash-based RNG does not significantly affect the tally result normality property as compared to the conventional stride-based RNG.

An Alternative to Stride-Based RNG for Monte Carlo Transport

TL;DR

The paper addresses scalability and reproducibility challenges in Monte Carlo transport RNGs by moving from stride-based LCG seeding to a hash-based seed splitting approach. It introduces hash as the core seed-generation primitive and develops seed splitting, hierarchical chaining, and on-demand generation to produce deterministic, per-unit seeds without fixed stride calibration. Empirical results on a AZURV1-inspired test show that tallies remain normally distributed and runtimes are comparable to traditional methods, supporting the method's viability. This hash-based strategy offers scalable concurrency and reproducibility for exascale MC transport codes, reducing the burden of stride management while preserving statistical properties of the outputs.

Abstract

The techniques used to generate pseudo-random numbers for Monte Carlo (MC) applications bear many implications on the quality and speed of that programs work. As a random number generator (RNG) slows, the production of random numbers begins to dominate runtime. As RNG output grows in correlation, the final product becomes less reliable. These difficulties are further compounded by the need for reproducibility and parallelism. For reproducibility, the numbers generated to determine any outcome must be the same each time a simulation is run. However, the concurrency that comes with most parallelism introduces race conditions. To have both reproducibility and concurrency, separate RNG states must be tracked for each independently schedulable unit of simulation, forming independent random number streams. We propose an alternative to the stride-based parallel LCG seeding approach that scales more practically with increased concurrency and workload by generating seeds through hashing and allowing for repeated outputs. Data gathered from normality tests of tally results from simple MC transport benchmark calculations indicates that the proposed hash-based RNG does not significantly affect the tally result normality property as compared to the conventional stride-based RNG.
Paper Structure (11 sections, 5 equations, 3 figures)

This paper contains 11 sections, 5 equations, 3 figures.

Figures (3)

  • Figure 1: AZURV1 analytical flux solution $\phi(x,t)$ (left) and average center flux MC solutions calculated with the two RNGs (right). Overlapping shaded areas on the right figure represent the standard deviations of the 20 data points obtained from 1000 batch runs, each with 1000 source particles.
  • Figure 2: Overlapping distributions and quantile-quantile plots of the normalized deviations to the mean values of the 20 data points of the AZURV1 center flux calculated with the stride- and hash-based RNGs over 1000 batches.
  • Figure 3: Saphiro-Wilk normality test results---maximum, minimum, and median $p$-values over 30 repetitions of the 1000 batch runs---at the 20 transient data points of the AZURV1 center flux calculated with the stride- and hash-based RNGs.