Skip to content

[BUG] No cmake file is generated for LAMMPS, when installing the pre-compiled C library #5035

@xwuupb

Description

@xwuupb

Bug summary

With the pre-compiled C library I installed DeePMD-kit by following the instructions here. Then, I tried to install LAMMPS with CMake (see instructions here). Then, I got the following error message:

CMake Error at /dev/shm/x/deepmd-kit-3.1.0/source/lmp/builtin.cmake:15 (find_package):
  By not providing "FindDeePMD.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "DeePMD", but
  CMake did not find one.

  Could not find a package configuration file provided by "DeePMD" with any
  of the following names:

    DeePMDConfig.cmake
    deepmd-config.cmake

  Add the installation prefix of "DeePMD" to CMAKE_PREFIX_PATH or set
  "DeePMD_DIR" to a directory containing one of the above files.  If "DeePMD"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  CMakeLists.txt:1121 (include)

Tested DeePMD-kit versions are 3.1.1 and 3.1.0.

However, if I compile DeePMD-kit from source code, the cmake file is generated for LAMMPS and can be found for compiling LAMMPS.

DeePMD-kit Version

3.1.1 and 3.1.0 are tested

Backend and its version

Pre-compiled C library

How did you download the software?

Others (write below)

Input Files, Running Commands, Error Log, etc.

  • use pre-compiled C library
  • no input files
  • Error log see above

Steps to Reproduce

Here are the steps:

#
# pre-compiled C library
#
wget https://github.com/deepmodeling/deepmd-kit/releases/download/v3.1.1/libdeepmd_c.tar.gz
tar xf libdeepmd_c.tar.gz
export path_libdeepmd_c=/dev/shm/x/libdeepmd_c
#
# DeePMD source
#
wget https://github.com/deepmodeling/deepmd-kit/archive/refs/tags/v3.1.1.tar.gz
tar xf v3.1.1.tar.gz
export deepmd_source_dir=/dev/shm/x/deepmd-kit-3.1.1
#
# install
#
cd $deepmd_source_dir/source
mkdir b && cd b
export deepmd_root=/dev/shm/y
cmake -DDEEPMD_C_ROOT=$path_libdeepmd_c -DCMAKE_INSTALL_PREFIX=$deepmd_root ..
make -j 8 && make install
#
# find no cmake file for LAMMPS
#
find $deepmd_root -iname "*cmake*"

Further Information, Files, and Links

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions