计算机应用 ›› 2012, Vol. 32 ›› Issue (01): 163-166.DOI: 10.3724/SP.J.1087.2012.00163

• 先进计算 • 上一篇    下一篇

基于OpenMP的分子动力学并行算法的性能分析与优化

白明泽1,2,程丽2,豆育升2,3,孙世新1   

  1. 1. 电子科技大学 计算机科学与工程学院,成都 610054
    2. 重庆邮电大学 高性能计算与应用研究所,重庆 400065
    3. Department of Physical Sciences, Nicholls State University, Thibodaux, Louisiana 70310, USA
  • 收稿日期:2011-07-13 修回日期:2011-09-11 发布日期:2012-02-06 出版日期:2012-01-01
  • 通讯作者: 豆育升
  • 作者简介:白明泽(1982-),男,重庆酉阳人,讲师,博士研究生,主要研究方向:并行算法设计、分子动力学模拟;程丽(1983-),女,山西大同人,硕士研究生,主要研究方向:并行算法设计;豆育升(1953-),男,陕西礼泉人,教授,主要研究方向:计算化学、高性能计算;孙世新(1940-),男,湖北孝感人,教授,博士生导师,主要研究方向:并行与分布式计算。
  • 基金资助:

    国家自然科学基金资助项目(61070090)

Performance analysis and improvement of parallel molecular dynamics algorithm based on OpenMP

BAI Ming-ze1,2,CHENG Li1,DOU Yu-sheng1,3,SUN Shi-xin2   

  1. 1. Institute of High Performance Computing and Application, Chongqing University of Posts and Telecommunications, Chongqing 400065, China
    2. School of Computer Science and Engineering, University of Electronic Science and Technology of China, Chengdu Sichuan 610054, China
    3. Department of Physical Sciences, Nicholls State University, Thibodaux, Louisiana 70310, USA
  • Received:2011-07-13 Revised:2011-09-11 Online:2012-02-06 Published:2012-01-01
  • Contact: DOU Yu-sheng

摘要: 为提高分子动力学模拟在共享内存式服务器上的计算速度,对基于OpenMP的分子动力学并行算法(Critical方法)进行了性能分析与优化。通过在多核服务器上的测试,以及加速比和并行效率的计算分析了Critical方法的并行性能,进而提出优化的三角形方法。所提方法中每个线程所计算的粒子数固定,且粒子数目呈阶梯状上升,使得各线程能够错时到达临界区。从而使程序在临界区的闲置时间比Critical方法减半,加速比明显提高。

关键词: 分子动力学, 并行计算, 多核中央处理器, OpenMP, 临界区

Abstract: To enhance the computing speed of the molecular dynamics simulations on the shared memory servers, the performance of parallel molecular dynamics program based on Open Multi-Processing (OpenMP) approach with the critical section method was analyzed and improved. After testing performance on a multi-core server, as well as the calculations of speedup and parallel efficiency, an optimized triangle method was developed. In this method, stationary atom sets were assigned to threads respectively, and the number of atoms increased stepwise, which made the threads arrive at critical sections at different time. The triangle method can efficiently halve the idle time in critical sections and therefore can significantly enhance the parallel performance.

Key words: molecular dynamics, parallel computing, multi-core Central Processing Unit (CPU), Open Multi-Processing (OpenMP), critical section

中图分类号: