摘要
大涡模拟的思想是直接数值模拟大尺度紊流运动,利用亚格子模型模拟小尺度紊流运动对大尺度紊流运动的影响。大涡模拟在计算时间和计算费用方面优于直接数值模拟,在信息完整性方面优于雷诺平均模型。首先实现了3D大涡模拟程序(Leslie3d)在异构平台(CPU+MIC)的正确运行,然后分别对CPU端和MIC端的代码进行了优化,包括利用了多线程、SIMD向量化以及循环展开等编译优化手段,最后通过负载均衡实现了CPU+MIC的协同优化。相对原始发行版代码,优化后的代码在异构平台上获得了24x的加速效果。程序的优化思路对大涡模拟程序在国产异构平台上的优化具有指导意义。
Large eddy simulation means numerical simulation of large scale turbulent motion and simulating the influence of small scale turbulent motion on large scale turbulent motion using sub-grid model. Large eddy simulation is better than direct numerical simulation in terms of computation time and cost and is better than Reynolds averaged model in terms of information integrity. First we realized the correct execution of large eddy simulation program( Leslie3d) on heterogeneous platform( CPU + MIC). Then we carried out the optimization on CPU and MIC,including multi-thread,SIMD vectorization,loop unrolling and some other compiler optimization techniques. Finally we realized the co-optimization of CPU + MIC by load balancing. The optimized code gets an acceleration of24 times on heterogeneous platform compared with the original one. The optimization idea of the program has guiding significance for optimization on domestic heterogeneous platform.
引文
[1]Roland Bouffanais.Advances and challenges of applied large-eddy simulation[J].Computers&Fluids,2010,39(5):735-738.
[2]Fauconnier D,De Langhe C,Dick E.A dynamically optimized finite difference scheme for Large-Eddy Simulation[J].Journal of Computational and Applied Mathematics,2010,234(7):2080-2088.
[3]Feng Wan,Fernando Porte-Agell,Rob Stoll.Evaluation of dynamic subgrid-scale models in large-eddy simulations of neutral turbulent flow over a two-dimensional sinusoidal hill[J].Atmospheric Environment,2007,41(31):2719-2728.
[4]Bakker A,Oshinowo L M.Modeling of turbulence in stirred vessels using large eddy simulation[J].Chemical Engineering Research and Design,2004,82(9):1169-1178.
[5]ViréA,Knaepen B.On discretization errors and subgrid scale model implementations in large eddy simulation[J].Journal of Computational Physics,2009,228(22):8203-8213.
[6]Yang C Q,Qiang W,Cheng C,et al.Accelerating Pqmrcgstab Algorithm on Xeon Phi[C]//Advanced Materials Research 709.2013:555-562.
[7]Pennycook S J,Hughes C J.Exploring SIMD for Molecular Dynamics,Using Intel Xeon processors and Intel Xeon Phi Coprocessors[C]//IEEE International Symposium on Parallel&Distributed Processing.2013:1085-1097.
[8]Andrey Valdimirov and Cliff Addision.Cluster-level Tuning of a Shallow Water Equation Solver on the INTEL XEON PHI Architecture[J].Colfax International,2014,12(5):145-150.
[9]Intel Manycore Platform Software Stack.[EB/OL].[2015-11-15].http://software.intel.com/en-us/articles/intelmanycore-platform-software-stack-mpss.
[10]Reinders J.An Overview of Programming for IntelXeonprocessors and Intel Xeon Phi coprocessors[J].Advances in Meteorology,2012,35(10):261-269.
[11]Zhen X,Kuan L,Can Qun Y,et al.Performance evaluation of communication and programs in MIC-CPU symmetric mode[J].High Performance Computing for Weather Water&Chinate,2013,29(19):354-359.
[12]Brandfass B,Alrutz T,Gerhold T.Rank reordering for MPI communication optinization[J].Computers&Fluids,2013,80(7):372-380.
[13]Andrey Vladimirow and Vadim Karpusenko.Heterogeneous Clustering with Homogeneous Code:Accelerate MPI Applications without Code Surgery Using INTEL XEON PHI Coprocessors[J].Colfax International,2013,69(12):172-180.