Skip to content

Parallelize neighbor list construction with OpenMP#7390

Open
19hello wants to merge 1 commit into
deepmodeling:developfrom
19hello:neighlist-openmp
Open

Parallelize neighbor list construction with OpenMP#7390
19hello wants to merge 1 commit into
deepmodeling:developfrom
19hello:neighlist-openmp

Conversation

@19hello
Copy link
Copy Markdown
Collaborator

@19hello 19hello commented May 28, 2026

Reminder

  • Have you linked an issue with this pull request?
  • Have you added adequate unit tests and/or case tests for your pull request?
  • Have you noticed possible changes of behavior below or in the linked issue?
  • Have you explained the changes of codes in core modules of ESolver, HSolver, ElecState, Hamilt, Operator or Psi? (ignore if not applicable)

Linked Issue

Fix #...

Unit Tests and/or Case Tests for my changes

  • A unit test is added for each new feature or bug fix.

What's changed?

  • Example: My changes might affect the performance of the application under certain conditions, and I have tested the impact on various scenarios...

Any changes of core modules? (ignore if not applicable)

  • Example: I have added a new virtual function in the esolver base class in order to ...

Copilot AI review requested due to automatic review settings May 28, 2026 09:14
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR parallelizes neighbor list construction in BinManager using OpenMP while preserving serial allocation into the existing NeighborList storage.

Changes:

  • Adds an OpenMP-parallel neighbor discovery phase.
  • Stores discovered neighbor IDs per atom before serially committing them into NeighborList.
  • Keeps allocator usage serial because the page allocator is not thread-safe.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

neighbor_list.reset();

for (int i = 0; i < atoms.size(); i++)
std::vector<std::vector<int>> neighbor_ids(natoms);
@mohanchen mohanchen added Features Needed The features are indeed needed, and developers should have sophisticated knowledge Large Systems Issues related to large-size systems Refactor Refactor ABACUS codes labels May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Features Needed The features are indeed needed, and developers should have sophisticated knowledge Large Systems Issues related to large-size systems Refactor Refactor ABACUS codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants