Skip to content

Commit

Permalink
Merge pull request #392 from amcadmus/master
Browse files Browse the repository at this point in the history
Fix lammps related bugs
  • Loading branch information
amcadmus authored Mar 3, 2021
2 parents 2644cca + 5597ea2 commit e67e94f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
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

0 comments on commit e67e94f

Please sign in to comment.