基于晶格Boltzmann方法的CUDA加速优化  

CUDA accelerated optimization based on lattice Boltzmann method

在线阅读下载全文

作  者:张乾毅 韦华健 赫轶男 李华兵[1] ZHANG Qianyi;WEI Huajian;HE Yinan;LI Huabing(School of Materials Science and Engineering,Guilin University of Electronic Technology,Guilin 541004,China)

机构地区:[1]桂林电子科技大学材料科学与工程学院,广西桂林541004

出  处:《桂林电子科技大学学报》2022年第3期240-244,共5页Journal of Guilin University of Electronic Technology

基  金:国家自然科学基金(11362005)。

摘  要:为提高流体的计算效率并保证结果的准确性,利用CUDA编程平台和GPU强大的浮点计算能力,实现了基于晶格玻尔兹曼方法的泊松流模拟计算加速。设计了线性寻址和下标寻址2种不同寻址方式,将这2种寻址方式分别应用到晶格玻尔兹曼程序的格点碰撞、迁徙流动、宏观量计算等步骤中,并探讨2种寻址方式对程序计算效率带来的影响。同时在程序中使用统一内存管理,通过这样的方式开辟内存的变量可在主机端和设备端同时使用,简化了代码复杂度,同时降低了频繁为变量开辟内存带来的消耗。使用Intel■ Xeon■ E-52620 v4 CPU,Nvidia Quadro GP100 GPU进行计算,在线性寻址方法和下标寻址方法中分别获得了71倍和25倍CPU串行代码的加速比。In order to improve the efficiency of fluid calculations and ensure the accuracy of the results,the CUDA programming platform and the powerful floating-point computing capabilities of the GPU are used to accelerate the Poisseuille flow simulation calculation based on the lattice Boltzmann method.Two different addressing methods,linear addressing and subscript addressing are designed,these two addressing methods are respectively applied to the lattice point collision,migration flow,and macroscopic calculation of the lattice Boltzmann program,then discuss the influence of two addressing methods on the calculation efficiency of the program.At the same time,unified memory management is used in the program,and the variables opened up in this way can be used on the host side and the device side at the same time,which simplifies the code complexity and reduces the consumption of frequently opening up memory for variables.Using Intel(R)Xeon(R)E-52620 v4 CPU and Nvidia Quadro GP100GPU for calculations,the linear addressing method and the subscript addressing method have obtained 71 times and 25 times the speedup ratio of CPU serial code respectively.

关 键 词:CUDA 晶格玻尔兹曼方法 平面泊松流 线性寻址 下标寻址 

分 类 号:O414.2[理学—理论物理]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象