• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2015, Vol. 37 ›› Issue (09): 1614-1620.

• 论文 • 上一篇    下一篇

基于OpenCL的Lammps短程力算法优化研究

赵成龙1 ,施慧彬1 ,俞忻峰2   

  1. (1.南京航空航天大学计算机科学与技术学院,江苏 南京 210016;
    2.南京理工大学计算机科学与技术学院,江苏 南京 210094)
  • 收稿日期:2014-08-25 修回日期:2014-10-31 出版日期:2015-09-25 发布日期:2015-09-25

Short-range force algorithm optimization
in Lammps based on OpenCL  

ZHAO Chenglong1,SHI Huibin1,YU Xinfeng2   

  1. (1.College of Computer Science and Technology,Nanjing University of Aeronautics and Astronautics,Nanjing 210016;
    2.College of Computer Science and Technology,Nanjing University of Science and Technology,Nanjing  210094,China)
  • Received:2014-08-25 Revised:2014-10-31 Online:2015-09-25 Published:2015-09-25

摘要:

Lammps是用于分子动力学模拟及其相关问题的一款开源软件,可利用其了解固体、液体性质,应用广泛。支持使用CUDA及OpenCL进行GPU加速。因OpenCL具有跨平台特性,将其作为研究重点。总结了OpenCL内核编程中需要注意的设计原则并阐述了一种改进的阿姆达尔定律用于衡量异构平台理论加速性能。测试了Lammps短程力计算在Y485P平台下的性能参数。通过对短程力计算中的关键部分如邻接表的建立及短程力计算部分的内核代码进行优化,使其取得了更好的加速效果。

关键词: GPU;Lammps;OpenCL;分子动力学;短程力;内核优化

Abstract:

Lammps is a widely used open source software for molecular dynamics simulations and related issues, through which we can understand solid and liquid nature. It enables the CUDA and the OpenCL to accelerate calculation. Since the OpenCL has crossplatform features, it becomes a research focus. We summarize the OpenCL kernel programming principles and propose an improved Amdahl's law which can measure the acceleration performance on heterogeneous platforms. The shortrange force algorithm in Lammps on Y485P platform is tested. We achieve better acceleration effect by optimizing the kernel source codes of the key parts, such as neighborlist building and shortrange force calculation.

Key words: GPU;Lammps;OpenCL;molecular dynamics;short-range force;kernel optimization