deepmodeling / deepmd-kit

A deep learning package for many-body potential energy representation and molecular dynamics
https://docs.deepmodeling.com/projects/deepmd/
GNU Lesser General Public License v3.0
1.45k stars 499 forks source link

[BUG] unittest compilation errors in api_cc #580

Closed denghuilu closed 3 years ago

denghuilu commented 3 years ago

Summary

Deepmd-kit version, installation way, input file, running commands, error log, etc. unittest compilation errors in deepmd-kit/source/api_cc/tests; version: latest version of devel branch; GPU environment:

CUDA-11.0
gcc (GCC) 7.3.0
cmake version 3.15.2
tensorflow-2.4.0

CPU environment:

gcc (GCC) 7.3.0
cmake version 3.15.2
tensorflow-2.4.0

Steps to Reproduce

First in GPU environment:

cd $deepmd_source_dir/source/api_cc/tests
mkdir build
cd build
cmake -DTENSORFLOW_ROOT=$tensorflow_root ..

cmake works well:

-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Supported model version: 1.0 
-- Enabled cpp interface build, looking for tensorflow_cc and tensorflow_framework
-- Found TensorFlow: /home/LuDh/dp-devel/tensorflow_root/include;/home/LuDh/dp-devel/tensorflow_root/include, /home/LuDh/dp-devel/tensorflow_root/lib/libtensorflow_cc.so;/home/LuDh/dp-devel/tensorflow_root/lib/libtensorflow_framework.so, /home/LuDh/dp-devel/tensorflow_root/lib/libtensorflow_framework.so  in /home/LuDh/dp-devel/tensorflow_root;/home/LuDh/dp-devel/tensorflow_root/../tensorflow_core;/home/LuDh/dp-devel/tensorflow_root;/home/LuDh/dp-devel/tensorflow_root/../tensorflow_core;/usr/;/usr/local/
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found OpenMP_C: -fopenmp (found version "4.0") 
-- Found OpenMP_CXX: -fopenmp (found version "4.0") 
-- Found OpenMP: TRUE (found version "4.0")  
-- Found CUDA in /usr/local/cuda-11.0, build nv GPU support
-- Found CUDA: /usr/local/cuda-11.0 (found version "11.0") 
-- CUDA major version is 11
-- Found GTest: /usr/lib/libgtest.a  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/LuDh/dp-devel/deepmd-kit/source/api_cc/tests/build

then, we compile the unittest program:

make -j12

errors occur:

[  1%] Building NVCC (Device) object cuda_binary_dir/CMakeFiles/deepmd_op_cuda.dir/deepmd_op_cuda_generated_prod_env_mat.cu.o
Scanning dependencies of target deepmd_api
[  2%] Building NVCC (Device) object cuda_binary_dir/CMakeFiles/deepmd_op_cuda.dir/deepmd_op_cuda_generated_prod_force.cu.o
Scanning dependencies of target deepmd_op
[  4%] Building NVCC (Device) object cuda_binary_dir/CMakeFiles/deepmd_op_cuda.dir/deepmd_op_cuda_generated_prod_force_grad.cu.o
Scanning dependencies of target deepmd
[  5%] Building NVCC (Device) object cuda_binary_dir/CMakeFiles/deepmd_op_cuda.dir/deepmd_op_cuda_generated_region.cu.o
[  7%] Building NVCC (Device) object cuda_binary_dir/CMakeFiles/deepmd_op_cuda.dir/deepmd_op_cuda_generated_prod_virial.cu.o
[  8%] Building NVCC (Device) object cuda_binary_dir/CMakeFiles/deepmd_op_cuda.dir/deepmd_op_cuda_generated_prod_virial_grad.cu.o
[ 10%] Building NVCC (Device) object cuda_binary_dir/CMakeFiles/deepmd_op_cuda.dir/deepmd_op_cuda_generated_gelu.cu.o
[ 11%] Building NVCC (Device) object cuda_binary_dir/CMakeFiles/deepmd_op_cuda.dir/deepmd_op_cuda_generated_tabulate.cu.o
[ 13%] Building NVCC (Device) object cuda_binary_dir/CMakeFiles/deepmd_op_cuda.dir/deepmd_op_cuda_generated_coord.cu.o
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
[ 14%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/SimulationRegion.cpp.o
[ 16%] Building CXX object CMakeFiles/deepmd_api.dir/home/LuDh/dp-devel/deepmd-kit/source/api_cc/src/AtomMap.cc.o
[ 17%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/coord.cc.o
[ 19%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/descrpt.cc.o
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
[ 20%] Building CXX object CMakeFiles/deepmd_api.dir/home/LuDh/dp-devel/deepmd-kit/source/api_cc/src/DataModifier.cc.o
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
[ 22%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/env_mat.cc.o
[ 23%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/ewald.cc.o
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
[ 25%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/fmt_nlist.cc.o
[ 26%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/gelu.cc.o
[ 27%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/map_aparam.cc.o
[ 29%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/neighbor_list.cc.o
[ 30%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/pair_tab.cc.o
[ 32%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/prod_env_mat.cc.o
[ 33%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/descrpt_se_a_ef.cc.o
[ 35%] Building CXX object CMakeFiles/deepmd_api.dir/home/LuDh/dp-devel/deepmd-kit/source/api_cc/src/DeepPot.cc.o
[ 36%] Building NVCC (Device) object cuda_binary_dir/CMakeFiles/deepmd_op_cuda.dir/deepmd_op_cuda_generated_neighbor_list.cu.o
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
[ 38%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/prod_force.cc.o
[ 39%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/prod_force_grad.cc.o
[ 41%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/prod_virial.cc.o
[ 42%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/prod_virial_grad.cc.o
[ 44%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/region.cc.o
[ 45%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/soft_min_switch.cc.o
[ 47%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/soft_min_switch_force.cc.o
[ 48%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/descrpt_se_a_ef_para.cc.o
[ 50%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/soft_min_switch_force_grad.cc.o
[ 51%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/soft_min_switch_virial.cc.o
[ 52%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/soft_min_switch_virial_grad.cc.o
[ 54%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/tabulate.cc.o
[ 55%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/utilities.cc.o
[ 57%] Building CXX object CMakeFiles/deepmd_api.dir/home/LuDh/dp-devel/deepmd-kit/source/api_cc/src/DeepTensor.cc.o
[ 58%] Building CXX object CMakeFiles/deepmd_api.dir/home/LuDh/dp-devel/deepmd-kit/source/api_cc/src/common.cc.o
[ 60%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/descrpt_se_a_ef_vert.cc.o
[ 61%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/ewald_recp.cc.o
[ 63%] Linking CXX shared library libdeepmd.so
[ 64%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/gelu_multi_device.cc.o
Warning: Unused direct dependencies:
        /lib/x86_64-linux-gnu/libpthread.so.0
[ 64%] Built target deepmd
[ 66%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/map_aparam.cc.o
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
[ 67%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/neighbor_stat.cc.o
[ 69%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/pair_tab.cc.o
[ 70%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/prod_env_mat_multi_device.cc.o
[ 72%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/prod_force.cc.o
[ 73%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/prod_force_multi_device.cc.o
[ 75%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/prod_virial.cc.o
[ 76%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/prod_virial_multi_device.cc.o
[ 77%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/soft_min.cc.o
[ 79%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/soft_min_force.cc.o
[ 80%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/soft_min_virial.cc.o
[ 82%] Linking CXX shared library libdeepmd_api.so
Warning: Unused direct dependencies:
        /home/LuDh/anaconda3/lib/libgomp.so.1
        /lib/x86_64-linux-gnu/libpthread.so.0
[ 82%] Built target deepmd_api
[ 83%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/tabulate_multi_device.cc.o
[ 85%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/unaggregated_grad.cc.o
[ 86%] Linking CXX shared library libdeepmd_op.so
Warning: Unused direct dependencies:
        /lib/x86_64-linux-gnu/libpthread.so.0
[ 86%] Built target deepmd_op
Scanning dependencies of target deepmd_op_cuda
[ 88%] Linking CXX shared library libdeepmd_op_cuda.so
Warning: Unused direct dependencies:
        /lib/x86_64-linux-gnu/libm.so.6
        /home/LuDh/anaconda3/lib/libgomp.so.1
[ 88%] Built target deepmd_op_cuda
Scanning dependencies of target runUnitTests
[ 89%] Building CXX object CMakeFiles/runUnitTests.dir/test_deepdipole.cc.o
[ 91%] Building CXX object CMakeFiles/runUnitTests.dir/test_deeppolar.cc.o
[ 92%] Building CXX object CMakeFiles/runUnitTests.dir/test_deeppot_a.cc.o
[ 94%] Building CXX object CMakeFiles/runUnitTests.dir/test_deeppot_model_devi.cc.o
[ 95%] Building CXX object CMakeFiles/runUnitTests.dir/test_deeppot_r.cc.o
[ 97%] Building CXX object CMakeFiles/runUnitTests.dir/test_ewald.cc.o
[ 98%] Building CXX object CMakeFiles/runUnitTests.dir/test_dipolecharge.cc.o
[100%] Linking CXX executable runUnitTests
CMakeFiles/runUnitTests.dir/test_deepdipole.cc.o: In function `TestInferDeepDipole_cpu_build_nlist_Test::TestBody()':
test_deepdipole.cc:(.text+0x4bd): undefined reference to `deepmd::DeepTensor::compute(std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&)'
CMakeFiles/runUnitTests.dir/test_deepdipole.cc.o: In function `TestInferDeepDipole_cpu_lmp_nlist_Test::TestBody()':
test_deepdipole.cc:(.text+0xb84): undefined reference to `deepmd::DeepTensor::compute(std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, int, deepmd::InputNlist const&)'
CMakeFiles/runUnitTests.dir/test_deepdipole.cc.o: In function `tensorflow::core::RefCounted::~RefCounted()':
test_deepdipole.cc:(.text._ZN10tensorflow4core10RefCountedD2Ev[_ZN10tensorflow4core10RefCountedD5Ev]+0xf6): undefined reference to `tensorflow::internal::LogMessageFatal::LogMessageFatal(char const*, int)'
test_deepdipole.cc:(.text._ZN10tensorflow4core10RefCountedD2Ev[_ZN10tensorflow4core10RefCountedD5Ev]+0x117): undefined reference to `tensorflow::internal::LogMessageFatal::~LogMessageFatal()'
CMakeFiles/runUnitTests.dir/test_deepdipole.cc.o: In function `TestInferDeepDipole::SetUp()':
test_deepdipole.cc:(.text._ZN19TestInferDeepDipole5SetUpEv[_ZN19TestInferDeepDipole5SetUpEv]+0xa2): undefined reference to `google::protobuf::io::FileInputStream::FileInputStream(int, int)'
test_deepdipole.cc:(.text._ZN19TestInferDeepDipole5SetUpEv[_ZN19TestInferDeepDipole5SetUpEv]+0xb8): undefined reference to `tensorflow::GraphDef::GraphDef()'
test_deepdipole.cc:(.text._ZN19TestInferDeepDipole5SetUpEv[_ZN19TestInferDeepDipole5SetUpEv]+0xd1): undefined reference to `google::protobuf::TextFormat::Parse(google::protobuf::io::ZeroCopyInputStream*, google::protobuf::Message*)'
test_deepdipole.cc:(.text._ZN19TestInferDeepDipole5SetUpEv[_ZN19TestInferDeepDipole5SetUpEv]+0x146): undefined reference to `google::protobuf::MessageLite::SerializeToOstream(std::ostream*) const'
test_deepdipole.cc:(.text._ZN19TestInferDeepDipole5SetUpEv[_ZN19TestInferDeepDipole5SetUpEv]+0x1cc): undefined reference to `deepmd::DeepTensor::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
test_deepdipole.cc:(.text._ZN19TestInferDeepDipole5SetUpEv[_ZN19TestInferDeepDipole5SetUpEv]+0x245): undefined reference to `tensorflow::GraphDef::~GraphDef()'
test_deepdipole.cc:(.text._ZN19TestInferDeepDipole5SetUpEv[_ZN19TestInferDeepDipole5SetUpEv]+0x30b): undefined reference to `tensorflow::GraphDef::~GraphDef()'
CMakeFiles/runUnitTests.dir/test_deepdipole.cc.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >* tensorflow::internal::MakeCheckOpString<long, int>(long const&, int const&, char const*)':
test_deepdipole.cc:(.text._ZN10tensorflow8internal17MakeCheckOpStringIliEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc[_ZN10tensorflow8internal17MakeCheckOpStringIliEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc]+0x33): undefined reference to `tensorflow::internal::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*)'
test_deepdipole.cc:(.text._ZN10tensorflow8internal17MakeCheckOpStringIliEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc[_ZN10tensorflow8internal17MakeCheckOpStringIliEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc]+0x5d): undefined reference to `tensorflow::internal::CheckOpMessageBuilder::ForVar2()'
test_deepdipole.cc:(.text._ZN10tensorflow8internal17MakeCheckOpStringIliEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc[_ZN10tensorflow8internal17MakeCheckOpStringIliEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc]+0x7b): undefined reference to `tensorflow::internal::CheckOpMessageBuilder::NewString[abi:cxx11]()'
test_deepdipole.cc:(.text._ZN10tensorflow8internal17MakeCheckOpStringIliEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc[_ZN10tensorflow8internal17MakeCheckOpStringIliEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc]+0x8a): undefined reference to `tensorflow::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder()'
test_deepdipole.cc:(.text._ZN10tensorflow8internal17MakeCheckOpStringIliEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc[_ZN10tensorflow8internal17MakeCheckOpStringIliEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc]+0xad): undefined reference to `tensorflow::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder()'
CMakeFiles/runUnitTests.dir/test_deepdipole.cc.o: In function `deepmd::DeepTensor::~DeepTensor()':
test_deepdipole.cc:(.text._ZN6deepmd10DeepTensorD2Ev[_ZN6deepmd10DeepTensorD5Ev]+0x4e): undefined reference to `tensorflow::GraphDef::~GraphDef()'
CMakeFiles/runUnitTests.dir/test_deepdipole.cc.o: In function `TestInferDeepDipole::TestInferDeepDipole()':
test_deepdipole.cc:(.text._ZN19TestInferDeepDipoleC2Ev[_ZN19TestInferDeepDipoleC5Ev]+0x17c): undefined reference to `deepmd::DeepTensor::DeepTensor()'
CMakeFiles/runUnitTests.dir/test_deeppolar.cc.o: In function `TestInferDeepPolar_cpu_build_nlist_Test::TestBody()':
test_deeppolar.cc:(.text+0x4bd): undefined reference to `deepmd::DeepTensor::compute(std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&)'
CMakeFiles/runUnitTests.dir/test_deeppolar.cc.o: In function `TestInferDeepPolar_cpu_lmp_nlist_Test::TestBody()':
test_deeppolar.cc:(.text+0xb84): undefined reference to `deepmd::DeepTensor::compute(std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, int, deepmd::InputNlist const&)'
CMakeFiles/runUnitTests.dir/test_deeppolar.cc.o: In function `TestInferDeepPolar::SetUp()':
test_deeppolar.cc:(.text._ZN18TestInferDeepPolar5SetUpEv[_ZN18TestInferDeepPolar5SetUpEv]+0xa2): undefined reference to `google::protobuf::io::FileInputStream::FileInputStream(int, int)'
test_deeppolar.cc:(.text._ZN18TestInferDeepPolar5SetUpEv[_ZN18TestInferDeepPolar5SetUpEv]+0xb8): undefined reference to `tensorflow::GraphDef::GraphDef()'
test_deeppolar.cc:(.text._ZN18TestInferDeepPolar5SetUpEv[_ZN18TestInferDeepPolar5SetUpEv]+0xd1): undefined reference to `google::protobuf::TextFormat::Parse(google::protobuf::io::ZeroCopyInputStream*, google::protobuf::Message*)'
test_deeppolar.cc:(.text._ZN18TestInferDeepPolar5SetUpEv[_ZN18TestInferDeepPolar5SetUpEv]+0x146): undefined reference to `google::protobuf::MessageLite::SerializeToOstream(std::ostream*) const'
test_deeppolar.cc:(.text._ZN18TestInferDeepPolar5SetUpEv[_ZN18TestInferDeepPolar5SetUpEv]+0x1cc): undefined reference to `deepmd::DeepTensor::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
test_deeppolar.cc:(.text._ZN18TestInferDeepPolar5SetUpEv[_ZN18TestInferDeepPolar5SetUpEv]+0x245): undefined reference to `tensorflow::GraphDef::~GraphDef()'
test_deeppolar.cc:(.text._ZN18TestInferDeepPolar5SetUpEv[_ZN18TestInferDeepPolar5SetUpEv]+0x30b): undefined reference to `tensorflow::GraphDef::~GraphDef()'
CMakeFiles/runUnitTests.dir/test_deeppolar.cc.o: In function `TestInferDeepPolar::TestInferDeepPolar()':
test_deeppolar.cc:(.text._ZN18TestInferDeepPolarC2Ev[_ZN18TestInferDeepPolarC5Ev]+0x17c): undefined reference to `deepmd::DeepTensor::DeepTensor()'
CMakeFiles/runUnitTests.dir/test_deeppot_a.cc.o: In function `TestInferDeepPotA_cpu_build_nlist_Test::TestBody()':
test_deeppot_a.cc:(.text+0x103): undefined reference to `deepmd::DeepPot::compute(double&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)'
CMakeFiles/runUnitTests.dir/test_deeppot_a.cc.o: In function `TestInferDeepPotA_cpu_build_nlist_numfv_Test::TestBody()::MyModel::compute(double&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)':
test_deeppot_a.cc:(.text+0x8fd): undefined reference to `deepmd::DeepPot::compute(double&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)'
CMakeFiles/runUnitTests.dir/test_deeppot_a.cc.o: In function `TestInferDeepPotA_cpu_build_nlist_atomic_Test::TestBody()':
test_deeppot_a.cc:(.text+0xd7b): undefined reference to `deepmd::DeepPot::compute(double&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)'
CMakeFiles/runUnitTests.dir/test_deeppot_a.cc.o: In function `TestInferDeepPotA_cpu_lmp_nlist_Test::TestBody()':
test_deeppot_a.cc:(.text+0x1d46): undefined reference to `deepmd::DeepPot::compute(double&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, int, deepmd::InputNlist const&, int const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)'
test_deeppot_a.cc:(.text+0x242f): undefined reference to `deepmd::DeepPot::compute(double&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, int, deepmd::InputNlist const&, int const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)'
CMakeFiles/runUnitTests.dir/test_deeppot_a.cc.o: In function `TestInferDeepPotA_cpu_lmp_nlist_atomic_Test::TestBody()':
test_deeppot_a.cc:(.text+0x317d): undefined reference to `deepmd::DeepPot::compute(double&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, int, deepmd::InputNlist const&, int const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)'
test_deeppot_a.cc:(.text+0x3dd0): undefined reference to `deepmd::DeepPot::compute(double&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, int, deepmd::InputNlist const&, int const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)'
CMakeFiles/runUnitTests.dir/test_deeppot_a.cc.o: In function `TestInferDeepPotA_cpu_lmp_nlist_2rc_Test::TestBody()':
test_deeppot_a.cc:(.text+0x527a): undefined reference to `deepmd::DeepPot::compute(double&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, int, deepmd::InputNlist const&, int const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)'
test_deeppot_a.cc:(.text+0x5963): undefined reference to `deepmd::DeepPot::compute(double&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, int, deepmd::InputNlist const&, int const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)'
CMakeFiles/runUnitTests.dir/test_deeppot_a.cc.o: In function `TestInferDeepPotA_cpu_lmp_nlist_type_sel_Test::TestBody()':
test_deeppot_a.cc:(.text+0x6979): undefined reference to `deepmd::DeepPot::compute(double&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, int, deepmd::InputNlist const&, int const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)'
CMakeFiles/runUnitTests.dir/test_deeppot_a.cc.o: In function `TestInferDeepPotANoPbc_cpu_build_nlist_Test::TestBody()':
test_deeppot_a.cc:(.text+0x73d5): undefined reference to `deepmd::DeepPot::compute(double&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)'
CMakeFiles/runUnitTests.dir/test_deeppot_a.cc.o: In function `TestInferDeepPotA::SetUp()':
test_deeppot_a.cc:(.text._ZN17TestInferDeepPotA5SetUpEv[_ZN17TestInferDeepPotA5SetUpEv]+0xa2): undefined reference to `google::protobuf::io::FileInputStream::FileInputStream(int, int)'
test_deeppot_a.cc:(.text._ZN17TestInferDeepPotA5SetUpEv[_ZN17TestInferDeepPotA5SetUpEv]+0xb8): undefined reference to `tensorflow::GraphDef::GraphDef()'
test_deeppot_a.cc:(.text._ZN17TestInferDeepPotA5SetUpEv[_ZN17TestInferDeepPotA5SetUpEv]+0xd1): undefined reference to `google::protobuf::TextFormat::Parse(google::protobuf::io::ZeroCopyInputStream*, google::protobuf::Message*)'
test_deeppot_a.cc:(.text._ZN17TestInferDeepPotA5SetUpEv[_ZN17TestInferDeepPotA5SetUpEv]+0x146): undefined reference to `google::protobuf::MessageLite::SerializeToOstream(std::ostream*) const'
test_deeppot_a.cc:(.text._ZN17TestInferDeepPotA5SetUpEv[_ZN17TestInferDeepPotA5SetUpEv]+0x1cf): undefined reference to `deepmd::DeepPot::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
test_deeppot_a.cc:(.text._ZN17TestInferDeepPotA5SetUpEv[_ZN17TestInferDeepPotA5SetUpEv]+0x5e6): undefined reference to `tensorflow::GraphDef::~GraphDef()'
test_deeppot_a.cc:(.text._ZN17TestInferDeepPotA5SetUpEv[_ZN17TestInferDeepPotA5SetUpEv]+0x727): undefined reference to `tensorflow::GraphDef::~GraphDef()'
CMakeFiles/runUnitTests.dir/test_deeppot_a.cc.o: In function `TestInferDeepPotANoPbc::SetUp()':
test_deeppot_a.cc:(.text._ZN22TestInferDeepPotANoPbc5SetUpEv[_ZN22TestInferDeepPotANoPbc5SetUpEv]+0xa2): undefined reference to `google::protobuf::io::FileInputStream::FileInputStream(int, int)'
test_deeppot_a.cc:(.text._ZN22TestInferDeepPotANoPbc5SetUpEv[_ZN22TestInferDeepPotANoPbc5SetUpEv]+0xb8): undefined reference to `tensorflow::GraphDef::GraphDef()'
test_deeppot_a.cc:(.text._ZN22TestInferDeepPotANoPbc5SetUpEv[_ZN22TestInferDeepPotANoPbc5SetUpEv]+0xd1): undefined reference to `google::protobuf::TextFormat::Parse(google::protobuf::io::ZeroCopyInputStream*, google::protobuf::Message*)'
test_deeppot_a.cc:(.text._ZN22TestInferDeepPotANoPbc5SetUpEv[_ZN22TestInferDeepPotANoPbc5SetUpEv]+0x146): undefined reference to `google::protobuf::MessageLite::SerializeToOstream(std::ostream*) const'
test_deeppot_a.cc:(.text._ZN22TestInferDeepPotANoPbc5SetUpEv[_ZN22TestInferDeepPotANoPbc5SetUpEv]+0x1cf): undefined reference to `deepmd::DeepPot::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
test_deeppot_a.cc:(.text._ZN22TestInferDeepPotANoPbc5SetUpEv[_ZN22TestInferDeepPotANoPbc5SetUpEv]+0x5e6): undefined reference to `tensorflow::GraphDef::~GraphDef()'
test_deeppot_a.cc:(.text._ZN22TestInferDeepPotANoPbc5SetUpEv[_ZN22TestInferDeepPotANoPbc5SetUpEv]+0x727): undefined reference to `tensorflow::GraphDef::~GraphDef()'
CMakeFiles/runUnitTests.dir/test_deeppot_a.cc.o: In function `TestInferDeepPotANoPbc::~TestInferDeepPotANoPbc()':
test_deeppot_a.cc:(.text._ZN22TestInferDeepPotANoPbcD2Ev[_ZN22TestInferDeepPotANoPbcD5Ev]+0x26): undefined reference to `deepmd::DeepPot::~DeepPot()'
CMakeFiles/runUnitTests.dir/test_deeppot_a.cc.o: In function `TestInferDeepPotA::~TestInferDeepPotA()':
test_deeppot_a.cc:(.text._ZN17TestInferDeepPotAD2Ev[_ZN17TestInferDeepPotAD5Ev]+0x26): undefined reference to `deepmd::DeepPot::~DeepPot()'
CMakeFiles/runUnitTests.dir/test_deeppot_a.cc.o: In function `TestInferDeepPotANoPbc::TestInferDeepPotANoPbc()':
test_deeppot_a.cc:(.text._ZN22TestInferDeepPotANoPbcC2Ev[_ZN22TestInferDeepPotANoPbcC5Ev]+0x1f3): undefined reference to `deepmd::DeepPot::DeepPot()'
CMakeFiles/runUnitTests.dir/test_deeppot_a.cc.o: In function `TestInferDeepPotA::TestInferDeepPotA()':
test_deeppot_a.cc:(.text._ZN17TestInferDeepPotAC2Ev[_ZN17TestInferDeepPotAC5Ev]+0x245): undefined reference to `deepmd::DeepPot::DeepPot()'
CMakeFiles/runUnitTests.dir/test_deeppot_model_devi.cc.o: In function `TestInferDeepPotModeDevi_cpu_lmp_list_Test::TestBody()':
test_deeppot_model_devi.cc:(.text+0xd4f): undefined reference to `deepmd::DeepPot::compute(double&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, int, deepmd::InputNlist const&, int const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)'
test_deeppot_model_devi.cc:(.text+0xe3b): undefined reference to `deepmd::DeepPot::compute(double&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, int, deepmd::InputNlist const&, int const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)'
test_deeppot_model_devi.cc:(.text+0xef1): undefined reference to `deepmd::DeepPotModelDevi::compute(std::vector<double, std::allocator<double> >&, std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >&, std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, int, deepmd::InputNlist const&, int const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)'
test_deeppot_model_devi.cc:(.text+0x19f3): undefined reference to `deepmd::DeepPotModelDevi::compute_avg(std::vector<double, std::allocator<double> >&, std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > > const&)'
test_deeppot_model_devi.cc:(.text+0x1a1e): undefined reference to `deepmd::DeepPotModelDevi::compute_std_f(std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > > const&)'
CMakeFiles/runUnitTests.dir/test_deeppot_model_devi.cc.o: In function `TestInferDeepPotModeDevi_cpu_lmp_list_atomic_Test::TestBody()':
test_deeppot_model_devi.cc:(.text+0x2c35): undefined reference to `deepmd::DeepPot::compute(double&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, int, deepmd::InputNlist const&, int const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)'
test_deeppot_model_devi.cc:(.text+0x2d59): undefined reference to `deepmd::DeepPot::compute(double&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, int, deepmd::InputNlist const&, int const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)'
test_deeppot_model_devi.cc:(.text+0x2e1f): undefined reference to `deepmd::DeepPotModelDevi::compute(std::vector<double, std::allocator<double> >&, std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >&, std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >&, std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >&, std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, int, deepmd::InputNlist const&, int const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)'
CMakeFiles/runUnitTests.dir/test_deeppot_model_devi.cc.o: In function `TestInferDeepPotModeDevi::SetUp()':
test_deeppot_model_devi.cc:(.text._ZN24TestInferDeepPotModeDevi5SetUpEv[_ZN24TestInferDeepPotModeDevi5SetUpEv]+0xa4): undefined reference to `google::protobuf::io::FileInputStream::FileInputStream(int, int)'
test_deeppot_model_devi.cc:(.text._ZN24TestInferDeepPotModeDevi5SetUpEv[_ZN24TestInferDeepPotModeDevi5SetUpEv]+0xba): undefined reference to `tensorflow::GraphDef::GraphDef()'
test_deeppot_model_devi.cc:(.text._ZN24TestInferDeepPotModeDevi5SetUpEv[_ZN24TestInferDeepPotModeDevi5SetUpEv]+0xd3): undefined reference to `google::protobuf::TextFormat::Parse(google::protobuf::io::ZeroCopyInputStream*, google::protobuf::Message*)'
test_deeppot_model_devi.cc:(.text._ZN24TestInferDeepPotModeDevi5SetUpEv[_ZN24TestInferDeepPotModeDevi5SetUpEv]+0x148): undefined reference to `google::protobuf::MessageLite::SerializeToOstream(std::ostream*) const'
test_deeppot_model_devi.cc:(.text._ZN24TestInferDeepPotModeDevi5SetUpEv[_ZN24TestInferDeepPotModeDevi5SetUpEv]+0x1ce): undefined reference to `deepmd::DeepPot::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
test_deeppot_model_devi.cc:(.text._ZN24TestInferDeepPotModeDevi5SetUpEv[_ZN24TestInferDeepPotModeDevi5SetUpEv]+0x228): undefined reference to `tensorflow::GraphDef::~GraphDef()'
test_deeppot_model_devi.cc:(.text._ZN24TestInferDeepPotModeDevi5SetUpEv[_ZN24TestInferDeepPotModeDevi5SetUpEv]+0x2b9): undefined reference to `google::protobuf::io::FileInputStream::FileInputStream(int, int)'
test_deeppot_model_devi.cc:(.text._ZN24TestInferDeepPotModeDevi5SetUpEv[_ZN24TestInferDeepPotModeDevi5SetUpEv]+0x2cf): undefined reference to `tensorflow::GraphDef::GraphDef()'
test_deeppot_model_devi.cc:(.text._ZN24TestInferDeepPotModeDevi5SetUpEv[_ZN24TestInferDeepPotModeDevi5SetUpEv]+0x2e8): undefined reference to `google::protobuf::TextFormat::Parse(google::protobuf::io::ZeroCopyInputStream*, google::protobuf::Message*)'
test_deeppot_model_devi.cc:(.text._ZN24TestInferDeepPotModeDevi5SetUpEv[_ZN24TestInferDeepPotModeDevi5SetUpEv]+0x35d): undefined reference to `google::protobuf::MessageLite::SerializeToOstream(std::ostream*) const'
test_deeppot_model_devi.cc:(.text._ZN24TestInferDeepPotModeDevi5SetUpEv[_ZN24TestInferDeepPotModeDevi5SetUpEv]+0x3e6): undefined reference to `deepmd::DeepPot::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
test_deeppot_model_devi.cc:(.text._ZN24TestInferDeepPotModeDevi5SetUpEv[_ZN24TestInferDeepPotModeDevi5SetUpEv]+0x440): undefined reference to `tensorflow::GraphDef::~GraphDef()'
test_deeppot_model_devi.cc:(.text._ZN24TestInferDeepPotModeDevi5SetUpEv[_ZN24TestInferDeepPotModeDevi5SetUpEv]+0x538): undefined reference to `deepmd::DeepPotModelDevi::init(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, int const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)'
test_deeppot_model_devi.cc:(.text._ZN24TestInferDeepPotModeDevi5SetUpEv[_ZN24TestInferDeepPotModeDevi5SetUpEv]+0x65f): undefined reference to `tensorflow::GraphDef::~GraphDef()'
test_deeppot_model_devi.cc:(.text._ZN24TestInferDeepPotModeDevi5SetUpEv[_ZN24TestInferDeepPotModeDevi5SetUpEv]+0x71c): undefined reference to `tensorflow::GraphDef::~GraphDef()'
CMakeFiles/runUnitTests.dir/test_deeppot_model_devi.cc.o: In function `TestInferDeepPotModeDevi::~TestInferDeepPotModeDevi()':
test_deeppot_model_devi.cc:(.text._ZN24TestInferDeepPotModeDeviD2Ev[_ZN24TestInferDeepPotModeDeviD5Ev]+0x26): undefined reference to `deepmd::DeepPotModelDevi::~DeepPotModelDevi()'
test_deeppot_model_devi.cc:(.text._ZN24TestInferDeepPotModeDeviD2Ev[_ZN24TestInferDeepPotModeDeviD5Ev]+0x38): undefined reference to `deepmd::DeepPot::~DeepPot()'
test_deeppot_model_devi.cc:(.text._ZN24TestInferDeepPotModeDeviD2Ev[_ZN24TestInferDeepPotModeDeviD5Ev]+0x48): undefined reference to `deepmd::DeepPot::~DeepPot()'
CMakeFiles/runUnitTests.dir/test_deeppot_model_devi.cc.o: In function `TestInferDeepPotModeDevi::TestInferDeepPotModeDevi()':
test_deeppot_model_devi.cc:(.text._ZN24TestInferDeepPotModeDeviC2Ev[_ZN24TestInferDeepPotModeDeviC5Ev]+0x12c): undefined reference to `deepmd::DeepPot::DeepPot()'
test_deeppot_model_devi.cc:(.text._ZN24TestInferDeepPotModeDeviC2Ev[_ZN24TestInferDeepPotModeDeviC5Ev]+0x13e): undefined reference to `deepmd::DeepPot::DeepPot()'
test_deeppot_model_devi.cc:(.text._ZN24TestInferDeepPotModeDeviC2Ev[_ZN24TestInferDeepPotModeDeviC5Ev]+0x150): undefined reference to `deepmd::DeepPotModelDevi::DeepPotModelDevi()'
test_deeppot_model_devi.cc:(.text._ZN24TestInferDeepPotModeDeviC2Ev[_ZN24TestInferDeepPotModeDeviC5Ev]+0x1a0): undefined reference to `deepmd::DeepPot::~DeepPot()'
test_deeppot_model_devi.cc:(.text._ZN24TestInferDeepPotModeDeviC2Ev[_ZN24TestInferDeepPotModeDeviC5Ev]+0x1b5): undefined reference to `deepmd::DeepPot::~DeepPot()'
CMakeFiles/runUnitTests.dir/test_deeppot_r.cc.o: In function `TestInferDeepPotR_cpu_build_nlist_Test::TestBody()':
test_deeppot_r.cc:(.text+0x103): undefined reference to `deepmd::DeepPot::compute(double&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)'
CMakeFiles/runUnitTests.dir/test_deeppot_r.cc.o: In function `TestInferDeepPotR_cpu_build_nlist_numfv_Test::TestBody()::MyModel::compute(double&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)':
test_deeppot_r.cc:(.text+0x8f3): undefined reference to `deepmd::DeepPot::compute(double&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)'
CMakeFiles/runUnitTests.dir/test_deeppot_r.cc.o: In function `TestInferDeepPotR_cpu_build_nlist_atomic_Test::TestBody()':
test_deeppot_r.cc:(.text+0xd29): undefined reference to `deepmd::DeepPot::compute(double&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)'
CMakeFiles/runUnitTests.dir/test_deeppot_r.cc.o: In function `TestInferDeepPotR_cpu_lmp_nlist_Test::TestBody()':
test_deeppot_r.cc:(.text+0x1cf4): undefined reference to `deepmd::DeepPot::compute(double&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, int, deepmd::InputNlist const&, int const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)'
test_deeppot_r.cc:(.text+0x23dd): undefined reference to `deepmd::DeepPot::compute(double&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, int, deepmd::InputNlist const&, int const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)'
CMakeFiles/runUnitTests.dir/test_deeppot_r.cc.o: In function `TestInferDeepPotR_cpu_lmp_nlist_atomic_Test::TestBody()':
test_deeppot_r.cc:(.text+0x312b): undefined reference to `deepmd::DeepPot::compute(double&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, int, deepmd::InputNlist const&, int const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)'
test_deeppot_r.cc:(.text+0x3d7e): undefined reference to `deepmd::DeepPot::compute(double&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, int, deepmd::InputNlist const&, int const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)'
CMakeFiles/runUnitTests.dir/test_deeppot_r.cc.o: In function `TestInferDeepPotR_cpu_lmp_nlist_2rc_Test::TestBody()':
test_deeppot_r.cc:(.text+0x5228): undefined reference to `deepmd::DeepPot::compute(double&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, int, deepmd::InputNlist const&, int const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)'
test_deeppot_r.cc:(.text+0x5911): undefined reference to `deepmd::DeepPot::compute(double&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, int, deepmd::InputNlist const&, int const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)'
CMakeFiles/runUnitTests.dir/test_deeppot_r.cc.o: In function `TestInferDeepPotR_cpu_lmp_nlist_type_sel_Test::TestBody()':
test_deeppot_r.cc:(.text+0x6927): undefined reference to `deepmd::DeepPot::compute(double&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, int, deepmd::InputNlist const&, int const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)'
CMakeFiles/runUnitTests.dir/test_deeppot_r.cc.o: In function `TestInferDeepPotRNoPbc_cpu_build_nlist_Test::TestBody()':
test_deeppot_r.cc:(.text+0x7383): undefined reference to `deepmd::DeepPot::compute(double&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&)'
CMakeFiles/runUnitTests.dir/test_deeppot_r.cc.o: In function `TestInferDeepPotR::SetUp()':
test_deeppot_r.cc:(.text._ZN17TestInferDeepPotR5SetUpEv[_ZN17TestInferDeepPotR5SetUpEv]+0xa2): undefined reference to `google::protobuf::io::FileInputStream::FileInputStream(int, int)'
test_deeppot_r.cc:(.text._ZN17TestInferDeepPotR5SetUpEv[_ZN17TestInferDeepPotR5SetUpEv]+0xb8): undefined reference to `tensorflow::GraphDef::GraphDef()'
test_deeppot_r.cc:(.text._ZN17TestInferDeepPotR5SetUpEv[_ZN17TestInferDeepPotR5SetUpEv]+0xd1): undefined reference to `google::protobuf::TextFormat::Parse(google::protobuf::io::ZeroCopyInputStream*, google::protobuf::Message*)'
test_deeppot_r.cc:(.text._ZN17TestInferDeepPotR5SetUpEv[_ZN17TestInferDeepPotR5SetUpEv]+0x146): undefined reference to `google::protobuf::MessageLite::SerializeToOstream(std::ostream*) const'
test_deeppot_r.cc:(.text._ZN17TestInferDeepPotR5SetUpEv[_ZN17TestInferDeepPotR5SetUpEv]+0x1cf): undefined reference to `deepmd::DeepPot::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
test_deeppot_r.cc:(.text._ZN17TestInferDeepPotR5SetUpEv[_ZN17TestInferDeepPotR5SetUpEv]+0x5e6): undefined reference to `tensorflow::GraphDef::~GraphDef()'
test_deeppot_r.cc:(.text._ZN17TestInferDeepPotR5SetUpEv[_ZN17TestInferDeepPotR5SetUpEv]+0x727): undefined reference to `tensorflow::GraphDef::~GraphDef()'
CMakeFiles/runUnitTests.dir/test_deeppot_r.cc.o: In function `TestInferDeepPotRNoPbc::SetUp()':
test_deeppot_r.cc:(.text._ZN22TestInferDeepPotRNoPbc5SetUpEv[_ZN22TestInferDeepPotRNoPbc5SetUpEv]+0xa2): undefined reference to `google::protobuf::io::FileInputStream::FileInputStream(int, int)'
test_deeppot_r.cc:(.text._ZN22TestInferDeepPotRNoPbc5SetUpEv[_ZN22TestInferDeepPotRNoPbc5SetUpEv]+0xb8): undefined reference to `tensorflow::GraphDef::GraphDef()'
test_deeppot_r.cc:(.text._ZN22TestInferDeepPotRNoPbc5SetUpEv[_ZN22TestInferDeepPotRNoPbc5SetUpEv]+0xd1): undefined reference to `google::protobuf::TextFormat::Parse(google::protobuf::io::ZeroCopyInputStream*, google::protobuf::Message*)'
test_deeppot_r.cc:(.text._ZN22TestInferDeepPotRNoPbc5SetUpEv[_ZN22TestInferDeepPotRNoPbc5SetUpEv]+0x146): undefined reference to `google::protobuf::MessageLite::SerializeToOstream(std::ostream*) const'
test_deeppot_r.cc:(.text._ZN22TestInferDeepPotRNoPbc5SetUpEv[_ZN22TestInferDeepPotRNoPbc5SetUpEv]+0x1cf): undefined reference to `deepmd::DeepPot::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
test_deeppot_r.cc:(.text._ZN22TestInferDeepPotRNoPbc5SetUpEv[_ZN22TestInferDeepPotRNoPbc5SetUpEv]+0x5e6): undefined reference to `tensorflow::GraphDef::~GraphDef()'
test_deeppot_r.cc:(.text._ZN22TestInferDeepPotRNoPbc5SetUpEv[_ZN22TestInferDeepPotRNoPbc5SetUpEv]+0x727): undefined reference to `tensorflow::GraphDef::~GraphDef()'
CMakeFiles/runUnitTests.dir/test_deeppot_r.cc.o: In function `TestInferDeepPotRNoPbc::~TestInferDeepPotRNoPbc()':
test_deeppot_r.cc:(.text._ZN22TestInferDeepPotRNoPbcD2Ev[_ZN22TestInferDeepPotRNoPbcD5Ev]+0x26): undefined reference to `deepmd::DeepPot::~DeepPot()'
CMakeFiles/runUnitTests.dir/test_deeppot_r.cc.o: In function `TestInferDeepPotR::~TestInferDeepPotR()':
test_deeppot_r.cc:(.text._ZN17TestInferDeepPotRD2Ev[_ZN17TestInferDeepPotRD5Ev]+0x26): undefined reference to `deepmd::DeepPot::~DeepPot()'
CMakeFiles/runUnitTests.dir/test_deeppot_r.cc.o: In function `TestInferDeepPotRNoPbc::TestInferDeepPotRNoPbc()':
test_deeppot_r.cc:(.text._ZN22TestInferDeepPotRNoPbcC2Ev[_ZN22TestInferDeepPotRNoPbcC5Ev]+0x1f3): undefined reference to `deepmd::DeepPot::DeepPot()'
CMakeFiles/runUnitTests.dir/test_deeppot_r.cc.o: In function `TestInferDeepPotR::TestInferDeepPotR()':
test_deeppot_r.cc:(.text._ZN17TestInferDeepPotRC2Ev[_ZN17TestInferDeepPotRC5Ev]+0x245): undefined reference to `deepmd::DeepPot::DeepPot()'
CMakeFiles/runUnitTests.dir/test_dipolecharge.cc.o: In function `TestDipoleCharge_cpu_lmp_nlist_Test::TestBody()':
test_dipolecharge.cc:(.text+0x3bb): undefined reference to `deepmd::DeepTensor::compute(std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, int, deepmd::InputNlist const&)'
test_dipolecharge.cc:(.text+0x445): undefined reference to `deepmd::select_by_type(std::vector<int, std::allocator<int> >&, std::vector<int, std::allocator<int> >&, int&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, int const&, std::vector<int, std::allocator<int> > const&)'
test_dipolecharge.cc:(.text+0x4e0): undefined reference to `void deepmd::select_map<int>(std::vector<int, std::allocator<int> >&, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, int const&)'
test_dipolecharge.cc:(.text+0x57d): undefined reference to `deepmd::AtomMap<double>::AtomMap(__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >)'
test_dipolecharge.cc:(.text+0x117d): undefined reference to `deepmd::DipoleChargeModifier::compute(std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> > const&, std::vector<int, std::allocator<int> > const&, std::vector<double, std::allocator<double> > const&, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > > const&, std::vector<double, std::allocator<double> > const&, int, deepmd::InputNlist const&)'
CMakeFiles/runUnitTests.dir/test_dipolecharge.cc.o: In function `deepmd::DipoleChargeModifier::~DipoleChargeModifier()':
test_dipolecharge.cc:(.text._ZN6deepmd20DipoleChargeModifierD2Ev[_ZN6deepmd20DipoleChargeModifierD5Ev]+0x3c): undefined reference to `tensorflow::GraphDef::~GraphDef()'
CMakeFiles/runUnitTests.dir/test_dipolecharge.cc.o: In function `TestDipoleCharge::SetUp()':
test_dipolecharge.cc:(.text._ZN16TestDipoleCharge5SetUpEv[_ZN16TestDipoleCharge5SetUpEv]+0xa2): undefined reference to `google::protobuf::io::FileInputStream::FileInputStream(int, int)'
test_dipolecharge.cc:(.text._ZN16TestDipoleCharge5SetUpEv[_ZN16TestDipoleCharge5SetUpEv]+0xb8): undefined reference to `tensorflow::GraphDef::GraphDef()'
test_dipolecharge.cc:(.text._ZN16TestDipoleCharge5SetUpEv[_ZN16TestDipoleCharge5SetUpEv]+0xd1): undefined reference to `google::protobuf::TextFormat::Parse(google::protobuf::io::ZeroCopyInputStream*, google::protobuf::Message*)'
test_dipolecharge.cc:(.text._ZN16TestDipoleCharge5SetUpEv[_ZN16TestDipoleCharge5SetUpEv]+0x191): undefined reference to `google::protobuf::MessageLite::SerializeToOstream(std::ostream*) const'
test_dipolecharge.cc:(.text._ZN16TestDipoleCharge5SetUpEv[_ZN16TestDipoleCharge5SetUpEv]+0x1f0): undefined reference to `deepmd::DeepTensor::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
test_dipolecharge.cc:(.text._ZN16TestDipoleCharge5SetUpEv[_ZN16TestDipoleCharge5SetUpEv]+0x26d): undefined reference to `deepmd::DipoleChargeModifier::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
test_dipolecharge.cc:(.text._ZN16TestDipoleCharge5SetUpEv[_ZN16TestDipoleCharge5SetUpEv]+0x54d): undefined reference to `tensorflow::GraphDef::~GraphDef()'
test_dipolecharge.cc:(.text._ZN16TestDipoleCharge5SetUpEv[_ZN16TestDipoleCharge5SetUpEv]+0x6c1): undefined reference to `tensorflow::GraphDef::~GraphDef()'
CMakeFiles/runUnitTests.dir/test_dipolecharge.cc.o: In function `TestDipoleCharge::TestDipoleCharge()':
test_dipolecharge.cc:(.text._ZN16TestDipoleChargeC2Ev[_ZN16TestDipoleChargeC5Ev]+0x2bc): undefined reference to `deepmd::DeepTensor::DeepTensor()'
test_dipolecharge.cc:(.text._ZN16TestDipoleChargeC2Ev[_ZN16TestDipoleChargeC5Ev]+0x2ce): undefined reference to `deepmd::DipoleChargeModifier::DipoleChargeModifier()'
/usr/bin/ld: runUnitTests: hidden symbol `cudaFree' in /usr/local/cuda-11.0/lib64/libcudart_static.a(libcudart_static.a.o) is referenced by DSO
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
CMakeFiles/runUnitTests.dir/build.make:177: recipe for target 'runUnitTests' failed
make[2]: *** [runUnitTests] Error 1
CMakeFiles/Makefile2:138: recipe for target 'CMakeFiles/runUnitTests.dir/all' failed
make[1]: *** [CMakeFiles/runUnitTests.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

Then, in CPU environment: cmake works well too:

-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Supported model version: 1.0 
-- Enabled cpp interface build, looking for tensorflow_cc and tensorflow_framework
-- Found TensorFlow: /home/LuDh/dp-devel/tensorflow_root/include;/home/LuDh/dp-devel/tensorflow_root/include, /home/LuDh/dp-devel/tensorflow_root/lib/libtensorflow_cc.so;/home/LuDh/dp-devel/tensorflow_root/lib/libtensorflow_framework.so, /home/LuDh/dp-devel/tensorflow_root/lib/libtensorflow_framework.so  in /home/LuDh/dp-devel/tensorflow_root;/home/LuDh/dp-devel/tensorflow_root/../tensorflow_core;/home/LuDh/dp-devel/tensorflow_root;/home/LuDh/dp-devel/tensorflow_root/../tensorflow_core;/usr/;/usr/local/
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found OpenMP_C: -fopenmp (found version "4.0") 
-- Found OpenMP_CXX: -fopenmp (found version "4.0") 
-- Found OpenMP: TRUE (found version "4.0")  
-- Will not build nv GPU support
-- Found GTest: /usr/lib/libgtest.a  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/LuDh/dp-devel/deepmd-kit/source/api_cc/tests/build

then, we compile the unittest program:

Scanning dependencies of target deepmd_api
Scanning dependencies of target deepmd_op
Scanning dependencies of target deepmd
[  1%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/ewald.cc.o
[  3%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/SimulationRegion.cpp.o
[  5%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/coord.cc.o
[  7%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/env_mat.cc.o
[  8%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/fmt_nlist.cc.o
[ 10%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/map_aparam.cc.o
[ 12%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/gelu.cc.o
[ 14%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/neighbor_list.cc.o
[ 15%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/pair_tab.cc.o
[ 17%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/prod_env_mat.cc.o
[ 19%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/prod_force.cc.o
[ 21%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/prod_force_grad.cc.o
[ 22%] Building CXX object CMakeFiles/deepmd_api.dir/home/LuDh/dp-devel/deepmd-kit/source/api_cc/src/AtomMap.cc.o
[ 24%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/prod_virial.cc.o
[ 26%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/prod_virial_grad.cc.o
[ 28%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/region.cc.o
[ 29%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/soft_min_switch.cc.o
[ 31%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/soft_min_switch_force.cc.o
[ 33%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/soft_min_switch_force_grad.cc.o
[ 35%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/soft_min_switch_virial.cc.o
[ 36%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/descrpt.cc.o
[ 40%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/tabulate.cc.o
[ 40%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/soft_min_switch_virial_grad.cc.o
[ 42%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/descrpt_se_a_ef.cc.o
[ 43%] Building CXX object CMakeFiles/deepmd.dir/home/LuDh/dp-devel/deepmd-kit/source/lib/src/utilities.cc.o
[ 47%] Building CXX object CMakeFiles/deepmd_api.dir/home/LuDh/dp-devel/deepmd-kit/source/api_cc/src/DataModifier.cc.o
[ 47%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/descrpt_se_a_ef_para.cc.o
[ 49%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/descrpt_se_a_ef_vert.cc.o
[ 50%] Building CXX object CMakeFiles/deepmd_api.dir/home/LuDh/dp-devel/deepmd-kit/source/api_cc/src/DeepPot.cc.o
[ 52%] Building CXX object CMakeFiles/deepmd_api.dir/home/LuDh/dp-devel/deepmd-kit/source/api_cc/src/DeepTensor.cc.o
[ 54%] Building CXX object CMakeFiles/deepmd_api.dir/home/LuDh/dp-devel/deepmd-kit/source/api_cc/src/common.cc.o
[ 56%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/ewald_recp.cc.o
[ 57%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/map_aparam.cc.o
[ 59%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/gelu_multi_device.cc.o
[ 61%] Linking CXX shared library libdeepmd.so
Warning: Unused direct dependencies:
        /lib/x86_64-linux-gnu/libpthread.so.0
[ 61%] Built target deepmd
[ 63%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/neighbor_stat.cc.o
[ 64%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/pair_tab.cc.o
[ 66%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/prod_env_mat_multi_device.cc.o
[ 68%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/prod_force.cc.o
[ 70%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/prod_force_multi_device.cc.o
[ 71%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/prod_virial.cc.o
[ 73%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/prod_virial_multi_device.cc.o
[ 75%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/soft_min.cc.o
[ 77%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/soft_min_force.cc.o
[ 78%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/soft_min_virial.cc.o
[ 80%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/tabulate_multi_device.cc.o
[ 82%] Building CXX object CMakeFiles/deepmd_op.dir/home/LuDh/dp-devel/deepmd-kit/source/op/unaggregated_grad.cc.o
[ 84%] Linking CXX shared library libdeepmd_api.so
Warning: Unused direct dependencies:
        /home/LuDh/anaconda3/lib/libgomp.so.1
        /lib/x86_64-linux-gnu/libpthread.so.0
[ 84%] Built target deepmd_api
[ 85%] Linking CXX shared library libdeepmd_op.so
Warning: Unused direct dependencies:
        /lib/x86_64-linux-gnu/libpthread.so.0
[ 85%] Built target deepmd_op
Scanning dependencies of target runUnitTests
[ 87%] Building CXX object CMakeFiles/runUnitTests.dir/test_deepdipole.cc.o
[ 89%] Building CXX object CMakeFiles/runUnitTests.dir/test_deeppolar.cc.o
[ 91%] Building CXX object CMakeFiles/runUnitTests.dir/test_deeppot_a.cc.o
[ 92%] Building CXX object CMakeFiles/runUnitTests.dir/test_deeppot_model_devi.cc.o
[ 94%] Building CXX object CMakeFiles/runUnitTests.dir/test_deeppot_r.cc.o
[ 96%] Building CXX object CMakeFiles/runUnitTests.dir/test_dipolecharge.cc.o
[ 98%] Building CXX object CMakeFiles/runUnitTests.dir/test_ewald.cc.o
[100%] Linking CXX executable runUnitTests
Warning: Unused direct dependencies:
        /home/LuDh/dp-devel/deepmd-kit/source/api_cc/tests/build/libdeepmd_op.so
        /home/LuDh/anaconda3/lib/libgomp.so.1
[100%] Built target runUnitTests

errors occur when running the ut program:

(tensorflow_venv) LuDh build $ ./runUnitTests 
Running main() from /home/LuDh/software/googletest/googletest/src/gtest_main.cc
[==========] Running 25 tests from 9 test suites.
[----------] Global test environment set-up.
[----------] 2 tests from TestInferDeepDipole
[ RUN      ] TestInferDeepDipole.cpu_build_nlist
Invalid argument: Session was not created with a graph before Run()!

Further Information, Files, and Links

njzjz commented 3 years ago

I have a question... You said your gcc was 7.3.0, but cmake detected 5.4.0?

-- The C compiler identification is GNU 5.4.0 -- The CXX compiler identification is GNU 5.4.0

denghuilu commented 3 years ago

I have a question... You said your gcc was 7.3.0, but cmake detected 5.4.0?

-- The C compiler identification is GNU 5.4.0 -- The CXX compiler identification is GNU 5.4.0

That was a mistake, gcc7.3 was activated by conda environment, but the default gcc5.4.0(ubuntu 16.04) was detected by cmake actually.

denghuilu commented 3 years ago

@amcadmus you can close this issue now, all UTs(both CPU and GPU environment) have passed in api_cc