Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lmp: support input mapping for single process dpa2 model inference #3576

Closed
wants to merge 2 commits into from

Conversation

CaRoLZhangxy
Copy link
Collaborator

No description provided.

Copy link

codecov bot commented Mar 21, 2024

Codecov Report

Attention: Patch coverage is 92.30769% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 77.48%. Comparing base (145f501) to head (7e94860).

Files Patch % Lines
source/api_c/include/deepmd.hpp 87.50% 1 Missing ⚠️
source/api_cc/src/DeepPotPT.cc 85.71% 0 Missing and 1 partial ⚠️
source/lmp/pair_deepmd.cpp 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #3576      +/-   ##
==========================================
- Coverage   77.48%   77.48%   -0.01%     
==========================================
  Files         432      432              
  Lines       37182    37216      +34     
  Branches     1620     1622       +2     
==========================================
+ Hits        28812    28837      +25     
- Misses       7502     7510       +8     
- Partials      868      869       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@njzjz njzjz linked an issue Mar 21, 2024 that may be closed by this pull request
@@ -469,6 +469,11 @@ def get_nnei(self) -> int:
"""Returns the total number of selected neighboring atoms in the cut-off radius."""
return self.atomic_model.get_nnei()

@torch.jit.export
def get_ntypes(self) -> int:
Copy link
Member

Choose a reason for hiding this comment

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

Not all models are made from the atomic model. This method should be added into the BaseModel.

source/api_c/include/c_api.h Show resolved Hide resolved
@@ -551,7 +557,7 @@ void PairDeepMD::compute(int eflag, int vflag) {
(numb_models > 1 && (out_freq > 0 && update->ntimestep % out_freq == 0));
if (do_ghost) {
deepmd_compat::InputNlist lmp_list(list->inum, list->ilist, list->numneigh,
list->firstneigh);
list->firstneigh, mapping);
Copy link
Member

Choose a reason for hiding this comment

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

If mapping is only correct for the serial run, we may only pass mapping when the number of ranks is 1 to prevent incorrect results.

Copy link
Member

Choose a reason for hiding this comment

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

A test is required.

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

Successfully merging this pull request may close these issues.

[BUG] _lmp raise "assert mapping is not None" with dpa2 model_
2 participants