模拟碰撞N体系统的并行Monte Carlo程序
A Parallel Monte Carlo Code for Simulating Collisional N-body Systems
摘要:
我们提出了一个新的并行程序,用于计算最多含N~10^7个粒子的碰撞N体系统的动力学演化。我们的代码是基于Henon Monte Carlo方法求解福克-普朗克方程,并假设球对称和动力学平衡。主要的算法发展涉及优化数据结构,并引入一个并行随机数生成方案,以及一个并行排序算法,需要找到最近的邻居的相互作用和计算引力势。我们引入的新算法以及我们对分解方案的选择最大限度地减少了通信成本,并确保了数据和工作负载在处理单元之间的最佳分配。该实现使用消息传递接口(MPI)库进行通信,这使得它可以移植到许多不同的超级计算架构。我们通过计算具有初始Plummer分布函数的星系团的演化来验证代码,直到核心坍缩,恒星数量N跨越三个数量级,从10^5到10^7。我们发现我们的结果与自相似的核心崩溃的解决方案是很好的协议,和核心崩溃的时间一般同意从文献的预期。此外,我们观察到良好的总能量守恒,在整个模拟小于0.04%。我们分析了代码的性能,并展示了运行时的近线性扩展,处理器数量高达64个处理器(N=10^5),128个处理器(N=10^6)和256个处理器(N=10^7)。运行时达到饱和,增加更多的处理器超过这些限制,这是一个特点的并行排序算法。我们实现的最大加速比分别约为60倍、100倍和220倍。
英文摘要:
We present a new parallel code for computing the dynamical evolution of collisional N-body systems with up to N~10^7 particles. Our code is based on the the Henon Monte Carlo method for solving the Fokker-Planck equation, and makes assumptions of spherical symmetry and dynamical equilibrium. The principal algorithmic developments involve optimizing data structures, and the introduction of a parallel random number generation scheme, as well as a parallel sorting algorithm, required to find nearest neighbors for interactions and to compute the gravitational potential. The new algorithms we introduce along with our choice of decomposition scheme minimize communication costs and ensure optimal distribution of data and workload among the processing units. The implementation uses the Message Passing Interface (MPI) library for communication, which makes it portable to many different supercomputing architectures. We validate the code by calculating the evolution of clusters with initial Plummer distribution functions up to core collapse with the number of stars, N, spanning three orders of magnitude, from 10^5 to 10^7. We find that our results are in good agreement with self-similar core-collapse solutions, and the core collapse times generally agree with expectations from the literature. Also, we observe good total energy conservation, within less than 0.04% throughout all simulations. We analyze the performance of the code, and demonstrate near-linear scaling of the runtime with the number of processors up to 64 processors for N=10^5, 128 for N=10^6 and 256 for N=10^7. The runtime reaches a saturation with the addition of more processors beyond these limits which is a characteristic of the parallel sorting algorithm. The resulting maximum speedups we achieve are approximately 60x, 100x, and 220x, respectively.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。