You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
dftd4 library does not support MPI parallelism #7487
The dftd4 library does not support running with multiple MPI processes (mpirun -np N with N > 1). ABACUS test cases involving dftd4 do not work with multiple MPI processes..
Affected ABACUS test cases:
03_NAO_multik / relax_cell_vdw4_d4
03_NAO_multik / relax_cell_vdw4_d4s
Question for dftd4 developers: Is MPI support planned or technically feasible in a future release?
Question for dftd4 developers: Is MPI support planned or technically feasible in a future release?
No, there is no plan for an MPI support on the dftd4 program side; see dftd4/dftd4#329.
The only path to enable MPI parallelism for D4 correction in ABACUS has been made clear in #7380:
The only solution I can see would be to implement an ABACUS-native D4 backend, with an internal EEQ solver and MPI-parallel CN, pair, and three-body dispersion loops, while still relying on the DFT-D4 library for parameters, model data, and reference results.
There has been a successful implementation in CP2K; you can mainly see qs_dispersion_d4.F and eeq_method.F and use the master branch to test the effectiveness. It's clear that such implementation is not easy, especially for C++ coding.
I found a way to parallelize the DFT-D4 calculation across MPI ranks without a rather involved change on the ABACUS side.
It introduces a new DFT-D4 API that 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. The core implementation will happen on the dftd4 side, so ABACUS will only need to pass the rank and communicator size and perform the reductions.
Activity
Growl1234 commentedon Jun 18, 2026
No, there is no plan for an MPI support on the dftd4 program side; see dftd4/dftd4#329.
The only path to enable MPI parallelism for D4 correction in ABACUS has been made clear in #7380:
There has been a successful implementation in CP2K; you can mainly see qs_dispersion_d4.F and eeq_method.F and use the master branch to test the effectiveness. It's clear that such implementation is not easy, especially for C++ coding.
Growl1234 commentedon Aug 13, 2026
I found a way to parallelize the DFT-D4 calculation across MPI ranks without a rather involved change on the ABACUS side.
It introduces a new DFT-D4 API that 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. The core implementation will happen on the dftd4 side, so ABACUS will only need to pass the rank and communicator size and perform the reductions.
You can see dftd4/dftd4#395 for details.
CC: @mohanchen