Skip to content

Commit

Permalink
restore non related files
Browse files Browse the repository at this point in the history
  • Loading branch information
HydrogenSulfate committed Sep 27, 2024
1 parent 72241ea commit 8694476
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 13 deletions.
1 change: 0 additions & 1 deletion source/api_cc/src/DeepPot.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ void DeepPot::init(const std::string& model,
} else {
throw deepmd::deepmd_exception("Unsupported model file format");
}

if (deepmd::DPBackend::TensorFlow == backend) {
#ifdef BUILD_TENSORFLOW
dp = std::make_shared<deepmd::DeepPotTF>(model, gpu_rank, file_content);
Expand Down
1 change: 0 additions & 1 deletion source/api_cc/src/common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#include "AtomMap.h"
#include "device.h"
#include <numeric>
#if defined(_WIN32)
#if defined(_WIN32_WINNT)
#undef _WIN32_WINNT
Expand Down
2 changes: 1 addition & 1 deletion source/install/test_cc_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ BUILD_TMP_DIR=${SCRIPT_PATH}/../build_tests
mkdir -p ${BUILD_TMP_DIR}
cd ${BUILD_TMP_DIR}
cmake \
-D ENABLE_TENSORFLOW=False \
-D ENABLE_TENSORFLOW=TRUE \
-D ENABLE_PYTORCH=TRUE \
-D INSTALL_TENSORFLOW=FALSE \
-D USE_TF_PYTHON_LIBS=TRUE \
Expand Down
11 changes: 3 additions & 8 deletions source/lmp/pair_deepmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "neighbor.h"
#include "output.h"
#include "update.h"
// #include <boost/stacktrace.hpp>
#if LAMMPS_VERSION_NUMBER >= 20210831
// in lammps #2902, fix_ttm members turns from private to protected
#define USE_TTM 1
Expand Down Expand Up @@ -495,6 +494,7 @@ void PairDeepMD::compute(int eflag, int vflag) {
}
}
}

vector<int> dtype(nall);
for (int ii = 0; ii < nall; ++ii) {
dtype[ii] = type_idx_map[type[ii] - 1];
Expand Down Expand Up @@ -975,14 +975,9 @@ void PairDeepMD::settings(int narg, char **arg) {
numb_models = models.size();
if (numb_models == 1) {
try {
auto node_rank = get_node_rank();
auto content = get_file_content(arg[0]);
deep_pot.init(arg[0], node_rank, content);
} catch (const std::exception &e) {
deep_pot.init(arg[0], get_node_rank(), get_file_content(arg[0]));
} catch (deepmd_compat::deepmd_exception &e) {
error->one(FLERR, e.what());
// std::cerr << "Standard exception caught: " << e.what() << std::endl;
// // 打印堆栈跟踪信息
// std::cerr << "Stack trace:\n" << boost::stacktrace::stacktrace() << std::endl;
}
cutoff = deep_pot.cutoff() * dist_unit_cvt_factor;
numb_types = deep_pot.numb_types();
Expand Down
3 changes: 1 addition & 2 deletions source/op/pt/comm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
#include <mpi-ext.h>
#endif
#endif
#include "paddle/extension.h"
#include "paddle/include/paddle_inference_api.h"
#include <torch/torch.h>

#include <cstdint>

Expand Down

0 comments on commit 8694476

Please sign in to comment.