Author:
Wang Tianle,Atif Mohammad,Dong Zhihua,Leggett Charles,Lin Meifeng
Abstract
Random number generator is an important component of many scientific projects. Many projects are written using programming models (like OpenMP and SYCL) to target different architectures. However, some programming models do not provide a random number generator. In this work, we introduce our random number generator wrapper. It is a header-only library that supports three distributions of random numbers: uniform, normal, and poisson. On the GPU backend, it wraps the cuRAND and rocRAND library, and supports various random number engines. It also wraps random123, a counterbased random number generator, on both CPU and GPU. With this library, we can generate random numbers with a few lines of code and target both GPU and multi-thread CPU with the same code. We also investigate the performance and scalability of this wrapper on different architectures with different engines and the number of cores.
Reference6 articles.
1. Lin Meifeng, et al. “Portable Programming Model Exploration for LArTPC Simulation in a Heterogeneous Computing Environment: OpenMP vs. SYCL.” arXiv preprint arXiv:2304.01841 (2023).
2. The ATLAS Simulation Infrastructure
3. The ATLAS Collaboration, The new Fast Calorimeter Simulation in ATLAS, Tech. Rep. ATL-SOFT-PUB-2018-002, (2018)
4. Khronos SYCL working group. 2020. SYCL 1.2.1 specification. Standard. Khronos Group, Inc, Beaverton, OR, USA.
5. Chandra R., Dagum L., Kohr D., Menon R., Maydan D., and McDonald J. (2001). Parallel programming in OpenMP. Morgan kaufmann.