Vol 18, No 6 (2018) / Wang

PHoToNs–A parallel heterogeneous and threads oriented code for cosmological N-body simulation

Qiao Wang, Zong-Yan Cao, Liang Gao, Xue-Bin Chi, Chen Meng, Jie Wang, Long Wang


We introduce a new code for cosmological simulations, PHoToNs, which incorporates features for performing massive cosmological simulations on heterogeneous high performance computer (HPC) systems and threads oriented programming. PHoToNs adopts a hybrid scheme to compute gravitational force, with the conventional Particle-Mesh (PM) algorithm to compute the long-range force, the Tree algorithm to compute the short range force and the direct summation Particle-Particle (PP) algorithm to compute gravity from very close particles. A self-similar space filling a Peano-Hilbert curve is used to decompose the computing domain. Threads programming is advantageously used to more flexibly manage the domain communication, PM calculation and synchronization, as well as Dual Tree Traversal on the CPU+MIC platform. PHoToNs scales well and efficiency of the PP kernel achieves 68.6% of peak performance on MIC and 74.4% on CPU platforms. We also test the accuracy of the code against the much used Gadget-2 in the community and found excellent agreement.


methods: numerical — galaxies: interactions — dark matter

Full Text:


DOI: https://doi.org/10.1088/1674–4527/18/6/62


  • There are currently no refbacks.