Abstract

Efficient random number generation with high quality statistical properties and exact reproducibility of Monte Carlo simulations are important requirements in many areas of computational science. VecRNG is a package providing pseudo-random number generation (pRNG) in the context of a new library VecMath. This library bundles up several general-purpose mathematical utilities, data structures, and algorithms having both SIMD and SIMT (GPUs) support based on VecCore. Several state-of-the-art RNG algorithms are implemented as kernels supporting parallel generation of random numbers in scalar, vector, and Cuda workflows. In this report, we will present design considerations, implementation details, and computing performance of parallel pRNG engines on both CPU and GPU. Reproducibility of propagating multiple particles in parallel for HEP event simulation is demonstrated, using GeantV-based examples, for both sequential and fine-grain track-level concurrent simulation workflows. Strategies for efficient uses of vectorized pRNG and non-overlapping streams of random number sequences in concurrent computing environments is discussed as well.

Highlights

  • The stochastic nature of many physical systems is often well modeled by Monte Carlo techniques, which require pseudorandom number generators with good statistical properties and generally the ability to create independent sub-sequences

  • We report on design considerations and an initial implementation of a small set of pseudo-random number generation (pRNG) algorithms portable for SIMD and SIMT which rely on a common kernel

  • Return static_cast(this)->template Kernel(state); }; Each derived pRNG class is only responsible for implementing the generic Kernel method and its own auxiliary member functions, One of associated requirements for each generator in VecRNG is to provide an efficient skipahead algorithm, sn+p = fp(sn) in order to assign disjointed multiple streams for different tasks

Read more

Summary

Introduction

The stochastic nature of many physical systems is often well modeled by Monte Carlo techniques, which require pseudorandom number generators (pRNGs) with good statistical properties and generally the ability to create independent sub-sequences. Vectorization of pseudo random number generation VecRNG is a part of VecMath which is a collection of vectorized math algorithms and utility functions for HEP applications, based on the VecCore library [5] It provides parallel pRNGs implementations for both SIMD and SIMT workflows via architecture-independent common kernels. Return static_cast(this)->template Kernel(state); }; Each derived pRNG class is only responsible for implementing the generic Kernel method and its own auxiliary member functions, One of associated requirements for each generator in VecRNG is to provide an efficient skipahead algorithm, sn+p = fp(sn) (i.e., advancing a state, sn, by p-sequences where p is the unit of the stream length or an arbitrary number) in order to assign disjointed multiple streams for different tasks.

Generator Scalar
Conclusion
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call