International Journal of Parallel Programming

, Volume 39, Issue 2, pp 183–201 | Cite as

Regular Lattice and Small-World Spin Model Simulations Using CUDA and GPUs



Data-parallel accelerator devices such as Graphical Processing Units (GPUs) are providing dramatic performance improvements over even multi-core CPUs for lattice-oriented applications in computational physics. Models such as the Ising and Potts models continue to play a role in investigating phase transitions on small-world and scale-free graph structures. These models are particularly well-suited to the performance gains possible using GPUs and relatively high-level device programming languages such as NVIDIA’s Compute Unified Device Architecture (CUDA). We report on algorithms and CUDA data-parallel programming techniques for implementing Metropolis Monte Carlo updates for the Ising model using bit-packing storage, and adjacency neighbour lists for various graph structures in addition to regular hypercubic lattices. We report on parallel performance gains and also memory and performance tradeoffs using GPU/CPU and algorithmic combinations.


Ising model GPU CUDA Data-parallel Bit-packing 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Niss M.: History of the Lenz-Ising model 1920-1950: from ferromagnetic to cooperative phenomena. Arch. Hist. Exact Sci. 59, 267–318 (2005)MathSciNetMATHCrossRefGoogle Scholar
  2. 2.
    Ising E.: Beitrag zur Theorie des Ferromagnetismus. Zeitschrift fuer Physik 31, 253–258 (1925)CrossRefGoogle Scholar
  3. 3.
    Onsager L.: Crystal statistics I. Two-dimensional model with an order-disorder transition. Phys. Rev. 65, 117–149 (1944)MathSciNetMATHCrossRefGoogle Scholar
  4. 4.
    Baxter, R.J.: Exactly solved models in statistical mechanics. Number ISBN 0-12-083180-5. Academic Press, London (1982)Google Scholar
  5. 5.
    Anderson P.W.: New approach to the theory of superexchange interactions. Phys. Rev. 115, 2–13 (1959)MathSciNetMATHCrossRefGoogle Scholar
  6. 6.
    Bhanot G., Duke D., Salvador R.: A fast algorithm for the Cyber 205 to simulate the 3d Ising Model. J. Stat. Phys. 44, 985–1002 (1988)CrossRefGoogle Scholar
  7. 7.
    Blöte H.W.J., Compagner A., Croockewit J.H., Fonk Y.T.J.C., Heringa J.R., Hoogland A., Smit T.S., van Willigen A.L.: Monte Carlo renormalization of the three-dimensional Ising Model. Physica A 161, 1–22 (1989)CrossRefGoogle Scholar
  8. 8.
    Pawley G.S., Swendsen R.H., Wallace D.J., Wilson K.G.: Monte-Carlo renormalization group calculations of critical behaviour in the simple cubic Ising model. Phys. Rev. B 29, 4030–4040 (1984)CrossRefGoogle Scholar
  9. 9.
    Baillie C., Gupta R., Hawick K., Pawley G.: Monte-Carlo renormalisation group study of the three-dimensional Ising Model. Phys. Rev. B 45, 10438–10453 (1992)CrossRefGoogle Scholar
  10. 10.
    Preis T., Virnau P., Paul W., Schneider J.J.: GPU accelerated Monte Carlo simulation of the 2D and 3D Ising model. J. Comput. Phys. 228, 4468–4477 (2009)MATHCrossRefGoogle Scholar
  11. 11.
    Boyer, D., Miramontes, O.: Interface motion and pinning in small-world networks. Phys. Rev. E 67 (2003)Google Scholar
  12. 12.
    Pȩkalski, A.: Ising model on a small world network. Phys. Rev. E 64 (2001)Google Scholar
  13. 13.
    Jeong, D., Hong, H., Kim, B.J., Choi, M.Y.: Phase transition in the Ising model on a small-world network with distance-dependent interactions. Phy. Rev. E 68 (2003)Google Scholar
  14. 14.
    Kim, B.J., Hong, H., Holme, P., Jeon, G.S., Minnhagen, P., Choi, M.Y.: XY model in small-world networks. Phy. Rev. E 64 (2001)Google Scholar
  15. 15.
    Hong H., Kim B.J., Choi M.Y.: Comment on “Ising model on a small world network”. Phy. Rev. E 66, 018101 (2002)CrossRefGoogle Scholar
  16. 16.
    Yi, H., Choi, M.S.: Effect of quantum fluctuations in an Ising system on small-world networks. Phy. Rev. E 67 (2003)Google Scholar
  17. 17.
    Herrero, C.P.: Ising model in small-world networks. Phys. Rev. E 65 (2002)Google Scholar
  18. 18.
    Hawick, K.A., James, H.A.: Ising model scaling behaviour on z-preserving small-world networks. Technical report Condensed Matter: cond-mat/0611763, Information and Mathematical Sciences, Massey University (2006)Google Scholar
  19. 19.
    Hawick, K.A.: Domain growth in alloys. PhD thesis, Edinburgh University (1991)Google Scholar
  20. 20.
    Binder K.: The Monte-Carlo method for the study of phase transitions: a review of some recent progress. J. Comp. Phys. 59, 1–55 (1985)MathSciNetMATHCrossRefGoogle Scholar
  21. 21.
    NVIDIA® Corporation: NVIDIA CUDATM Programming Guide Version 2.3. (2009) Last accessed August 2009Google Scholar
  22. 22.
    Leist A., Playne D., Hawick K.: Exploiting graphical processing units for data-parallel scientific applications. Concurr. Comput. 21, 2400–2437 (2009) CSTN-065CrossRefGoogle Scholar
  23. 23.
    Flanders, P., Reddaway, S.: Parallel data transforms. DAP Series, active memory technology (1988)Google Scholar
  24. 24.
    Hawick, K.A., Playne, D.P.: Hypercubic storage layout and transforms in arbitrary dimensions using GPUs and CUDA. Technical Report CSTN-096, Computer Science, Massey University (2009) Submitted to Concurrency and Computation: Practice and ExperienceGoogle Scholar
  25. 25.
    Hawick K.A., Playne D.P.: Turning partial differential equations into scalable software. Massey University, Technical report, Computer Science (2009)Google Scholar
  26. 26.
    Marsaglia, G., Zaman, A.: Toward a universal random number generator. FSU-SCRI-87-50, Florida State University (1987)Google Scholar
  27. 27.
    Hawick, K.A., Leist, A., Playne, D.P.: Mixing Multi-Core CPUs and GPUs for scientific simulation software. Technical Report CSTN-091, Computer Science, Massey University (2009)Google Scholar
  28. 28.
    Wolff U.: Collective Monte Carlo updating for spin systems. Phys. Lett. 228, 379 (1989)Google Scholar

Copyright information

© Springer Science+Business Media, LLC 2010

Authors and Affiliations

  1. 1.Institute of Information and Mathematical SciencesMassey UniversityAucklandNew Zealand

Personalised recommendations