Skip to content

lmp in 2.1.3 make unrecognized pair error #1809

Closed

Description

@pee8379

Bug summary

I try to continue training model (from deepmd-kit 2.1.1, dpgen 0.10.5), using newly released 2.1.3. (offline package deepmd-kit-2.1.3-cuda10.2_gpu-Linux-x86_64.sh )

dpgen process failed to run, (task 4) with [unrecognized pair style] error in lmp log file.

DeePMD-kit Version

2.1.3

TensorFlow Version

How did you download the software?

Offline packages

Input Files, Running Commands, Error Log, etc.

dpgen 0.10.5
call lmp by
"model_devi":[ "command": "/DeepMD-kit-location/deepmd-kit-2.1.1-cu10.2/bin/lmp"
in machine json file.

Steps to Reproduce

Further Information, Files, and Links

No response

Pinned by njzjz

Activity

  1. njzjz commented on Jul 2, 2022

    @njzjz
    Member

    Please activate the environment first:

    conda activate /path/to/deepmd-kit

    (source activate /path/to/deepmd-kit or source /path/to/deepmd-kit/bin/activate /path/to/deepmd-kit may also work)

    By activating the conda environment, several environment variables can be set correctly.

  2. linked a pull request that will close this issueimprove conda installation in the documentation #1808on Jul 2, 2022
  3. added and removed on Jul 2, 2022
  4. pinned this issue on Jul 2, 2022
  5. r-hou commented on Oct 20, 2023

    @r-hou

    it helps nothing, I did activate the environment, otherwise how could I use "lmp -h", it doesn't show deepmd pair_style

  6. njzjz commented on Oct 20, 2023

    @njzjz
    Member

    it helps nothing, I did activate the environment, otherwise how could I use "lmp -h", it doesn't show deepmd pair_style

    Currently, lmp -h only lists built-in styles, but no plugged styles. This part of the codes is maintained by LAMMPS.

  7. hyuqing11 commented on Nov 29, 2023

    @hyuqing11

    I have activated the environment but I still get the error message: "ERROR: Unrecognized pair style 'deepmd' (src/force.cpp:271)" Do you have any suggestions?

  8. njzjz commented on Nov 29, 2023

    @njzjz
    Member

    I have activated the environment but I still get the error message: "ERROR: Unrecognized pair style 'deepmd' (src/force.cpp:271)" Do you have any suggestions?

    @hyuqing11 If it was installed from conda-forge or the offline package released recently, the problem has been resolved in conda-forge/deepmd-kit-feedstock#63.


    During the activation process, the environment variable LAMMPS_PLUGIN_PATH will be set, so it can also be manually set instead:

    export LAMMPS_PLUGIN_PATH=$CONDA_PREFIX/lib/deepmd_lmp
  9. hyuqing11 commented on Nov 30, 2023

    @hyuqing11

    Thank you for your help. However, I encountered an issue after setting the LAMMPS_PLUGIN_PATH. The error message I received is as follows: "Open of file /test_env4/lib/deepmd_lmp/dpplugin.so failed: libabsl_status.so.2301.0.0: cannot open shared object file: No such file or directory." Do you have any suggestions?

  10. chazeon commented on Dec 2, 2023

    @chazeon
    Contributor

    @njzjz @hyuqing11

    I have encounter the same kind of problem today.
    The deepmd_lmp/dpplugin.so from the current conda-forge version of deepmd-kit does not has proper rpath and needed shared library information.

    After installation, a temporary patch can be done with patchelf by

    cd $CONDA_PREFIX/lib
    patchelf --add-rpath '$ORIGIN/..' deepmd_lmp/dpplugin.so
    patchelf --add-needed liblammps.so deepmd_lmp/dpplugin.so

    My deepmd-kit version and build is

    deepmd-kit                2.2.7           cuda118py310h49a02c8_3    conda-forge
    
  11. njzjz commented on Dec 2, 2023

    @njzjz
    Member

    The deepmd_lmp/dpplugin.so from the current conda-forge version of deepmd-kit does not has proper rpath and needed shared library information.

    I know @Yi-FanLi had this issue before, but he compiled LAMMPS himself. @chazeon Did you use conda-forge's LAMMPS or others?

  12. chazeon commented on Dec 2, 2023

    @chazeon
    Contributor

    I know @Yi-FanLi had this issue before, but he compiled LAMMPS himself. @chazeon Did you use conda-forge's LAMMPS or others?

    Yes, I used conda-forge’s LAMMPS.

  13. njzjz commented on Dec 4, 2023

    @njzjz
    Member

    Yes, I used conda-forge’s LAMMPS.

    Do you use lmp_mpi or lmp_serial? lmp_serial in conda-forge does not provide a shared library (liblammps.so is built for MPI), which might be a problem and should not be used.

  14. Yi-FanLi commented on Dec 4, 2023

    @Yi-FanLi
    Collaborator

    Hi @chazeon, I used the following command to set up an environment:

    conda create -n dp2.2.7-gpu -c conda-forge deepmd-kit=*=cuda* lammps python=3.9 pip
    

    and used this command to run the task:

    module purge
    module load anaconda3/2020.11
    conda activate dp2.2.7-gpu
    lmp_mpi -in in.lammps
    

    It worked fine.
    Can you tell us how we can reproduce the issue?

  15. chazeon commented on Dec 5, 2023

    @chazeon
    Contributor

    @njzjz @Yi-FanLi
    I see. Currently, lmp_mpi indeed loads liblammps.so automatically and then loads the plugin correctly. I was fixing it because ldd or readelf does not list liblammps.so as a dependency.

    It's my fault. I spotted the missing .so because an earlier incompatible version of LAMMPS was installed by conda because of other dependencies pinned down the LAMMPS version. I tried to debug the .so file to look into its symbols. I wasn't aware that upgrading LAMMPS version has already fixed these issues.

  16. unpinned this issue on Oct 30, 2024
  17. pinned this issue on Dec 29, 2024
  18. unpinned this issue on Dec 29, 2024
  19. pinned this issue on Dec 29, 2024
  20. felix5572 commented on Jan 23, 2025

    @felix5572

    sometimes just add source ~/deepmd-kit/bin/activate ~/deepmd-kit/ works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions