## GPU-based Swendsen-Wang multi-cluster algorithm for the simulation of two-dimensional classical spin systems

Department of Physics, Tokyo Metropolitan University, Hachioji, Tokyo 192-0397, Japan

arXiv:1202.0635v1 [physics.comp-ph] (3 Feb 2012)

@article{2012arXiv1202.0635K,

author={Komura}, Y. and {Okabe}, Y.},

title={"{GPU-based Swendsen-Wang multi-cluster algorithm for the simulation of two-dimensional classical spin systems}"},

journal={ArXiv e-prints},

archivePrefix={"arXiv"},

eprint={1202.0635},

primaryClass={"physics.comp-ph"},

keywords={Physics – Computational Physics, Condensed Matter – Statistical Mechanics},

year={2012},

month={feb},

adsurl={http://adsabs.harvard.edu/abs/2012arXiv1202.0635K},

adsnote={Provided by the SAO/NASA Astrophysics Data System}

}

We present the GPU calculation with the common unified device architecture (CUDA) for the Swendsen-Wang multi-cluster algorithm of two-dimensional classical spin systems. We adjust the two connected component labeling algorithms recently proposed with CUDA for the assignment of the cluster in the Swendsen-Wang algorithm. Starting with the q-state Potts model, we extend our implementation to the system of vector spins, the q-state clock model, with the idea of embedded cluster. We test the performance, and the calculation time on GTX580 is obtained as 2.51 nano sec per a spin flip for the q=2 Potts model (Ising model) and 2.42 nano sec per a spin flip for the q=6 clock model with the linear size L=4096 at the critical temperature, respectively. The computational speed for the q=2 Potts model on GTX580 is 12.4 times as fast as the calculation speed on a current CPU core. That for the q=6 clock model on GTX580 is 35.6 times as fast as the calculation speed on a current CPU core.

February 6, 2012 by hgpu