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
期刊:
Comput. Phys. Commun.
影响因子:
--
通讯作者:
Y. Komura and Y. Okabe
Y. Komura and Y. Okabe
中科院分区:
--
文献类型:
--
作者:
Hirasawa T;Kuratani S;Hirasawa T;平沢達矢;Y. Komura and Y. Okabe

文献摘要

相似文献

我们提出了用于GPU计算Swendsen-Wang多簇自旋翻转算法的新版本CUDA程序样本。在这次更新中,我们在这些程序中添加了基于gpu的聚类标记算法的方法,而不使用传统迭代(Komura, 2015)。对于高精度计算,我们还在cuRAND库中添加了一个随机数生成器。此外,我们修复了几个错误,并删除了内核函数中共享内存的额外使用。新版本程序摘要程序名称:SWspin_v2_0目录标识符:AERM_v2_0程序摘要URL: http://cpc。cs。qub。英国/摘要/ AERM_v2_0 ac.。程序可从:北爱尔兰贝尔法斯特女王大学CPC程序库获得许可条款:标准CPC许可,http://cpc。cs。qub。英国ac. /许可证/许可证。html没有。分布式程序的行数,包括测试数据等:6337分布程序中包含测试数据等的字节数:26316分布格式:tar。编程语言:C, CUDA。计算机:具有支持NVIDIA CUDA的GPU的系统。操作系统:没有限制(在Linux上测试)。RAM:大约2MiB用于示例程序中使用的参数。分类:23。前版本目录标识符:AERM_v1_0前版本期刊参考号:Comput。理论物理。Comm. 185(2014) 1038新版本是否取代旧版本?问题的性质:经典自旋系统的蒙特卡罗模拟。对二维和三维晶格的Ising、q态Potts模型和经典的XY模型进行了处理。求解方法:基于gpu的Swendsen-Wang多簇自旋翻转蒙特卡罗方法。集群标记的CUDA实现基于Hawick等人的工作[KA Hawick, A. Leist, and D. P Playne, Parallel Computing 36(2010)]。[655-678], Kalentev等人[j]。A. Rai, S. Kemnitzb, R. Schneider, J.并行分布。计算机学报,71 (2011)615-620 [j]。高,第一版。理论物理。科学通报,2014(5):558 - 558。新版本的原因:1;在不使用常规迭代的情况下,增加了基于gpu的聚类标记算法。2. 在cuRAND库[2]中添加一个随机数生成器,用于高精度计算。3. 修复了几个错误,并删除了内核函数中共享内存的额外使用。修订总结:最近,我们提出了一种基于gpu的聚类标记算法,而不使用传统的迭代算法。该聚类标记算法不需要与最近邻站点进行迭代比较。在不考虑周期边界条件的情况下,该方法与最近邻点的比较次数对二维系统为1次,对三维系统为2次。为了实现这种簇标记算法,需要在不受任何其他线程干扰的情况下执行原子函数。现在,我们来解释一下程序的附加部分。在这次更新中,我们将不使用传统迭代的基于gpu的聚类标记算法作为直接型算法[1]添加到现有程序中。该聚类标记算法包括四个步骤:(i)初始化(ii)分析(iii)标记约简(iv)分析,我们将这些步骤添加到本聚类标记算法的程序中,我们可以选择Hawick et al.[3]算法(算法= 0),Kalentev et al.[4]算法(算法= 1)或Komura[1]算法(算法= 2)。内核函数device_function_init_Y K;为主动键生成步骤的函数,对应于Komura算法的初始化步骤。
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 …