为了提高分子动力学模拟在对称多处理(SMP)集群上的计算速度,在分子动力学并行方法中引入MPI+TBB的混合并行编程模型。基于该模型,在分子动力学软件LAMMPS中设计并实现混合并行算法,在节点间采用MPI及空间分解技术实施进程级并行,节点内采用TBB及临界区技术实施线程级并行。在SMP集群中的测试表明,该方法在体系较大以及节点数较多时可以明显减少通信时间,使加速比在纯MPI模型上提高45%。结果表明,MPI+TBB混合并行编程模型可促进分子动力学并行模拟且效率明显提升。
This paper introduced an MPI+TBB hybrid parallel programming model in parallelization of molecular dynamics simulation on SMP clusters.Designed the hybrid algorithm and applied on a molecular dynamics simulation program named LAMMPS.MPI and spatial decomposition method were employed to achieve process-level parallelism,while TBB and critical section method were adopted to achieve thread-level parallelism.The performance tests indicate that the speedup of hybrid model is 45% over that of the MPI model when the simulation system and number of node are relatively large.The performance boost comes from that the hybrid model can significantly reduces the communication time.Results prove that the hybrid parallel algorithm can be feasible and efficient for molecular dynamics simulations.