Skip to content

OpenMP-Based Parallel Optimization for Molecular Dynamics#7500

Open
jellyfish45 wants to merge 7 commits into
deepmodeling:developfrom
jellyfish45:feature/ml-md-parallel-optimization
Open

OpenMP-Based Parallel Optimization for Molecular Dynamics#7500
jellyfish45 wants to merge 7 commits into
deepmodeling:developfrom
jellyfish45:feature/ml-md-parallel-optimization

Conversation

@jellyfish45

Copy link
Copy Markdown

主要改动

  • 使用 OpenMP 并行化 NEP 径向力、角向力和 ZBL 力计算。
  • 增加串行、原子操作和线程私有归约三种计算模式。
  • 并行化描述符计算、周期性边界处理和大盒子邻居搜索。
  • 增加多线程及多元素体系的正确性测试。
  • 增加可复现的性能测试脚本和报告。

测试范围

  • 验证 OpenMP 和非 OpenMP 编译。
  • 测试 64、216 和 512 原子体系。
  • 测试 1、2 和 4 个线程。

jellyfish45 and others added 7 commits May 23, 2026 18:55
…build

Parallelize NEP potential evaluation for ABACUS MD (Task 6): vendor
NEP_CPU with thread-local force buffers for radial/angular/ZBL kernels,
reuse ESolver cell/coord buffers, add USE_BUNDLED_NEP and nep_benchmark.
Verified on NEP4 HfO2: dE=0, max_dF=0; ~2.1x speedup at 4 threads.
@mohanchen mohanchen changed the title 分子动力学基于OpenMP的并行优化 OpenMP-Based Parallel Optimization for Molecular Dynamics Jun 21, 2026
@mohanchen mohanchen requested a review from 19hello June 21, 2026 01:56
@mohanchen mohanchen added MD & LAM MD and Larege Atomic Models GPU & DCU & HPC GPU and DCU and HPC related any issues labels Jun 21, 2026

19hello commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

I checked this PR locally from the PR head. I do not think it is ready to merge yet because there are several blocking issues.

  1. MODULE_MD_verlet does not compile. source/source_md/md_base.cpp:8 includes:

    #include "potential/potential_factory.h"

    but this PR adds the header under source/source_md/potential/ml/potential_factory.h. Also, source/source_md/CMakeLists.txt does not add the new potential/ml/potential_factory.cpp, nep_potential.cpp, dpmd_potential.cpp, etc. to the md object library, so even after fixing the include path this will likely continue to fail at link time.

    Reproducer:

    cmake --build <build-dir> --target MODULE_MD_verlet -j 8

    Error:

    fatal error: potential/potential_factory.h: No such file or directory
    
  2. The new MODULE_MD_nep_omp test target also fails to compile. source/source_md/test/nep_omp_test.cpp:97 uses the C++ keyword thread_local as a variable name:

    const NepOutput thread_local = ...

    Reproducer:

    cmake --build <build-dir> --target MODULE_MD_nep_omp -j 8

    Error:

    error: expected unqualified-id before '=' token
    
  3. The PR scope is much broader than “OpenMP-Based Parallel Optimization for Molecular Dynamics”. Compared with the base commit, it changes 1000+ files and deletes hundreds of files, including unrelated changes in XC, DFTU/DeltaSpin, DFTD4, tools reorganization, CI, examples, and tests. For example, source/source_hamilt/module_vdw/CMakeLists.txt removes the DFTD4 build logic, which is unrelated to NEP/OpenMP optimization and is high risk.

  4. The PR includes generated binaries and build/report artifacts, for example:

    • source/source_md/build_nep_omp_check/nep_omp_check
    • source/source_md/build_problem2_nep_sweep/nep_omp_sweep
    • source/source_md/build_problem6_nep/nep_problem6_benchmark
    • multiple .aux, .out, .synctex.gz, PDF, and CSV result files

I suggest splitting and cleaning this PR first: keep only the NEP OpenMP optimization source changes, the required CMake changes, minimal tests, and concise documentation. Please remove generated binaries, report intermediate files, and unrelated module changes. After that, at least MODULE_MD_verlet and MODULE_MD_nep_omp should build successfully before review continues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GPU & DCU & HPC GPU and DCU and HPC related any issues MD & LAM MD and Larege Atomic Models project_learning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants