海洋环流模式NEMO的代码现代化

Code Modernization Optimization of Ocean General Circulation Model NEMO

  • 摘要: 海洋数值模式是精准海洋环境预报的核心手段。随着计算分辨率的不断提高,海洋数值模式对计算性能的要求也越来越高。为了提高模式计算性能,充分发挥现代计算机的特点,选取海洋环流模式NEMO开展了代码现代化优化方案在海洋环流模式中的应用研究。首先使用Intel性能分析工具对模式的计算性能进行了分析;随后,针对热点函数,开展了编译选项优化、标量串行代码优化、SIMD优化、内存带宽优化以及多进程扩展。结果显示: 经过以上优化步骤,在不增加任何硬件成本的前提下,模式整体性能可提升31%,且在多进程下表现出了较好的负载均衡性。这表明,本研究采用的优化策略是一种切实可行的方法。在此基础上,进一步对代码现代化过程中出现的显著影响计算效率的问题,如大量指针的使用阻止矢量化、循环嵌套过多、内存带宽占用过高等,开展了分析和讨论,为未来模式的设计和改进提供了参考和建议。

     

    Abstract: The ocean general circulation model (OGCM) is the key tool for ocean environment simulation and forecast. With the ocean resolution finer, the demand for improving computational performance is more and more urgent. To improve the calculation performance of OGCM by taking full advantage of modern computers, a code modernization optimization scheme is carried out in this paper using an OGCN named NEMO as an example. The Intel performance analysis tool is used to evaluate the computing performance of the model at first. Then, several optimization steps, which are compiler options, serial and scalar optimization, SIMD, memory bandwidth optimization and extending to multicores, are applied to hotspot functions. After optimization, the modelʼs overall performance can be improved by 31% without increasing any hardware cost and load balance have a good performance in multiprocess. The results indicate that the optimization strategy used in this study is very effective and useful. Furthermore, the problems that significantly affect the computational efficiency in the model, such as the heavy use of pointers that can prevent vectorization, multiple loop nesting, high memory bandwidth usage, are discussed in this paper, to provide reference and suggestion for the OGCM in the future design and improvement.

     

/

返回文章
返回