首先据不完全观察,gfortran 与 openblas是 intel fortran 编译器 ifotr和mkl的非常优秀的平替,openblas连函数名都跟mkl一样,加了一个下划线。
1, 概况
https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html?operatingsystem=linux&distributions=aptpackagemanager
在ubuntu上选择 APT 包管理器
2,执行命令
更新 apt 仓库源
$ 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
在apt源上添加署名并配置 apt 客户端使用 intel 仓库
$ 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
更新本地apt缓存
sudo apt update
需要14GB空间,效果:
3, 安装Intel fortran 编译器 ifort
3.1 更行apt仓库
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
在apt源上添加署名并配置 apt 客户端使用 intel 仓库
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
更新本地apt缓存
sudo apt update
安装 hpckit
sudo apt install intel-hpckit
不过hpckit应该只有30试用期,过期后不能用。
intel的fortran编译器就在这个包里,测试一下: