build low and high precision at the same time#879
build low and high precision at the same time#879amcadmus merged 9 commits intodeepmodeling:develfrom
Conversation
We can only provide one package containing both precisions. BREAKING CHANGES: Python: Python package will build both precisions, and DP_FLOAT_PREC is now runtime envrionmental variables C++: CMake will build both library, which will be called something like libdeepmd and libdeepmd_low LAMMPS: generate two directory USER-DEEPMD and USER-DEEPMD_low ipi: generate two execuate dp_ipi and dp_ipi_low
Codecov Report
@@ Coverage Diff @@
## devel #879 +/- ##
==========================================
- Coverage 73.88% 73.85% -0.04%
==========================================
Files 85 85
Lines 6805 6811 +6
==========================================
+ Hits 5028 5030 +2
- Misses 1777 1781 +4
Continue to review full report at Codecov.
|
|
The name |
wait... Do you mean some libraries have already contained both high and low precision and are independent from |
No, the precision of the customized OPs are controlled by |
|
I can't find |
|
I think |
You are right, now customized OPs are built with both precs. |
|
I've reverted changes to |
| PREC_SUFFIX="" | ||
| else | ||
| PREC_DEF="-DLOW_PREC" | ||
| PREC_SUFFIX="_low" |
There was a problem hiding this comment.
Would it be better if I changed this to LOW?
When I compile LAMMPS I need to manually change the "_low" to "_LOW"
There was a problem hiding this comment.
What's the specific name do you mean you need to change? _low is used in 3 names, including -ldeepmd_cc_low, USER-DEEPMD_low, and ipi_low.
There was a problem hiding this comment.
I mean USER-DEEPMD_low.
Otherwise, the following error occurs
[ludh@login09 src]$ make yes-user-deepmd_Low
Package USER-DEEPMD_LOW does not exist
make: *** [Makefile:364: yes-user-deepmd_Low] Error 1
I have to do this:
mv USER-DEEPMD_low USER-DEEPMD_LOW
then
make yes-user-deepmd_low
Installing package user-deepmd_low
denghuilu
left a comment
There was a problem hiding this comment.
When I compile the deepmd-kit c++ interface through the following way, an error occurred:
- build deepmd-kit:
root deepmd-kit $ ls
codecov.yml data doc LICENSE README.md setup.cfg source
CONTRIBUTING.md deepmd examples pyproject.toml requirements.txt setup.py
root deepmd-kit $ cd source/
root source $ mkdir build
root source $ cd build/
root build $ cmake -DTENSORFLOW_ROOT=$tensorflow_root -DCMAKE_INSTALL_PREFIX=$deepmd_root -DUSE_CUDA_TOOLKIT=true ..
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.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
-- Found Git: /usr/bin/git (found version "2.17.1")
-- Supported model version: 1.0
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- 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 CUDA: /usr/local/cuda-11.2 (found version "11.2")
-- Found CUDA in /usr/local/cuda-11.2, build nv GPU support
-- Will not build AMD GPU support
-- Enabled cpp interface build, looking for tensorflow_cc and tensorflow_framework
-- Found TensorFlow: /root/softwares/tensorflow-2.4.0/include;/root/softwares/tensorflow-2.4.0/include, /root/softwares/tensorflow-2.4.0/lib/libtensorflow_cc.so;/root/softwares/tensorflow-2.4.0/lib/libtensorflow_framework.so, /root/softwares/tensorflow-2.4.0/lib/libtensorflow_framework.so in /root/softwares/tensorflow-2.4.0;/root/softwares/tensorflow-2.4.0/../tensorflow_core;/root/softwares/tensorflow-2.4.0;/root/softwares/tensorflow-2.4.0/../tensorflow_core;/usr/;/usr/local/ (found version "2.4.0")
-- Automatically determined OP_CXX_ABI=1
-- Set GLIBCXX_USE_CXX_ABI=1 when compiling ops
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- CUDA major version is 11
-- Configuring done
-- Generating done
-- Build files have been written to: /root/dp-devel/deepmd-kit/source/build
root build $ make install -j12
[ 1%] Building NVCC (Device) object lib/src/cuda/CMakeFiles/deepmd_op_cuda.dir/deepmd_op_cuda_generated_tabulate.cu.o
Scanning dependencies of target deepmd_cc_low
Scanning dependencies of target deepmd_op
[ 2%] Building NVCC (Device) object lib/src/cuda/CMakeFiles/deepmd_op_cuda.dir/deepmd_op_cuda_generated_gelu.cu.o
[ 4%] Building NVCC (Device) object lib/src/cuda/CMakeFiles/deepmd_op_cuda.dir/deepmd_op_cuda_generated_coord.cu.o
Scanning dependencies of target deepmd_cc
Scanning dependencies of target deepmd_ipi_low
[ 5%] Building NVCC (Device) object lib/src/cuda/CMakeFiles/deepmd_op_cuda.dir/deepmd_op_cuda_generated_prod_env_mat.cu.o
[ 7%] Building NVCC (Device) object lib/src/cuda/CMakeFiles/deepmd_op_cuda.dir/deepmd_op_cuda_generated_neighbor_list.cu.o
Scanning dependencies of target deepmd_ipi
[ 8%] Building NVCC (Device) object lib/src/cuda/CMakeFiles/deepmd_op_cuda.dir/deepmd_op_cuda_generated_prod_force_grad.cu.o
[ 9%] Building NVCC (Device) object lib/src/cuda/CMakeFiles/deepmd_op_cuda.dir/deepmd_op_cuda_generated_prod_force.cu.o
[ 11%] Building CXX object ipi/CMakeFiles/deepmd_ipi.dir/src/Convert.cc.o
[ 12%] Building CXX object ipi/CMakeFiles/deepmd_ipi_low.dir/src/Convert.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).
[ 15%] Building CXX object api_cc/CMakeFiles/deepmd_cc_low.dir/src/AtomMap.cc.o
[ 15%] Building CXX object api_cc/CMakeFiles/deepmd_cc.dir/src/AtomMap.cc.o
[ 16%] Building CXX object op/CMakeFiles/deepmd_op.dir/prod_force.cc.o
[ 18%] Building CXX object api_cc/CMakeFiles/deepmd_cc.dir/src/DataModifier.cc.o
[ 19%] Building CXX object api_cc/CMakeFiles/deepmd_cc_low.dir/src/DataModifier.cc.o
[ 22%] Building CXX object ipi/CMakeFiles/deepmd_ipi_low.dir/src/XyzFileManager.cc.o
[ 22%] Building CXX object ipi/CMakeFiles/deepmd_ipi.dir/src/XyzFileManager.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).
[ 23%] Building C object ipi/CMakeFiles/deepmd_ipi.dir/src/sockets.c.o
[ 25%] Building C object ipi/CMakeFiles/deepmd_ipi_low.dir/src/sockets.c.o
[ 26%] Linking CXX shared library libdeepmd_ipi.so
[ 28%] Linking CXX shared library libdeepmd_ipi_low.so
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).
Warning: Unused direct dependencies:
/lib/x86_64-linux-gnu/libm.so.6
/usr/lib/x86_64-linux-gnu/libgomp.so.1
Warning: Unused direct dependencies:
/lib/x86_64-linux-gnu/libm.so.6
/usr/lib/x86_64-linux-gnu/libgomp.so.1
[ 28%] Built target deepmd_ipi
[ 28%] Built target deepmd_ipi_low
[ 29%] Building CXX object api_cc/CMakeFiles/deepmd_cc_low.dir/src/DeepPot.cc.o
[ 30%] Building CXX object api_cc/CMakeFiles/deepmd_cc.dir/src/DeepPot.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).
[ 32%] Building CXX object op/CMakeFiles/deepmd_op.dir/prod_virial.cc.o
[ 33%] Building CXX object api_cc/CMakeFiles/deepmd_cc_low.dir/src/DeepTensor.cc.o
[ 35%] Building CXX object api_cc/CMakeFiles/deepmd_cc.dir/src/DeepTensor.cc.o
[ 36%] Building NVCC (Device) object lib/src/cuda/CMakeFiles/deepmd_op_cuda.dir/deepmd_op_cuda_generated_prod_virial.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 NVCC (Device) object lib/src/cuda/CMakeFiles/deepmd_op_cuda.dir/deepmd_op_cuda_generated_prod_virial_grad.cu.o
[ 39%] Building NVCC (Device) object lib/src/cuda/CMakeFiles/deepmd_op_cuda.dir/deepmd_op_cuda_generated_region.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).
[ 40%] Building CXX object op/CMakeFiles/deepmd_op.dir/descrpt.cc.o
[ 42%] Building CXX object op/CMakeFiles/deepmd_op.dir/prod_env_mat_multi_device.cc.o
[ 43%] Building CXX object api_cc/CMakeFiles/deepmd_cc_low.dir/src/common.cc.o
[ 45%] Building CXX object api_cc/CMakeFiles/deepmd_cc.dir/src/common.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).
[ 46%] Building CXX object op/CMakeFiles/deepmd_op.dir/pair_tab.cc.o
[ 47%] Building CXX object op/CMakeFiles/deepmd_op.dir/prod_force_multi_device.cc.o
[ 49%] Building CXX object op/CMakeFiles/deepmd_op.dir/prod_virial_multi_device.cc.o
[ 50%] Building CXX object op/CMakeFiles/deepmd_op.dir/soft_min.cc.o
[ 52%] Building CXX object op/CMakeFiles/deepmd_op.dir/soft_min_force.cc.o
[ 53%] Building CXX object op/CMakeFiles/deepmd_op.dir/soft_min_virial.cc.o
[ 54%] Building CXX object op/CMakeFiles/deepmd_op.dir/gelu_multi_device.cc.o
[ 56%] Building CXX object op/CMakeFiles/deepmd_op.dir/tabulate_multi_device.cc.o
[ 57%] Linking CXX shared library libdeepmd_cc_low.so
[ 59%] Linking CXX shared library libdeepmd_cc.so
Warning: Unused direct dependencies:
/usr/lib/x86_64-linux-gnu/libgomp.so.1
[ 59%] Built target deepmd_cc_low
Warning: Unused direct dependencies:
/usr/lib/x86_64-linux-gnu/libgomp.so.1
[ 59%] Built target deepmd_cc
Scanning dependencies of target deepmd_op_cuda
[ 60%] Linking CXX shared library libdeepmd_op_cuda.so
Warning: Unused direct dependencies:
/lib/x86_64-linux-gnu/libm.so.6
/usr/lib/x86_64-linux-gnu/libgomp.so.1
[ 60%] Built target deepmd_op_cuda
Scanning dependencies of target deepmd
[ 64%] Building CXX object lib/CMakeFiles/deepmd.dir/src/coord.cc.o
[ 64%] Building CXX object lib/CMakeFiles/deepmd.dir/src/env_mat.cc.o
[ 64%] Building CXX object lib/CMakeFiles/deepmd.dir/src/ewald.cc.o
[ 66%] Building CXX object lib/CMakeFiles/deepmd.dir/src/gelu.cc.o
[ 69%] Building CXX object lib/CMakeFiles/deepmd.dir/src/fmt_nlist.cc.o
[ 69%] Building CXX object lib/CMakeFiles/deepmd.dir/src/map_aparam.cc.o
[ 70%] Building CXX object lib/CMakeFiles/deepmd.dir/src/neighbor_list.cc.o
[ 71%] Building CXX object lib/CMakeFiles/deepmd.dir/src/pair_tab.cc.o
[ 73%] Building CXX object lib/CMakeFiles/deepmd.dir/src/prod_env_mat.cc.o
[ 74%] Building CXX object lib/CMakeFiles/deepmd.dir/src/prod_force.cc.o
[ 76%] Building CXX object lib/CMakeFiles/deepmd.dir/src/prod_force_grad.cc.o
[ 77%] Building CXX object lib/CMakeFiles/deepmd.dir/src/prod_virial.cc.o
[ 78%] Building CXX object lib/CMakeFiles/deepmd.dir/src/prod_virial_grad.cc.o
[ 80%] Building CXX object lib/CMakeFiles/deepmd.dir/src/region.cc.o
[ 81%] Building CXX object lib/CMakeFiles/deepmd.dir/src/soft_min_switch.cc.o
[ 83%] Building CXX object lib/CMakeFiles/deepmd.dir/src/soft_min_switch_force.cc.o
[ 84%] Building CXX object lib/CMakeFiles/deepmd.dir/src/soft_min_switch_force_grad.cc.o
[ 85%] Building CXX object lib/CMakeFiles/deepmd.dir/src/soft_min_switch_virial.cc.o
[ 87%] Building CXX object lib/CMakeFiles/deepmd.dir/src/soft_min_switch_virial_grad.cc.o
[ 88%] Building CXX object lib/CMakeFiles/deepmd.dir/src/tabulate.cc.o
[ 90%] Building CXX object lib/CMakeFiles/deepmd.dir/src/utilities.cc.o
[ 91%] Building CXX object lib/CMakeFiles/deepmd.dir/src/SimulationRegion.cpp.o
[ 92%] Linking CXX shared library libdeepmd.so
Warning: Unused direct dependencies:
/root/dp-devel/deepmd-kit/source/build/lib/src/cuda/libdeepmd_op_cuda.so
[ 92%] Built target deepmd
[ 94%] Linking CXX shared library libdeepmd_op.so
[ 94%] Built target deepmd_op
Scanning dependencies of target dp_ipi
Scanning dependencies of target dp_ipi_low
[ 97%] Building CXX object ipi/CMakeFiles/dp_ipi.dir/driver.cc.o
[ 97%] Building CXX object ipi/CMakeFiles/dp_ipi_low.dir/driver.cc.o
[ 98%] Linking CXX executable dp_ipi_low
[100%] Linking CXX executable dp_ipi
Warning: Unused direct dependencies:
/root/dp-devel/deepmd-kit/source/build/op/libdeepmd_op.so
/root/softwares/tensorflow-2.4.0/lib/libtensorflow_cc.so.2
/root/softwares/tensorflow-2.4.0/lib/libtensorflow_framework.so.2
/root/dp-devel/deepmd-kit/source/build/lib/src/cuda/libdeepmd_op_cuda.so
/lib/x86_64-linux-gnu/libdl.so.2
/lib/x86_64-linux-gnu/librt.so.1
/lib/x86_64-linux-gnu/libm.so.6
/usr/lib/x86_64-linux-gnu/libgomp.so.1
Warning: Unused direct dependencies:
/root/dp-devel/deepmd-kit/source/build/op/libdeepmd_op.so
/root/softwares/tensorflow-2.4.0/lib/libtensorflow_cc.so.2
/root/softwares/tensorflow-2.4.0/lib/libtensorflow_framework.so.2
/root/dp-devel/deepmd-kit/source/build/lib/src/cuda/libdeepmd_op_cuda.so
/lib/x86_64-linux-gnu/libdl.so.2
/lib/x86_64-linux-gnu/librt.so.1
/lib/x86_64-linux-gnu/libm.so.6
/usr/lib/x86_64-linux-gnu/libgomp.so.1
[100%] Built target dp_ipi_low
[100%] Built target dp_ipi
Install the project...
-- Install configuration: "release"
-- Installing: /root/dp-devel/deepmd_root/lib/libdeepmd_op.so
-- Installing: /root/dp-devel/deepmd_root/lib/libdeepmd.so
-- Set runtime path of "/root/dp-devel/deepmd_root/lib/libdeepmd.so" to ""
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/ComputeDescriptor.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/DeviceFunctor.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/SimulationRegion.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/SimulationRegion_Impl.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/coord.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/device.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/env_mat.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/ewald.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/fmt_nlist.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/gelu.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/gpu_cuda.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/gpu_rocm.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/map_aparam.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/neighbor_list.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/pair_tab.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/prod_env_mat.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/prod_force.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/prod_force_grad.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/prod_virial.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/prod_virial_grad.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/region.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/soft_min_switch.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/soft_min_switch_force.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/soft_min_switch_force_grad.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/soft_min_switch_virial.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/soft_min_switch_virial_grad.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/switcher.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/tabulate.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/utilities.h
-- Installing: /root/dp-devel/deepmd_root/lib/libdeepmd_op_cuda.so
-- Installing: /root/dp-devel/deepmd_root/lib/libdeepmd_cc.so
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/AtomMap.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/DataModifier.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/DeepPot.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/DeepTensor.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/common.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/custom_op.h
-- Installing: /root/dp-devel/deepmd_root/include/deepmd/version.h
-- Installing: /root/dp-devel/deepmd_root/lib/libdeepmd_cc_low.so
-- Up-to-date: /root/dp-devel/deepmd_root/include/deepmd/AtomMap.h
-- Up-to-date: /root/dp-devel/deepmd_root/include/deepmd/DataModifier.h
-- Up-to-date: /root/dp-devel/deepmd_root/include/deepmd/DeepPot.h
-- Up-to-date: /root/dp-devel/deepmd_root/include/deepmd/DeepTensor.h
-- Up-to-date: /root/dp-devel/deepmd_root/include/deepmd/common.h
-- Up-to-date: /root/dp-devel/deepmd_root/include/deepmd/custom_op.h
-- Up-to-date: /root/dp-devel/deepmd_root/include/deepmd/version.h
-- Installing: /root/dp-devel/deepmd_root/lib/libdeepmd_ipi.so
-- Installing: /root/dp-devel/deepmd_root/bin/dp_ipi
-- Set runtime path of "/root/dp-devel/deepmd_root/bin/dp_ipi" to "$ORIGIN/../lib:/root/softwares/tensorflow-2.4.0/lib:/root/softwares/tensorflow-2.4.0/lib"
-- Installing: /root/dp-devel/deepmd_root/lib/libdeepmd_ipi_low.so
-- Installing: /root/dp-devel/deepmd_root/bin/dp_ipi_low
-- Set runtime path of "/root/dp-devel/deepmd_root/bin/dp_ipi_low" to "$ORIGIN/../lib:/root/softwares/tensorflow-2.4.0/lib:/root/softwares/tensorflow-2.4.0/lib"
- build lammps interface within deepmd-kit:
root build $ make lammps
-- Supported model version: 1.0
-- Found CUDA in /usr/local/cuda-11.2, build nv GPU support
-- Will not build AMD GPU support
-- Enabled cpp interface build, looking for tensorflow_cc and tensorflow_framework
-- Found TensorFlow: /root/softwares/tensorflow-2.4.0/include;/root/softwares/tensorflow-2.4.0/include, /root/softwares/tensorflow-2.4.0/lib/libtensorflow_cc.so;/root/softwares/tensorflow-2.4.0/lib/libtensorflow_framework.so, /root/softwares/tensorflow-2.4.0/lib/libtensorflow_framework.so in /root/softwares/tensorflow-2.4.0;/root/softwares/tensorflow-2.4.0/../tensorflow_core;/root/softwares/tensorflow-2.4.0;/root/softwares/tensorflow-2.4.0/../tensorflow_core;/usr/;/usr/local/ (found version "2.4.0")
-- Automatically determined OP_CXX_ABI=1
-- Set GLIBCXX_USE_CXX_ABI=1 when compiling ops
-- Found OpenMP_C: -fopenmp
-- Found OpenMP_CXX: -fopenmp
-- Found OpenMP: TRUE
-- CUDA major version is 11
-- Configuring done
-- Generating done
-- Build files have been written to: /root/dp-devel/deepmd-kit/source/build
Scanning dependencies of target lammps
-- Installing: /root/dp-devel/deepmd-kit/source/build/USER-DEEPMD/fix_dplr.h
-- Installing: /root/dp-devel/deepmd-kit/source/build/USER-DEEPMD/pppm_dplr.h
-- Installing: /root/dp-devel/deepmd-kit/source/build/USER-DEEPMD/fix_dplr.cpp
-- Installing: /root/dp-devel/deepmd-kit/source/build/USER-DEEPMD/pair_deepmd.cpp
-- Installing: /root/dp-devel/deepmd-kit/source/build/USER-DEEPMD/pppm_dplr.cpp
-- Installing: /root/dp-devel/deepmd-kit/source/build/USER-DEEPMD/Install.sh
-- Installing: /root/dp-devel/deepmd-kit/source/build/USER-DEEPMD/env.sh
-- Installing: /root/dp-devel/deepmd-kit/source/build/USER-DEEPMD/pair_deepmd.h
-- Installing: /root/dp-devel/deepmd-kit/source/build/USER-DEEPMD_low/fix_dplr.h
-- Installing: /root/dp-devel/deepmd-kit/source/build/USER-DEEPMD_low/pppm_dplr.h
-- Installing: /root/dp-devel/deepmd-kit/source/build/USER-DEEPMD_low/fix_dplr.cpp
-- Installing: /root/dp-devel/deepmd-kit/source/build/USER-DEEPMD_low/pair_deepmd.cpp
-- Installing: /root/dp-devel/deepmd-kit/source/build/USER-DEEPMD_low/pppm_dplr.cpp
-- Installing: /root/dp-devel/deepmd-kit/source/build/USER-DEEPMD_low/Install.sh
-- Installing: /root/dp-devel/deepmd-kit/source/build/USER-DEEPMD_low/env.sh
-- Installing: /root/dp-devel/deepmd-kit/source/build/USER-DEEPMD_low/pair_deepmd.h
Built target lammps
- build lammps package:
root build $ cd ../../../lammps/src
root src $ cp -r /root/dp-devel/deepmd-kit/source/build/USER-DEEPMD .
root src $ make yes-user-deepmd
Installing package user-deepmd
root src $ make mpi -j12
Gathering installed package information (may take a little while)
make[1]: Entering directory '/root/dp-devel/lammps/src'
Gathering git version information
make[1]: Leaving directory '/root/dp-devel/lammps/src'
Compiling LAMMPS for machine mpi
make[1]: Entering directory '/root/dp-devel/lammps/src/Obj_mpi'
cc -O -o fastdep.exe ../DEPEND/fastdep.c
make[1]: Leaving directory '/root/dp-devel/lammps/src/Obj_mpi'
make[1]: Entering directory '/root/dp-devel/lammps/src/Obj_mpi'
mpicxx -g -O3 -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -std=c++11 -D -I/root/softwares/tensorflow-2.4.0/include -I/root/softwares/tensorflow-2.4.0/include -I/root/dp-devel/deepmd_root/include/ -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c ../main.cpp
mpicxx -g -O3 -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -std=c++11 -D -I/root/softwares/tensorflow-2.4.0/include -I/root/softwares/tensorflow-2.4.0/include -I/root/dp-devel/deepmd_root/include/ -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c ../reader_xyz.cpp
mpicxx -g -O3 -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -std=c++11 -D -I/root/softwares/tensorflow-2.4.0/include -I/root/softwares/tensorflow-2.4.0/include -I/root/dp-devel/deepmd_root/include/ -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c ../compute_adf.cpp
mpicxx -g -O3 -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -std=c++11 -D -I/root/softwares/tensorflow-2.4.0/include -I/root/softwares/tensorflow-2.4.0/include -I/root/dp-devel/deepmd_root/include/ -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c ../pair_morse_smooth_linear.cpp
mpicxx -g -O3 -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -std=c++11 -D -I/root/softwares/tensorflow-2.4.0/include -I/root/softwares/tensorflow-2.4.0/include -I/root/dp-devel/deepmd_root/include/ -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c ../angle_deprecated.cpp
mpicxx -g -O3 -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -std=c++11 -D -I/root/softwares/tensorflow-2.4.0/include -I/root/softwares/tensorflow-2.4.0/include -I/root/dp-devel/deepmd_root/include/ -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c ../ewald.cpp
mpicxx -g -O3 -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -std=c++11 -D -I/root/softwares/tensorflow-2.4.0/include -I/root/softwares/tensorflow-2.4.0/include -I/root/dp-devel/deepmd_root/include/ -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c ../fix_dt_reset.cpp
mpicxx -g -O3 -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -std=c++11 -D -I/root/softwares/tensorflow-2.4.0/include -I/root/softwares/tensorflow-2.4.0/include -I/root/dp-devel/deepmd_root/include/ -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c ../fix_deform.cpp
mpicxx -g -O3 -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -std=c++11 -D -I/root/softwares/tensorflow-2.4.0/include -I/root/softwares/tensorflow-2.4.0/include -I/root/dp-devel/deepmd_root/include/ -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c ../bond_harmonic_shift.cpp
mpicxx -g -O3 -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -std=c++11 -D -I/root/softwares/tensorflow-2.4.0/include -I/root/softwares/tensorflow-2.4.0/include -I/root/dp-devel/deepmd_root/include/ -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c ../atom.cpp
mpicxx -g -O3 -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -std=c++11 -D -I/root/softwares/tensorflow-2.4.0/include -I/root/softwares/tensorflow-2.4.0/include -I/root/dp-devel/deepmd_root/include/ -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c ../meam_setup_param.cpp
mpicxx -g -O3 -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -std=c++11 -D -I/root/softwares/tensorflow-2.4.0/include -I/root/softwares/tensorflow-2.4.0/include -I/root/dp-devel/deepmd_root/include/ -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c ../nstencil_half_multi_2d_newton.cpp
<command-line>:0:1: error: macro names must be identifiers
<command-line>:0:1: error: macro names must be identifiers
<command-line>:0:1: error: macro names must be identifiers
<command-line>:0:1: error: macro names must be identifiers
<command-line>:0:1: error: macro names must be identifiers
<command-line>:0:1: error: macro names must be identifiers
<command-line>:0:1: error: macro names must be identifiers
<command-line>:0:1: error: macro names must be identifiers
<command-line>:0:1: error: macro names must be identifiers
<command-line>:0:1: error: macro names must be identifiers
<command-line>:0:1: error: macro names must be identifiers
<command-line>:0:1: error: macro names must be identifiers
Makefile:109: recipe for target 'meam_setup_param.o' failed
make[1]: *** [meam_setup_param.o] Error 1
make[1]: *** Waiting for unfinished jobs....
Makefile:109: recipe for target 'fix_dt_reset.o' failed
make[1]: *** [fix_dt_reset.o] Error 1
Makefile:109: recipe for target 'reader_xyz.o' failed
make[1]: *** [reader_xyz.o] Error 1
Makefile:109: recipe for target 'main.o' failed
make[1]: *** [main.o] Error 1
Makefile:109: recipe for target 'angle_deprecated.o' failed
make[1]: *** [angle_deprecated.o] Error 1
Makefile:109: recipe for target 'nstencil_half_multi_2d_newton.o' failed
make[1]: *** [nstencil_half_multi_2d_newton.o] Error 1
Makefile:109: recipe for target 'bond_harmonic_shift.o' failed
make[1]: *** [bond_harmonic_shift.o] Error 1
Makefile:109: recipe for target 'pair_morse_smooth_linear.o' failed
make[1]: *** [pair_morse_smooth_linear.o] Error 1
Makefile:109: recipe for target 'compute_adf.o' failed
make[1]: *** [compute_adf.o] Error 1
Makefile:109: recipe for target 'ewald.o' failed
make[1]: *** [ewald.o] Error 1
Makefile:109: recipe for target 'fix_deform.o' failed
make[1]: *** [fix_deform.o] Error 1
Makefile:109: recipe for target 'atom.o' failed
make[1]: *** [atom.o] Error 1
make[1]: Leaving directory '/root/dp-devel/lammps/src/Obj_mpi'
Makefile:195: recipe for target 'mpi' failed
make: *** [mpi] Error 2
And there's an empty -D within the Makefile.package :
# Settings for libraries used by specific LAMMPS packages
# this file is auto-edited when those packages are included/excluded
PKG_INC = -std=c++11 -D -I/root/softwares/tensorflow-2.4.0/include -I/root/softwares/tensorflow-2.4.0/include -I/root/dp-devel/deepmd_root/include/
PKG_PATH = -L/root/softwares/tensorflow-2.4.0/lib -L/root/softwares/tensorflow-2.4.0/lib -L/root/dp-devel/deepmd_root/lib
PKG_LIB = -Wl,--no-as-needed -ldeepmd_op_cuda -ldeepmd_op -ldeepmd_cc -ldeepmd -ltensorflow_cc -ltensorflow_framework -Wl,-rpath=/root/softwares/tensorflow-2.4.0/lib -Wl,-rpath=/root/softwares/tensorflow-2.4.0/lib -Wl,-rpath=/root/dp-devel/deepmd_root/lib
PKG_CPP_DEPENDS =
PKG_LINK_DEPENDS =
PKG_SYSINC =
PKG_SYSLIB =
PKG_SYSPATH =
Compile environment: Ubuntu-18.04; CUDA-11.2; TF-2.4.0-gpu; openmpi-4.1.1; cmake-3.10.2; gcc-7.5.0
|
right... Let me see. |
When I compile lammps on the ROCm platform, the same error occurs |
now `env.sh` and `env_low.sh` will be generated in the same directory. Users can easily `mv env_low.sh env.sh` if they need low precision.
|
I have no idea how to fix it, so I change the implementation: now |
denghuilu
left a comment
There was a problem hiding this comment.
Both high and low precision settings can be executed correctly within the training and MD processes. And all UTs have passed in the CUDA environment.
galeselee
left a comment
There was a problem hiding this comment.
There is no problem with compilation(low and high precision) and installation of python interface
Also all UTs have passed in the ROCm environment.(except for the error due to the TensorFlow problem) |
* build low and high precision at the same time We can only provide one package containing both precisions. BREAKING CHANGES: Python: Python package will build both precisions, and DP_FLOAT_PREC is now runtime envrionmental variables C++: CMake will build both library, which will be called something like libdeepmd and libdeepmd_low LAMMPS: generate two directory USER-DEEPMD and USER-DEEPMD_low ipi: generate two execuate dp_ipi and dp_ipi_low * fix LAMMPS build script * fix lammps cmake file * install LIB_DEEPMD_OP_VARIANT * remove FLOAT_PREC argument * change DP_FLOAT_PREC to DP_INTERFACE_PREC * revert some libraries as they do not need to build twice * update error message * change the implementation of LAMMPS variant now `env.sh` and `env_low.sh` will be generated in the same directory. Users can easily `mv env_low.sh env.sh` if they need low precision.
We can only provide one package containing both precision.
BREAKING CHANGES:
DP_INTERFACE_PRECis now runtime environmental variableslibdeepmd_ccandlibdeepmd_cc_lowUSER-DEEPMDandUSER-DEEPMD_lowdp_ipianddp_ipi_low