ACEsuit / mace

MACE - Fast and accurate machine learning interatomic potentials with higher order equivariant message passing.
Other
412 stars 155 forks source link

Problem in Compiling Lammps for GPU version #463

Closed XiaoTongDeng closed 2 weeks ago

XiaoTongDeng commented 2 weeks ago

when I compiled the lammps in GPU,the following error occured:

-- Configuring done CMake Error in CMakeLists.txt: Imported target "torch" includes non-existent path

"/home/laniakea/Projects/lammps/cmake/MKL_INCLUDE_DIR-NOTFOUND"

in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

CMake Warning at CMakeLists.txt:208 (add_library): Cannot generate a safe runtime search path for target lammps because files in some directories may conflict with libraries in implicit directories:

runtime library [libpng16.so.16] in /usr/lib64 may be hidden by files in:
  /home/laniakea/deepmd-kit/lib
runtime library [libz.so.1] in /usr/lib64 may be hidden by files in:
  /home/laniakea/deepmd-kit/lib
runtime library [libnvToolsExt.so.1] in /usr/local/cuda/lib64 may be hidden by files in:
  /home/laniakea/deepmd-kit/lib
runtime library [libgomp.so.1] in /usr/lib/gcc/x86_64-redhat-linux/11 may be hidden by files in:
  /home/laniakea/deepmd-kit/lib

Some of these libraries may not be found correctly.

CMake Warning at CMakeLists.txt:215 (add_executable): Cannot generate a safe runtime search path for target lmp because files in some directories may conflict with libraries in implicit directories:

runtime library [libgomp.so.1] in /usr/lib/gcc/x86_64-redhat-linux/11 may be hidden by files in:
  /home/laniakea/deepmd-kit/lib

Some of these libraries may not be found correctly.

-- Generating done CMake Generate step failed. Build files cannot be regenerated correctly.

wcwitt commented 2 weeks ago

There is a small part of Torch that searches for MKL and refuses to build if it can't find it. I think that is your issue. This is why the instructions for our machine load an MKL module as part of the setup.

It is possible to disable this if you are on a machine where MKL is simply unavailable, but it's tedious if I remember correctly. So the easiest thing is to help it find MKL.

nikhilss219 commented 2 weeks ago

You have to install intel mkl library:

I use spack package manager hence I used that to download intel mkl libraries and load it spack install intel-oneapi-mkl@2023.2.0 Before running the cmake command i ran the following: spack load intel-oneapi-mkl@2023.2.0

Then finally you also have to add this to your LD_LIBRARY_PATH as follows:

export LD_LIBRARY_PATH=/opt/spack/opt/spack/linux-ubuntu20.04-skylake_avx512/gcc-9.4.0/intel-oneapi-mkl-2023.2.0-b3mhh2cxfyurm6fno4a5gb25aedlrm3k/lib/intel64:$LD_LIBRARY_PATH

export LD_LIBRARY_PATH=/opt/spack/opt/spack/linux-ubuntu20.04-skylake_avx512/gcc-9.4.0/intel-oneapi-mkl-2023.2.0-b3mhh2cxfyurm6fno4a5gb25aedlrm3k/lib/ia32:$LD_LIBRARY_PATH

XiaoTongDeng commented 2 weeks ago

您必须安装英特尔 mkl 库:

我使用 spack 包管理器,因此我用它来下载英特尔 mkl 库并加载它 spack install intel-oneapi-mkl@2023.2.0 在运行 cmake 命令之前,我运行了以下内容: spack 加载 intel-oneapi-mkl@2023.2.0

最后,您还必须将其添加到您的LD_LIBRARY_PATH中,如下所示:

导出 LD_LIBRARY_PATH=/opt/spack/opt/spack/linux-ubuntu20.04-skylake_avx512/gcc-9.4.0/intel-oneapi-mkl-2023.2.0-b3mhh2cxfyurm6fno4a5gb25aedlrm3k/lib/intel64:$LD_LIBRARY_PATH

导出 LD_LIBRARY_PATH=/opt/spack/opt/spack/linux-ubuntu20.04-skylake_avx512/gcc-9.4.0/intel-oneapi-mkl-2023.2.0-b3mhh2cxfyurm6fno4a5gb25aedlrm3k/lib/ia32:$LD_LIBRARY_PATH

thanks u! I have solved it