Skip to content

Parallel DFT-D4 with MPI through work-partition - #8041

Open
Growl1234 wants to merge 1 commit into
deepmodeling:developfrom
Growl1234:dftd4
Open

Growl1234 wants to merge 1 commit into
deepmodeling:developfrom
Growl1234:dftd4

Conversation

@Growl1234

@Growl1234 Growl1234 commented Sep 28, 2026 •

Copy link
Copy Markdown

dftd4 library now has a work partitioning implementation (see dftd4/dftd4#395), which allows downstream callers to assign each rank a partition of the pairwise and ATM interaction loops, and then reduce the resulting energy, gradient, and virial themselves. With work partitioning applied it's now available for ABACUS to parallel DFT-D4 evaluation with MPI.

Here is a test example: test.zip. In the tested cell-relaxation case, the timing of Vdwd4::evaluate has dropped from around 16.09 s to 3.55 s.

Closes #7487.

Copilot AI lite review requested due to automatic review settings September 28, 2026 10:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

int nranks = 1;
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WORLD, &nranks);
dftd4_set_model_work_partition(error, model, rank, nranks);

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

FYI, the actually crucial part is here, this is a new API that dftd4 v4.3.0 introduced.

@@ -14,4 +14,11 @@ AddTest(

if(ENABLE_DFTD4)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

and ENABLE_MPI?

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dftd4 library does not support MPI parallelism

3 participants