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.
翻译:用于蒙特卡罗(MC)应用的伪随机数生成技术对该程序工作的质量和速度具有诸多影响。随着随机数生成器(RNG)速度下降,随机数的生成开始主导运行时间。当RNG输出的相关性增加时,最终结果的可靠性也会降低。可重现性和并行性的需求进一步加剧了这些困难。对于可重现性,每次运行模拟时,用于确定任意结果的生成数字必须相同。然而,大多数并行性带来的并发性会引入竞态条件。为同时实现可重现性与并发性,必须为每个独立可调度的模拟单元跟踪独立的RNG状态,从而形成独立的随机数流。我们提出一种基于步长的并行线性同余生成器(LCG)种子生成方法的替代方案,该方法通过哈希生成种子并允许重复输出,从而在并发性和工作负载增加时更具可扩展性。基于简单MC输运基准计算中计数结果的正态性检验所收集的数据表明,与传统的基于步长的RNG相比,所提出的基于哈希的RNG不会显著影响计数结果的正态性特性。