作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2010, Vol. 36 ›› Issue (5): 7-9. doi: 10.3969/j.issn.1000-3428.2010.05.003

• 博士论文 • 上一篇    下一篇

基于Cache友好方法的数值计算代码优化

高瑞泽,于 剑,阎 超   

  1. (北京航空航天大学航空科学与工程学院,北京 100191)
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2010-03-05 发布日期:2010-03-05

Optimizations of Numerical Computational Code Based on Cache-friendly Method

GAO Rui-ze, YU Jian, YAN Chao   

  1. (School of Aeronautic Science and Engineering, Beijing University of Aeronautics and Astronautics, Beijing 100191)
  • Received:1900-01-01 Revised:1900-01-01 Online:2010-03-05 Published:2010-03-05

摘要: 总结利用存储层级结构加速计算流体力学程序的研究现状,通过对现代CPU高速缓存(Cache)的结构分析,研究Cache友好方法对程序运算速度的影响。使用2种基于Cache友好的优化方法对FORTRAN编写的三维多区计算机流铨力学(CFD)计算代码进行优化,给出对三维LU-SGS的详细优化算法。在3种计算平台上的数值实验结果表明,优化后程序运行时间能减少到优化前的20%~50%。

关键词: 高速缓存, 计算流体力学, 代码优化

Abstract: This paper summarizes the overseas research situation of accelerating Computational Fluid Dynamics(CFD) codes using memory hierarchy techniques. The influence of Cache-friendly method on code efficiency is studied by means of analysis of modern CPU Cache structure. Three dimensional multi-block CFD FORTRAN code is optimized by two methods based on Cache-friendly method. A 3D optimized LU-SGS algorithm is presented. The numerical experiments executed in three kinds of microprocessors indicate that the running time of optimized code is from 20 percent to 50 percent of the original code.

Key words: Cache, Computational Fluid Dynamics(CFD), code optimization

中图分类号: