Improved CUDA programs for GPU computing of Swendsen-Wang multi-cluster spin flip algorithm: 2D and 3D Ising, Potts, and XY models
Improved CUDA programs for GPU computing of Swendsen-Wang multi-cluster spin flip algorithm: 2D and 3D Ising, Potts, and XY models
复制标题
用于 Swendsen-Wang 多簇自旋翻转算法 GPU 计算的改进 CUDA 程序:2D 和 3D Ising、Potts 和 XY 模型
DOI:
10.1016/j.cpc.2015.10.003
复制
发表时间:
2016
期刊:
影响因子:
--
通讯作者:
Y. Komura and Y. Okabe
中科院分区:
文献类型:
--
作者:
Hirasawa T;Kuratani S;Hirasawa T;平沢達矢;Y. Komura and Y. Okabe
We present new versions of sample CUDA programs for the GPU computing of the Swendsen–Wang multi-cluster spin flip algorithm. In this update, we add the method of GPU-based cluster-labeling algorithm without the use of conventional iteration (Komura, 2015) to those programs. For high-precision calculations, we also add a random-number generator in the cuRAND library. Moreover, we fix several bugs and remove the extra usage of shared memory in the kernel functions. New version program summary Program title: SWspin_v2_0 Catalogue identifier: AERM_v2_0 Program summary URL: http://cpc. cs. qub. ac. uk/summaries/AERM_v2_0. html Program obtainable from: CPC Program Library, Queen’s University, Belfast, N. Ireland Licensing provisions: Standard CPC licence, http://cpc. cs. qub. ac. uk/licence/licence. html No. of lines in distributed program, including test data, etc.: 6337 No. of bytes in distributed program, including test data, etc.: 26316 Distribution format: tar. gz Programming language: C, CUDA. Computer: System with an NVIDIA CUDA enabled GPU. Operating system: No limits (tested on Linux). RAM: About 2MiB for the parameters used in the sample programs. Classification: 23. Catalogue identifier of previous version: AERM_v1_0 Journal reference of previous version: Comput. Phys. Comm. 185 (2014) 1038 Does the new version supersede the previous version?: No Nature of problem: Monte Carlo simulation of classical spin systems. Ising, q-state Potts model, and the classical XY model are treated for both two-dimensional and three-dimensional lattices. Solution method: GPU-based Swendsen–Wang multi-cluster spin flip Monte Carlo method. The CUDA implementation for the cluster-labeling is based on the work by Hawick et al.[KA Hawick, A. Leist, and D. P Playne, Parallel Computing 36 (2010). 655–678], that by Kalentev et al.[O. Kalentev, A. Rai, S. Kemnitzb, and R. Schneider, J. Parallel Distrib. Comput. 71 (2011) 615–620], and that by Komura [Y. Komura, Comput. Phys. Comm. 194 (2015) 54–58]. Reasons for new version: 1. Adding the method of GPU-based cluster-labeling algorithm without the use of conventional iteration [1]. 2. Adding a random-number generator in the cuRAND library [2] for high-precision calculations. 3. Fixing several bugs and removing the extra usage of shared memory in the kernel functions. Summary of revisions: 1. Recently, we proposed the GPU-based cluster-labeling algorithm without the use of conventional iteration [1]. This cluster-labeling algorithm does not require an iterative method of comparison with the nearest-neighbor sites. The number of comparisons with the nearest-neighbor site in this method is one for a two dimensional system and two for a three-dimensional system if periodic boundary conditions are not employed. To realize this cluster-labeling algorithm, the atomic function, which is performed without interference from any other threads, is needed. Now, we explain about the added part of programs. In this update, we add the GPU-based cluster-labeling algorithm without the use of conventional iteration as a direct-type algorithm [1] to the present programs. This cluster-labeling algorithm consists of four steps:(i) initialization (ii) analysis (iii) label reduction (iv) analysis, and we add those steps to the present programs for the cluster-labeling algorithm, we can choose the algorithm of Hawick et al.[3](algorithm= 0), the algorithm by Kalentev et al.[4](algorithm= 1), or the algorithm by Komura [1](algorithm= 2). The kernel function device_function_init_Y K; is a function for the step of active bond generation, which corresponds to the step of initialization for the algorithm of Komura …