计算机科学与探索 ›› 2011, Vol. 5 ›› Issue (11): 1006-1013.

• 学术研究 • 上一篇    下一篇

并行时空处理模型下的快速N-body算法

王 伟, 曾栩鸿, 王福焕, 傅丽丽, 曾国荪   

  1. 1. 同济大学 计算机科学与技术系, 上海 200092
    2. 国家高性能计算机工程技术中心 同济分中心, 上海 200092
    3. 同济大学 嵌入式系统与服务计算教育部重点实验室, 上海 200092
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2011-11-01 发布日期:2011-11-01

Parallel Time-Space Processing Model Based Fast N-body Simulation

WANG Wei, ZENG Xuhong, WANG Fuhuan, FU Lili, ZENG Guosun

  

  1. 1. Department of Computer Science and Engineering, Tongji University, Shanghai 200092, China 2. Tongji Branch, National Engineering & Technology Center of High Performance, Shanghai 200092, China 3. Key Laboratory of Embedded System and Service Computing, Ministry of Education, Tongji University, Shanghai 200092, China
  • Received:1900-01-01 Revised:1900-01-01 Online:2011-11-01 Published:2011-11-01

摘要: 图形处理器(graphic processing unit, GPU)的最新发展已经能够以低廉的成本提供高性能的通用计算。基于GPU的CUDA (compute unified device architecture)和OpenCL (open computing language)编程模型为程序员提供了充足的类似于C语言的应用程序接口(application programming interface, API), 便于程序员发挥GPU的并行计算能力。采用图形硬件进行加速计算, 通过一种新的GPU处理模型——并行时间空间模型, 对现有GPU上的N-body实现进行了分析, 从而提出了一种新的GPU上快速仿真N-body问题的算法, 并在AMD的HD Radeon 5850上进行了实现。实验结果表明, 相对于CPU上的实现, 获得了400倍左右的加速; 相对于已有GPU上的实现, 也获得了2至5倍的加速。

关键词: N-body, 并行计算, 通用图形处理器(GPGPU), 时间空间模型

Abstract: With the development of graphic processing unit (GPU), the general processing with high performance can be achieved with low cost. The GPU based compute unified device architecture (CUDA) and open computing language (OpenCL) programming model provide adequate application programming interfaces (APIs) similar to C language, which can be utilized by programmer with the power of GPU parallel processing. This paper presents a novel parallel implementation algorithm of N-body gravitational simulation on GPU. The algorithm uses graphics hardware to accelerate computation, and is optimized to N-body computation based on parallel time-space processing model (PTPM) on GPUs. The paper also analyzes the current implementations of GPU, and gives a new method on implementing N-body algorithm on HD Radeon 5850 GPU of AMD. Experimental results show that this method achieves an acceleration of 400 times compared with CPU, and an acceleration up to 2-5 times compared with GPU.

Key words: N-body, parallel computing, general purpose graphic processing unit (GPGPU), time-space model