English

Direct N-Body problem optimisation using the AVX-512 instruction set

Computational Physics 2021-06-22 v1 Atomic Physics

Abstract

The integration of the equations of motion of N interacting particles, represents a classical problem in many branches of physics and chemistry. The direct N-body problem is at the heart of simulations studying Coulomb Crystals. We present an hand-optimized code for the latest AVX-512 set of instructions that achieve a single core speed up of 340%\approx 340\% respect the version optimized by the compiler. The increase performance is due a optimization on the organization of the memory access on the inner loop on the Coulomb and, specially, on the usage of an intrinsic function to faster compute the 1/x1/\sqrt{x}. Our parallelization, which is implemented in OpenMP, achieves an excellent scalability with the number of cores. In total, we achieve 500GFLOPS\approx 500GFLOPS using a just a standard WorkStation with one Intel Skylake CPU (10 cores). It represents 75%\approx 75\% of the theoretical maximum number of double precision FLOPS corresponding to Fused Multiplication Addition (FMA) operations.

Keywords

Cite

@article{arxiv.2106.11143,
  title  = {Direct N-Body problem optimisation using the AVX-512 instruction set},
  author = {Jofre Pedregosa-Gutierrez and Jim Dempsey},
  journal= {arXiv preprint arXiv:2106.11143},
  year   = {2021}
}
R2 v1 2026-06-24T03:25:44.472Z