-
Notifications
You must be signed in to change notification settings - Fork 574
Description
Summary
Some compile options listed on https://docs.deepmodeling.com/projects/deepmd/en/v3.1.0a0/install/install-gromacs.html were incorrect, which could cause confusion. I provide a new script here for GROMACS users who wants to try DPA-3.
DeePMD-kit Version
3.1.0
Backend and its version
TensorFlow
Python Version, CUDA Version, GCC Version, LAMMPS Version, etc
Python Version: 3.13
CUDA Version: 12.8
GCC & G++ : 9
GROMACS Version: 2020.2
Details
`# Download and unpack Deepmd-kit's source code
cd /deepmd_source_dir/source
mkdir build
cd build
Check CMAKE version.
cmake --version
The installation requires CMake 3.16 or later for the CPU version, CMake 3.23 or later for the CUDA support, and CMake 3.21 or later for the ROCM support.
One can install CMake via pip if it is not installed or the installed version does not satisfy the requirement:
pip install -U cmake
You must enable at least one backend. If you enable two or more backends, these backend libraries must be built in a compatible way, e.g. using the same _GLIBCXX_USE_CXX11_ABI flag.
Export the path of cuda toolkit in this shell. Not recommended fix it to .bashrc.
export PATH=$PATH:/usr/local/cuda-12.8/bin
cmake -DUSE_CUDA_TOOLKIT=ON -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-12.8 -DCMAKE_CUDA_ARCHITECTURES=120 -DENABLE_TENSORFLOW=TRUE -DUSE_TF_PYTHON_LIBS=TRUE -DCMAKE_INSTALL_PREFIX=/dir/to/deepmd_venv ..
make
make install
Patch source code of GROMACS.
dp_gmx_patch -d /gromacs_source_code_root -v 2020.2 -p
Compile GROMACS with deepmd-kit.
export CMAKE_PREFIX_PATH=/home/mornight/manually-packages/fftw3310
In order to compile this very old version of GROMACS, you need to lower the version of compilers.
export CC=/usr/bin/gcc-9
export CXX=/usr/bin/g++-9
cd /gromacs_source_code_root
mkdir build
cd build
cmake .. -DGMX_MPI=ON -DGMX_GPU=ON -DGMX_SIMD=AVX2_256 -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-12.8 -DCMAKE_INSTALL_PREFIX=/home/mornight/manually-packages/gromacs-2020.2-deepmd -DGMX_FFT_LIBRARY=fftw
make
make install`