Preview

Proceedings of the Institute for System Programming of the RAS (Proceedings of ISP RAS)

Advanced search

Applying AVX512 vectorization to improve the performance of a random number generator

https://doi.org/10.15514/ISPRAS-2018-30(1)-8

Abstract

The generation of uniformly distributed random numbers is necessary for computer simulation by Monte Carlo methods and molecular dynamics. Generators of pseudo-random numbers (GPRS) are used to generate random numbers. GPRS uses deterministic algorithms to calculate numbers, but the sequence obtained in this way has the properties of a random sequence. For a number of problems using Monte Carlo methods, random number generation takes up a significant amount of computational time, and increasing the generation capacity is an important task. This paper describes applying SIMD instructions (Single Instruction Multiple Data) to parallelize generation of pseudorandom numbers. We review SIMD instruction set extensions such as MMX, SSE, AVX2, AVX512. The example of AVX512 implementation is given for the LFSR113 pseudorandom number generator. Performance is compared for different algorithm implementations.

About the Authors

M. S. Guskova
Science Center in Chernogolovka; National Research University Higher School of Economics
Russian Federation


L. Yu. Barash
Science Center in Chernogolovka; National Research University Higher School of Economics; Landau Institute for Theoretical Physic
Russian Federation


L. N. Shchur
Science Center in Chernogolovka; National Research University Higher School of Economics; Landau Institute for Theoretical Physic; Dorodnicyn Computing Centre, FRC CSC RAS
Russian Federation


References

1. Landau D.P., Binder K., A Guide to Monte Carlo Simulations in Statistical Physics, 4th edition, Cambridge University Press, Cambridge, 2015.

2. Barash L.Y., Shchur L.N., Generation of Random Numbers and Parallel Random Number Streams for Monte Carlo Simulations. Modeling and Analysis of Information Systems, 19(2), 2012, pp. 145-162 (in Russian).

3. Intel® 64 and IA-32 architectures software developer’s manual combined volumes 1, 2A, 2B, 2C, 2D, 3A, 3B, 3C, 3D, and 4, http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html

4. L’Ecuyer P., Tables of maximally equidistributed combined LFSR generators, Mathematics of Computation 68(225), 1999, pp. 261–269.

5. A. M. Ferrenberg, D. P. Landau, and Y. J. Wong, Monte Carlo simulations: Hidden errors from ‘‘good’’ random number generators, Phys. Rev. Lett. 69, 1992, pp. 3382–3384.

6. P. Grassberger, On correlations in “good” random number generators, Phys. Lett. A 181, 1993, pp. 43–46.

7. F. Schmid and N. B. Wilding, Errors in Monte Carlo simulations using shift register random number generators, Int. J. Mod. Phys. C 6, 1995, pp. 781–787.

8. L'Ecuyer P., Simard R. TestU01: A C library for empirical testing of random number generators, ACM Transactions on Mathematical Software 33(4), 2007, article 22.

9. L.Yu.Barash, L.N.Shchur, PRAND: GPU accelerated parallel random number generation library: Using most reliable algorithms and applying parallelism of modern GPUs and CPUs, Computer Physics Communications, 185(4), 2014, pp. 1343-1353.

10. L.Yu. Barash, L.N. Shchur, On the generation of parallel streams of pseudorandom numbers, Software Engineering Vol.1, 2013, pp. 24–32 (in Russian).

11. L.Yu. Barash, M.S. Guskova, L.N. Shchur, Employing AVX vectorization to improve the performance of random number generators, Programming and Computer Software, 43(3), 2017, pp. 145-160.

12. M. Galassi et al, GNU Scientific Library Reference Manual - Third Edition, Network Theory Ltd., 2009, ISBN: 0954612078.

13. M.S. Guskova, L.Yu. Barash, L.N. Shchur, RNGAVXLIB: Program library for random number generation, AVX realization, Computer Physics Communications, 200, 2016, pp. 402–405.

14. Barash L. Y., Shchur L. N. RNGSSELIB: Program library for random number generation. More generators, parallel streams of random numbers and Fortran compatibility, Computer Physics Communications 184(10), 2013, pp. 2367–2369.

15. L.Yu. Barash, L.N. Shchur, RNGSSELIB: Program library for random number generation, SSE2 realization, Comput. Phys. Commun., 182 (7), 2011, pp. 1518-1527.

16. P. L’Ecuyer, D. Munger, N. Kemerchou, clRNG: A library for uniform random number generation in OpenCL, 2015, http://www-labs.iro.umontreal.ca/~simul/clrng/


Review

For citations:


Guskova M.S., Barash L.Yu., Shchur L.N. Applying AVX512 vectorization to improve the performance of a random number generator. Proceedings of the Institute for System Programming of the RAS (Proceedings of ISP RAS). 2018;30(1):115-126. (In Russ.) https://doi.org/10.15514/ISPRAS-2018-30(1)-8



Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 License.


ISSN 2079-8156 (Print)
ISSN 2220-6426 (Online)