cmake卸载旧版本,并升级
https://blog.csdn.net/weixin_41010198/article/details/109343347
shell
pip install -U cmake==3.25.2
shell
BUILDMODE=DEBUG . build.sh
安装mkl
shell
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
| gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt update
sudo apt install intel-oneapi-mkl
pip install mkl-devel
mkl安装目录是:
/opt/intel/oneapi/mkl/2023.2.0
shell
vim ~/.bashrc
export MKL_DIR=/opt/intel/oneapi/mkl/2023.2.0
export MKL_ROOT=/opt/intel/oneapi/mkl/2023.2.0
soource ~/.bashrc
cmake
创建cmake文件,找到MKLConfig.cmake并cp到该目录
在MKLconfig.cmake中
shell
# Set MKL_ROOT directory
set(MKL_ROOT "/opt/intel/oneapi/mkl/2023.2.0")
如果还有其他错误,修改cmakelist.txt或者是MKLconfig.cmake
MKLconfig.cmake属于输入本地环境变量,然后输出用于链接的变量,该文件有利于自动找到和配置本地的mkl库