Scaling Molecular Dynamics with ab initio Accuracy to 149 Nanoseconds per Day

Jianxiong Li, Boyang Li, Zhuoqiang Guo, Mingzhen Li, Enji Li, Lijun Liu, Guojun Yuan, Zhan Wang, Guangming Tan, Weile Jia

Abstract

Researchers have achieved a breakthrough in molecular dynamics (MD) simulation performance by optimizing the DeePMD-kit software on the Fugaku supercomputer. By implementing a three-pronged strategy involving node-based parallelization, custom computational kernels, and intra-node load balancing, the team reached a record-breaking 149 nanoseconds per day (ns/day) for systems with ab initio (first-principles) accuracy. This represents a 31.7x speedup over previous state-of-the-art implementations, enabling millisecond-scale chemical process simulations to be completed in just one week.

Introduction

Molecular dynamics (MD) simulations are essential for understanding chemical and biological processes at the atomic level. However, researchers face a persistent trade-off between accuracy and computational speed. Traditional ab initio MD (AIMD) offers high accuracy but scales cubically with the number of atoms, limiting its use to small systems and short timescales. Neural-network-based MD (NNMD) provides a middle ground by using machine learning to mimic quantum forces at a lower cost.

Despite the promise of NNMD, simulating long-duration events like protein folding or complex combustion—which occur over milliseconds—remains a challenge due to "strong scaling" bottlenecks. As more processors are added to a single simulation, communication overhead often dominates the actual calculation time. Prior to this work, the state-of-the-art performance for quantum-accurate MD was approximately 4.7 ns/day.

Methodology

Model Architecture

The study utilizes the Deep Potential (DP) model within the DeePMD-kit framework. The workflow involves generating a neighbor list for each atom, passing local environment data through an embedding network, and finally using a deep neural network (DNN) to fit the potential energy and forces.

Schematic of the DeePMD-kit workflow, illustrating the neighbor list generation, embedding network with model compression, and the 3-layer DNN fitting network used to calculate atomic energy (Ei).

Optimization Strategy

The authors implemented three primary optimizations on the ARM-based Fugaku supercomputer:

  1. Node-Based Parallelization: To avoid the "traffic jam" of small messages typical in standard MPI communication, the team introduced a leader-worker model. One leader core per node aggregates data and transmits a single large packet via Fugaku’s TofuD interconnect using Remote Direct Memory Access (RDMA), reducing communication overhead by 81%.
  2. Computational Squeezing: The researchers bypassed heavy deep learning frameworks like TensorFlow, writing custom neural network kernels from scratch. They utilized SVE-GEMM (Scalable Vector Extension - General Matrix Multiply) and mixed-precision (FP16) for specific matrix operations to maximize ARM hardware efficiency without losing physical accuracy.
  3. Intra-node Load Balancing: A spatial decomposition strategy was employed to balance the workload across cores within a single node, resulting in an 18.5% performance boost.
Hardware-specific architecture of the Fugaku node (a) and the physical mapping of ranks to the 3D torus network (b), which were critical for optimizing the TofuD interconnect communication.

Key Results and Insights

The optimized code was benchmarked using two systems: Copper (0.54 million atoms) and Water (0.56 million atoms). The results demonstrated unprecedented scaling and speed:

  • Record Performance: The copper system reached 149 ns/day, while the water system achieved 68.5 ns/day on 12,000 nodes.
  • Scaling Efficiency: The implementation maintained a parallel efficiency of up to 62.3% at high node counts, a significant achievement for MD simulations.
  • Accuracy Preservation: By strategically applying half-precision (FP16) only in the fitting network, the researchers maintained a radial distribution function that perfectly matched full-precision quantum results.

Conclusion

This work demonstrates that the primary bottleneck in high-scale MD is communication, not just raw math. By moving to a node-centric communication model and trimming framework overhead, the researchers have crossed the "millisecond barrier," making long-term ab initio simulations feasible. Future work will focus on more granular, dynamic load balancing to push performance even further as simulations approach the limit of one atom per CPU core.

Summary updated

BibTeX
@inproceedings{li2024scaling,
  author = {Jianxiong Li and Boyang Li and Zhuoqiang Guo and Mingzhen Li and Enji Li and Lijun Liu and Guojun Yuan and Zhan Wang and Guangming Tan and Weile Jia},
  title = {{Scaling Molecular Dynamics with ab initio Accuracy to 149 Nanoseconds per Day}},
  booktitle = {SC},
  year = {2024},
  url = {https://openreview.net/forum?id=n8NQRund45},
}
Figure