Skip to main content
Log in

Random number generators for massively parallel simulations on GPU

  • Review
  • Published:
The European Physical Journal Special Topics Aims and scope Submit manuscript

Abstract

High-performance streams of (pseudo) random numbers are crucial for the efficient implementation of countless stochastic algorithms, most importantly, Monte Carlo simulations and molecular dynamics simulations with stochastic thermostats. A number of implementations of random number generators has been discussed for GPU platforms before and some generators are even included in the CUDA supporting libraries. Nevertheless, not all of these generators are well suited for highly parallel applications where each thread requires its own generator instance. For this specific situation encountered, for instance, in simulations of lattice models, most of the high-quality generators with large states such as Mersenne twister cannot be used efficiently without substantial changes. We provide a broad review of existing CUDA variants of random-number generators and present the CUDA implementation of a new massively parallel high-quality, high-performance generator with a small memory load overhead.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. A.K. Hartmann, A Practical Guide to Computer Simulations (World Scientific, Singapore, 2009)

  2. J.E. Gentle, Random number generation and Monte Carlo methods, 2nd edn. (Springer, Berlin, 2003)

  3. J. von Neumann, J. Res. Nat. Bur. Stand. 12, 36 (1951)

    MathSciNet  Google Scholar 

  4. G. Marsaglia, J. Mod. Appl. Stat. Meth. 2, 2 (2003)

    Google Scholar 

  5. G. Marsaglia, DIEHARD Battery of Tests of Randomness, http://www.stat.fsu.edu/pub/diehard/

  6. P. L’Ecuyer, R. Simard, ACM Trans. Math. Softw. 33, 4 (2007)

    Article  MathSciNet  Google Scholar 

  7. A.M. Ferrenberg, D.P. Landau, Y.J. Wong, Phys. Rev. Lett. 69, 3382 (1992)

    Article  ADS  Google Scholar 

  8. G. Parisi, F. Rapuano, Phys. Lett. B 157, 301 (1985)

    Article  MathSciNet  ADS  Google Scholar 

  9. A.E. Ferdinand, M.E. Fisher, Phys. Rev. 185, 832 (1969)

    Article  ADS  Google Scholar 

  10. J.D. Owens, M. Houston, D. Luebke, et al., Proc. IEEE 96, 879 (2008)

    Article  Google Scholar 

  11. T. Preis, P. Virnau, W. Paul, et al., J. Comput. Phys. 228, 4468 (2009)

    Article  ADS  MATH  Google Scholar 

  12. J. Yin, D.P. Landau, Phys. Rev. E 80, 051117 (2009)

    Article  ADS  Google Scholar 

  13. M. Weigel, Comput. Phys. Commun. 182, 1833 (2011)

    Article  ADS  Google Scholar 

  14. E.E. Ferrero, J.P. De Francesco, N. Wolovick, et al., Comput. Phys. Commun. 183, 1578 (2012)

    Article  ADS  Google Scholar 

  15. T. Yavors’kii, M. Weigel, Eur. Phys. J. Special Topics 210, 159 (2012)

    Google Scholar 

  16. J.A. van Meel, A. Arnold, D. Frenkel, et al., Mol. Simul. 34, 259 (2008)

    Article  Google Scholar 

  17. A.J. Anderson, C.D. Lorenz, A. Travesset, J. Comput. Phys. 227, 5342 (2008)

    Article  ADS  MATH  Google Scholar 

  18. D.B. Kirk, W.W. Hwu, Programming Massively Parallel Processors (Elsevier, Amsterdam, 2010)

  19. R.P. Brent, in Proc. Fifth Australian Supercomputer Conference, 95–104 (Melbourne, 1992)

  20. J.K. Salmon, M.A. Moraes, R.O. Dror, et al., in Proceedings of 2011 International Conference for High Performance Computing, Networking, Storage and Analysis, SC ’11 (ACM, New York, NY, USA, 2011)

  21. M. Matsumoto, T. Nishimura, ACM Trans. Model. Comput. Simul. 8, 3 (1998)

    Article  MATH  Google Scholar 

  22. NVIDIA Corporation, CUDA Toolkit 4.1 CURAND Guide (2012)

  23. L. Howes, D.B. Thomas, in GPU Gems 3 (Addison-Wesley, Boston, 2007), p. 805

  24. E. Alerstam, T. Svensson, S. Andersson-Engels, J. Biomed. Opt. 13, 060504 (2008)

    Article  ADS  Google Scholar 

  25. M. Weigel, J. Comp. Phys. 231, 3064 (2012)

    Article  ADS  MATH  Google Scholar 

  26. M. Saito, M. Matsumoto, Variants of Mersenne Twister Suitable for Graphic Processors (2010), preprint [arXiv:1005.4973]

  27. V. Demchik, Comput. Phys. Commun. 182, 692 (2011)

    Article  MathSciNet  ADS  MATH  Google Scholar 

  28. N. Nandapalan, R.P. Brent, L.M. Murray, et al., Lect. Notes Comput. Sc. 7203, 609 (2012)

    Article  Google Scholar 

  29. T. Bradley, J. du Toit, R. Tong, et al., in Hwu, ed., GPU Gems: Emerald Edition (Morgan Kaufman, Amsterdam, 2011), p. 231

  30. G. Marsaglia, J. Stat. Softw. 8, 1 (2003)

    Google Scholar 

  31. D.E. Knuth, The Art of Computer Programming, Volume 2: Seminumerical Algorithms, 3rd edn. (Addison-Wesley, Upper Saddle River, NJ, 1997)

  32. P. L’Ecuyer, Math. Comput. 68, 249 (1999)

    Article  MathSciNet  ADS  MATH  Google Scholar 

  33. W.H. Press, S.A. Teukolsky, W.T. Vetterling, et al., Numerical Recipes: The Art of Scientific Computing, 3rd edn. (Cambridge University Press, Cambridge, 2007)

  34. M. Weigel, Phys. Rev. E 84, 036709 (2011)

    Article  ADS  Google Scholar 

  35. J. Kelling, G.Ódor, Phys. Rev. E 84, 061150 (2011)

    Article  ADS  Google Scholar 

  36. G. Marsaglia, A. Zaman, Ann. Appl. Probab. 1, 462 (1991)

    Article  MathSciNet  MATH  Google Scholar 

  37. M. Lüscher, Comput. Phys. Commun. 79, 100 (1994)

    Article  ADS  MATH  Google Scholar 

  38. F. Belletti, M. Cotallo, A. Cruz, et al., Comput. Phys. Commun. 178, 208 (2008)

    Article  ADS  Google Scholar 

  39. G. Marsaglia, A. Zaman, W. Wan Tsang, Stat. Probabil. Lett. 9, 35 (1990)

    Article  MATH  Google Scholar 

  40. F. Panneton, P.L’Ecuyer, ACM Trans. Model. Comput. Simul. 15, 346 (2005)

    Article  Google Scholar 

  41. R.P. Brent, ANZIAM Journal 48, C188 (2007)

    Google Scholar 

  42. W.A. Stein, Sage Mathematics Software, The Sage Development Team (2011)

  43. V.Shoup, NTL: A library for doing number theory (2008)

  44. W.Trappe, L.C.Washington, Introduction to Cryptography with Coding Theory, 1st edn. (Prentice Hall, 2002)

  45. P. Hellekalek, S. Wegenkittl, ACM Trans. Model. Comput. Simul. 13, 322 (2003)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Electronic supplementary material

Rights and permissions

Reprints and permissions

About this article

Cite this article

Manssen, M., Weigel, M. & Hartmann, A.K. Random number generators for massively parallel simulations on GPU. Eur. Phys. J. Spec. Top. 210, 53–71 (2012). https://doi.org/10.1140/epjst/e2012-01637-8

Download citation

  • Received:

  • Revised:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1140/epjst/e2012-01637-8

Keywords

Navigation