Skip to content

Instantly share code, notes, and snippets.

@pachadotdev
Last active February 4, 2021 07:59
Show Gist options
  • Star 42 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save pachadotdev/afc4faef2f191b533556f261a46b3aa8 to your computer and use it in GitHub Desktop.
Save pachadotdev/afc4faef2f191b533556f261a46b3aa8 to your computer and use it in GitHub Desktop.
Install Intel MKL (64 bit) on Ubuntu 17.10
# Option 1: Use apt-get
# keys taken from https://software.intel.com/en-us/articles/installing-intel-free-libs-and-python-apt-repo
cd ~/GitHub/r-with-intel-mkl/
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
sudo sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list'
sudo apt-get update && sudo apt-get install intel-mkl-64bit
# Option 2: Use the installer (works well on Ubuntu 16.04)
cd ~/GitHub/r-with-intel-mkl/
wget http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/12147/l_mkl_2017.4.239.tgz
tar xzvf l_mkl_2017.4.239.tgz
cd l_mkl_2017.4.239
sudo ./install_GUI.sh
printf '/opt/intel/lib/intel64\n/opt/intel/mkl/lib/intel64\n' | sudo tee -a /etc/ld.so.conf.d/intel_mkl.conf
sudo ldconfig
@matanox
Copy link

matanox commented Apr 11, 2018

Care to comment about the intel_mkl.conf step? is it still current with mkl 2018?
Intel sure know how to produce loads of cyclic documentation hiding how this simple procedure should be carried out :-)

@csukuangfj
Copy link

@matanster

You can add

export LD_LIBRARY_PATH=/opt/intel/lib/intel64:/opt/intel/mkl/lib/intel64:${LD_LIBRARY_PATH}

to your $HOME/.bashrc if you do not have write permission.

@v1993
Copy link

v1993 commented Oct 6, 2018

Lines 5-6 improved:

wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB | apt-key add -

Don't pollute your filesystem

@tholu
Copy link

tholu commented Oct 23, 2018

@v1993: You forgot sudo:

wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB | sudo apt-key add -

@zamlz
Copy link

zamlz commented Oct 28, 2018

so I'm having trouble setting up the MKL library on computer. I'm running gentoo linux and the system installs the files to /opt/intel/mkl/10.0.5.025. I don't see any directories mentioned as /opt/intel/lib/intel64 /opt/intel/mkl/lib/intel64. Am I using an incorrect version of MKL perhaps? Should I install MKL manually instead?

@format37
Copy link

format37 commented Feb 4, 2021

caution, install contains gui installs

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