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

Fix lammps related bugs #392

Merged
merged 2 commits into from
Mar 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions source/lib/src/NNPInter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,10 @@ void
NNPInter::
init (const string & model, const int & gpu_rank)
{
assert (!inited);
if (inited){
std::cerr << "WARNING: deepmd-kit should not be initialized twice, do nothing at the second call of initializer" << std::endl;
return ;
}
SessionOptions options;
options.config.set_inter_op_parallelism_threads(num_inter_nthreads);
options.config.set_intra_op_parallelism_threads(num_intra_nthreads);
Expand Down Expand Up @@ -497,7 +500,10 @@ void
NNPInterModelDevi::
init (const vector<string> & models, const int & gpu_rank)
{
assert (!inited);
if (inited){
std::cerr << "WARNING: deepmd-kit should not be initialized twice, do nothing at the second call of initializer" << std::endl;
return ;
}
numb_models = models.size();
sessions.resize(numb_models);
graph_defs.resize(numb_models);
Expand Down
1 change: 1 addition & 0 deletions source/lmp/pair_nnp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ PairNNP::PairNNP(LAMMPS *lmp)
if (strcmp(update->unit_style,"metal") != 0) {
error->all(FLERR,"Pair deepmd requires metal unit, please set it by \"units metal\"");
}
restartinfo = 0;
pppmflag = 1;
respa_enable = 0;
writedata = 0;
Expand Down