Closed XiaoTongDeng closed 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.
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
您必须安装英特尔 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
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
in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
The path was deleted, renamed, or moved to another location.
An install or uninstall procedure did not complete successfully.
The installation package was faulty and references files it does not provide.
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:
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:
Some of these libraries may not be found correctly.
-- Generating done CMake Generate step failed. Build files cannot be regenerated correctly.