MRG8
MRG8 Random Number Generator Library (MRG8) Copyright (c) 2019, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy) and Tokyo Institute of Technology. All rights reserved.
If you have questions about your rights to use or distribute this software, please contact Berkeley Lab's Intellectual Property Office at [email protected].
NOTICE. This Software was developed under funding from the U.S. Department of Energy and the U.S. Government consequently retains certain rights. As such, the U.S. Government has been granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the Software to reproduce, distribute copies to the public, prepare derivative works, and perform publicly and display publicly, and to permit others to do so.
======
2.1 (March, 2019)
This is a pseudorandom number generator based on the 8th order primitive polynomial modulo 2^31-1. This polynomial was provided by Prof. P. L’Ecuyer of Montreal University. The MRG8 firstly appeared in (1), and further optimized version was proposed in (2) later.
(1) Kenta Hongo, Ryo Maezono, Kenichi Miura, "Random number generators tested on quantum Monte Carlo simulations", Journal of computational chemistry, 2010
(2) Yusuke Nagasaka, Akira Nukada, Satoshi Matsuoka, Kenichi Miura, John Shalf, "MRG8 - Random Number Generation for the Exascale Era", The Platform for Advanced Scientific Computing Conference (PASC18), July 2018 (to be appeared)
- Nothing special
- CUDA: >= 5.0
- Compute capability: >= 3.5
- Use of cuRAND library for test program (MRG8 itself does not require)
- OpenMP
- Use of Intel MKL library for test program (MRG8 itself does not require)
To use this library, the first thing you need to do is to modify the Makefile with correct CUDA/Intel Compiler installation path. The compute capability for CUDA is also appropriately set.
- Compile with Makefile: make test
- This command generates all test executable file including cuRAND library.
- Run on GPU: './bin/test_mrg8_outer 16'
- First argument is the number of RNGs to be generated (* 2^20). Above example means "MRG8 optimized for NVIDIA GPU generates 2^24 of RNGs".
- Compile with Makefile: make test
- This command generates all test executable file including Intel MKL
- Run on KNL processor: './bin/test_mrg8_vec_outer_tp 16'
- First argument is the number of RNGs to be generated (* 2^20). Above example means "MRG8 with AVX-512 and full threads generates 2^24 of RNGs".
'make build' provides static library of MRG8-CUDA, generating 'libmrg8.a'. Copy 'mrg8.h' and 'mrg8_cuda.h' to your codes. To use the library, add include mrg8_vec.h in your code, and compile with 'libmrg8.a'.
Copy 'mrg8.h' and 'mrg8_vec.h' to your codes. To use the library, include file (mrg8_vec.h) in your code.
More detailed document is in ./original/ReadmeMRG8.doc