A new portable random number generator wrapper library

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...

Full description

Saved in:
Bibliographic Details
Published inEPJ Web of conferences Vol. 295; p. 11001
Main Authors Wang, Tianle, Atif, Mohammad, Dong, Zhihua, Leggett, Charles, Lin, Meifeng
Format Journal Article Conference Proceeding
LanguageEnglish
Published Les Ulis EDP Sciences 01.01.2024
Subjects
Online AccessGet full text

Cover

Loading…
More Information
Summary: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.
Bibliography:ObjectType-Conference Proceeding-1
SourceType-Conference Papers & Proceedings-1
content type line 21
BNL-226121-2024-JAAM
USDOE Office of Science (SC), Advanced Scientific Computing Research (ASCR)
USDOE Office of Science (SC), Basic Energy Sciences (BES). Scientific User Facilities (SUF)
SC0012704; AC02-05CH11231
USDOE Office of Science (SC), High Energy Physics (HEP)
ISSN:2100-014X
2101-6275
2100-014X
DOI:10.1051/epjconf/202429511001