eddelbuettel / mkl4deb Goto Github PK
View Code? Open in Web Editor NEWAdding the Intel MKL to a Debian / Ubuntu system via one simple script
Adding the Intel MKL to a Debian / Ubuntu system via one simple script
Documenting here how to get R working properly with MKL when installing the intel-mkl
package on Ubuntu.
I am running Ubuntu 20.4 LTS and R 4.2.2
Install the MKL package sudo apt install intel-mkl
If you are working in the R console, it is sufficient to set MKL_THREADING_LAYER=GNU
or MKL_THREADING_LAYER=SEQUENTIAL
environment variables, eg in /etc/environment
. The terminal session needs to be restarted (not just the R session).
RStudio won't load these variables however - it needs to be set in an .Renviron
file in the home directory. Restart R after modifying .Renviron
.
With either approach, verify the MKL_THREADING_LAYER
variable is set by runnning Sys.getenv()
.
With the above approach, I am seeing consistent behaviour of pcox with small and large data uisng MKL as described in #13 (comment)
The example in the bug reported here https://bugs.launchpad.net/ubuntu/+source/intel-mkl/+bug/1989161 is resolved.
The issue with running benchmarks described here #2 (comment) is also resolved.
wrt to your helpful script/instructions - it looks like intel-mkl-2020.0.166-1 and the rest of its .deb packages no longer use /opt/intel
and instead install everything directly into various standard dirs, which I think makes them visible to compilers w/o needing any env vars.
Moreover the .deb packages no longer include the mklvars.sh
script, so now we need to figure out how to set all the different env vars manually for all those projects that expect a gazillion of mkl env vars like: MKL_LIBRARIES MKL_INCLUDE_DIRS MKL_INTERFACE_LIBRARY MKL_SEQUENTIAL_LAYER_LIBRARY MKL_CORE_LIBRARY
and fail w/o those preset.
Probably need to fool those with setting MKLROOT=/usr
, MKL_LIBRARIES=/usr/lib/x86_64-linux-gnu
, etc. But I'm not 100% sure what some of those used to point to.
I was tying to use the (updated) script to add MLK support in a rocker/r-devel image (so far just running interactively) to test an R package (/tthps://github.com/merliseclyde/bark) that fails unit-tests on CRAN MKL. (I am guessing it is a random-number threading issue, but would like to debug more)
Script (slightly updated for MKL version) from the one here
# add MKL
apt-get update && apt-get install -y gnupg
cd /tmp
# now get the key:
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
# now install that key
apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
# now remove the public key file exit the root shell
# rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
# wget https://apt.repos.intel.com/setup/intelproducts.list -O /etc/apt/sources.list.d/intelproducts.list
## just MKL
sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list'
apt-get update
# use apt-get install intel-mkl to see most recent targets :-)
apt-get install intel-mkl-2020.4-912 2020.4-912
## update alternatives
update-alternatives --install /usr/lib/x86_64-linux-gnu/libblas.so \
libblas.so-x86_64-linux-gnu /opt/intel/mkl/lib/intel64/libmkl_rt.so 50
update-alternatives --install /usr/lib/x86_64-linux-gnu/libblas.so.3 \
libblas.so.3-x86_64-linux-gnu /opt/intel/mkl/lib/intel64/libmkl_rt.so 50
update-alternatives --install /usr/lib/x86_64-linux-gnu/liblapack.so \
liblapack.so-x86_64-linux-gnu /opt/intel/mkl/lib/intel64/libmkl_rt.so 50
update-alternatives --install /usr/lib/x86_64-linux-gnu/liblapack.so.3 \
liblapack.so.3-x86_64-linux-gnu /opt/intel/mkl/lib/intel64/libmkl_rt.so 50
# Next, we have to tell the dyanmic linker about two directories use by the MKL, and have it update its cache:
echo "/opt/intel/lib/intel64" > /etc/ld.so.conf.d/mkl.conf
echo "/opt/intel/mkl/lib/intel64" >> /etc/ld.so.conf.d/mkl.conf
ldconfig
But when I go to start r-devel. via RD and run sesssionInfo() I am not seeing the MKL BLAS but:
Matrix products: default BLAS: /usr/local/lib/R/lib/libRblas.so LAPACK: /usr/local/lib/R/lib/libRlapack.so; LAPACK version 3.11.0
Any suggestions of what I may have missed? Is there an existing rocker/r version with MKL support already configured ?
TIA - Merlise
This script works great for rocker/r-ver:3.5.3, but not for rocker/r-ver:3.6.1.
While it appears to execute without error, the BLAS/LAPACK library used by R is unchanged:
$ docker run -it --rm --entrypoint=/bin/bash rocker/r-ver:3.6.1
# apt update && apt install -y --no-install-recommends gnupg wget apt-transport-https
...
# wget https://raw.githubusercontent.com/eddelbuettel/mkl4deb/c82f816/script.sh
# sh script.sh
...
# Rscript -e 'sessionInfo()'
R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 9 (stretch)
Matrix products: default
BLAS/LAPACK: /usr/lib/libopenblasp-r0.2.19.so
...
As I recall there was some prior discussion on the debian-science list list.
Of course, this can only go into non-free and may only support amd64 and at best a few other architectures, so in general it will be a bit of a second-class citizen. But it would still be nice to have. If anybody has time or energy ...
I'm getting a segmentation fault when trying to link a recent version of MKL on a recent version of rocker. I'm not sure if this is an issue with the sylabs remote builder or with the script itself and unfortunately I dont have easy access to ubuntu/debian machine with root to try locally. Can you advise? Here's my singularity .def
file:
Bootstrap: docker
From: rocker/geospatial:4.1.0
Stage: build
############################################
%post
############################################
##intel mkl###
apt update
apt install -y gnupg2
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB -O - > key_stored2file
apt-key add key_stored2file
rm key_stored2file
echo "deb https://apt.repos.intel.com/oneapi all main" | tee /etc/apt/sources.list.d/oneAPI.list
apt update
apt install -y intel-oneapi-mkl-2021.1.1
/opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_rt.so
update-alternatives --install /usr/lib/x86_64-linux-gnu/libblas.so \
libblas.so-x86_64-linux-gnu /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_rt.so 50
update-alternatives --install /usr/lib/x86_64-linux-gnu/libblas.so.3 \
libblas.so.3-x86_64-linux-gnu /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_rt.so 50
update-alternatives --install /usr/lib/x86_64-linux-gnu/liblapack.so \
liblapack.so-x86_64-linux-gnu /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_rt.so 50
update-alternatives --install /usr/lib/x86_64-linux-gnu/liblapack.so.3 \
liblapack.so.3-x86_64-linux-gnu /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_rt.so 50
echo "/opt/intel/lib/intel64" > /etc/ld.so.conf.d/mkl.conf
echo "/opt/intel/mkl/lib/intel64" >> /etc/ld.so.conf.d/mkl.conf
ldconfig
echo "MKL_THREADING_LAYER=GNU" >> /etc/environment
singularity build --remote mkl.sif mkl.def
INFO: Access Token Verified!
INFO: Token stored in /root/.singularity/remote.yaml
INFO: Remote "default" now in use.
INFO: Starting build...
Getting image source signatures
Copying blob sha256:16ec32c2132b43494832a05f2b02f7a822479f8250c173d0ab27b3de78b2f058
Copying blob sha256:e031c1a9f2f8981caa2c98eccc68a7f37f276578570815a2a750f1a9a7a26a2b
Copying blob sha256:a70855d85b62f4445418b3403977c218af39b555b9d024b0e34d854b43461a73
Copying blob sha256:ee8d56356e0a287731be50c207130a0960ec541c009ac15613f895f2f2d5278e
Copying blob sha256:5d3c6fe2adc613012e5716756b9ad873b0e98761c70c1f2bbe0c0ab3c92359b4
Copying blob sha256:fc0654371b2f0535df2bda795325c8f2b561f13186a133469562b9685abc6768
Copying blob sha256:8d80cde37ed7f3a04b27909799a1e1c73fe9fafbc38699ecbc7c82d36559d6fd
Copying blob sha256:4cfc1cf5c9b8960e2c477c2273d72febaf6003d9efe46601d484f2876e1193f3
Copying config sha256:7088bb9885c96e3651bac5b55ab97ad5a39f912a837acc7fc72d261107125a21
Writing manifest to image destination
Storing signatures
2021/07/31 16:06:19 info unpack layer: sha256:16ec32c2132b43494832a05f2b02f7a822479f8250c173d0ab27b3de78b2f058
2021/07/31 16:06:20 info unpack layer: sha256:e031c1a9f2f8981caa2c98eccc68a7f37f276578570815a2a750f1a9a7a26a2b
2021/07/31 16:06:20 info unpack layer: sha256:a70855d85b62f4445418b3403977c218af39b555b9d024b0e34d854b43461a73
2021/07/31 16:06:29 info unpack layer: sha256:ee8d56356e0a287731be50c207130a0960ec541c009ac15613f895f2f2d5278e
2021/07/31 16:06:43 info unpack layer: sha256:5d3c6fe2adc613012e5716756b9ad873b0e98761c70c1f2bbe0c0ab3c92359b4
2021/07/31 16:06:43 info unpack layer: sha256:fc0654371b2f0535df2bda795325c8f2b561f13186a133469562b9685abc6768
2021/07/31 16:06:51 info unpack layer: sha256:8d80cde37ed7f3a04b27909799a1e1c73fe9fafbc38699ecbc7c82d36559d6fd
2021/07/31 16:07:10 info unpack layer: sha256:4cfc1cf5c9b8960e2c477c2273d72febaf6003d9efe46601d484f2876e1193f3
INFO: Running post scriptlet
+ apt update
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
Get:3 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [989 kB]
Get:4 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [785 kB]
Get:5 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [432 kB]
Get:6 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [30.6 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:8 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [11.3 MB]
Get:10 http://archive.ubuntu.com/ubuntu focal/restricted amd64 Packages [33.4 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [1,275 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [177 kB]
Get:13 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [478 kB]
Get:14 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1,055 kB]
Get:15 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [33.1 kB]
Get:16 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,421 kB]
Get:17 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [6,319 B]
Get:18 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages [2,668 B]
Fetched 18.7 MB in 2s (7,519 kB/s)
Reading package lists...
Building dependency tree...
Reading state information...
2 packages can be upgraded. Run 'apt list --upgradable' to see them.
+ apt install -y gnupg2
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
dirmngr gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client
gpg-wks-server gpgconf gpgsm libassuan0 libksba8 libnpth0 pinentry-curses
Suggested packages:
dbus-user-session libpam-systemd pinentry-gnome3 tor parcimonie xloadimage
scdaemon pinentry-doc
The following NEW packages will be installed:
dirmngr gnupg gnupg-l10n gnupg-utils gnupg2 gpg gpg-agent gpg-wks-client
gpg-wks-server gpgconf gpgsm libassuan0 libksba8 libnpth0 pinentry-curses
0 upgraded, 15 newly installed, 0 to remove and 2 not upgraded.
Need to get 2,541 kB of archives.
After this operation, 7,541 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal/main amd64 libassuan0 amd64 2.5.3-7ubuntu2 [35.7 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 gpgconf amd64 2.2.19-3ubuntu2.1 [124 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal/main amd64 libksba8 amd64 1.3.5-2 [92.6 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal/main amd64 libnpth0 amd64 1.6-1 [7,736 B]
Get:5 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 dirmngr amd64 2.2.19-3ubuntu2.1 [329 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 gnupg-l10n all 2.2.19-3ubuntu2.1 [51.7 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 gnupg-utils amd64 2.2.19-3ubuntu2.1 [480 kB]
Get:8 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 gpg amd64 2.2.19-3ubuntu2.1 [483 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal/main amd64 pinentry-curses amd64 1.1.0-3build1 [36.3 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 gpg-agent amd64 2.2.19-3ubuntu2.1 [232 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 gpg-wks-client amd64 2.2.19-3ubuntu2.1 [97.6 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 gpg-wks-server amd64 2.2.19-3ubuntu2.1 [90.3 kB]
Get:13 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 gpgsm amd64 2.2.19-3ubuntu2.1 [217 kB]
Get:14 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 gnupg all 2.2.19-3ubuntu2.1 [259 kB]
Get:15 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 gnupg2 all 2.2.19-3ubuntu2.1 [4,584 B]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 2,541 kB in 1s (3,110 kB/s)
Selecting previously unselected package libassuan0:amd64.
(Reading database ... 58960 files and directories currently installed.)
Preparing to unpack .../00-libassuan0_2.5.3-7ubuntu2_amd64.deb ...
Unpacking libassuan0:amd64 (2.5.3-7ubuntu2) ...
Selecting previously unselected package gpgconf.
Preparing to unpack .../01-gpgconf_2.2.19-3ubuntu2.1_amd64.deb ...
Unpacking gpgconf (2.2.19-3ubuntu2.1) ...
Selecting previously unselected package libksba8:amd64.
Preparing to unpack .../02-libksba8_1.3.5-2_amd64.deb ...
Unpacking libksba8:amd64 (1.3.5-2) ...
Selecting previously unselected package libnpth0:amd64.
Preparing to unpack .../03-libnpth0_1.6-1_amd64.deb ...
Unpacking libnpth0:amd64 (1.6-1) ...
Selecting previously unselected package dirmngr.
Preparing to unpack .../04-dirmngr_2.2.19-3ubuntu2.1_amd64.deb ...
Unpacking dirmngr (2.2.19-3ubuntu2.1) ...
Selecting previously unselected package gnupg-l10n.
Preparing to unpack .../05-gnupg-l10n_2.2.19-3ubuntu2.1_all.deb ...
Unpacking gnupg-l10n (2.2.19-3ubuntu2.1) ...
Selecting previously unselected package gnupg-utils.
Preparing to unpack .../06-gnupg-utils_2.2.19-3ubuntu2.1_amd64.deb ...
Unpacking gnupg-utils (2.2.19-3ubuntu2.1) ...
Selecting previously unselected package gpg.
Preparing to unpack .../07-gpg_2.2.19-3ubuntu2.1_amd64.deb ...
Unpacking gpg (2.2.19-3ubuntu2.1) ...
Selecting previously unselected package pinentry-curses.
Preparing to unpack .../08-pinentry-curses_1.1.0-3build1_amd64.deb ...
Unpacking pinentry-curses (1.1.0-3build1) ...
Selecting previously unselected package gpg-agent.
Preparing to unpack .../09-gpg-agent_2.2.19-3ubuntu2.1_amd64.deb ...
Unpacking gpg-agent (2.2.19-3ubuntu2.1) ...
Selecting previously unselected package gpg-wks-client.
Preparing to unpack .../10-gpg-wks-client_2.2.19-3ubuntu2.1_amd64.deb ...
Unpacking gpg-wks-client (2.2.19-3ubuntu2.1) ...
Selecting previously unselected package gpg-wks-server.
Preparing to unpack .../11-gpg-wks-server_2.2.19-3ubuntu2.1_amd64.deb ...
Unpacking gpg-wks-server (2.2.19-3ubuntu2.1) ...
Selecting previously unselected package gpgsm.
Preparing to unpack .../12-gpgsm_2.2.19-3ubuntu2.1_amd64.deb ...
Unpacking gpgsm (2.2.19-3ubuntu2.1) ...
Selecting previously unselected package gnupg.
Preparing to unpack .../13-gnupg_2.2.19-3ubuntu2.1_all.deb ...
Unpacking gnupg (2.2.19-3ubuntu2.1) ...
Selecting previously unselected package gnupg2.
Preparing to unpack .../14-gnupg2_2.2.19-3ubuntu2.1_all.deb ...
Unpacking gnupg2 (2.2.19-3ubuntu2.1) ...
Setting up libksba8:amd64 (1.3.5-2) ...
Setting up libnpth0:amd64 (1.6-1) ...
Setting up libassuan0:amd64 (2.5.3-7ubuntu2) ...
Setting up gnupg-l10n (2.2.19-3ubuntu2.1) ...
Setting up gpgconf (2.2.19-3ubuntu2.1) ...
Setting up gpg (2.2.19-3ubuntu2.1) ...
Setting up gnupg-utils (2.2.19-3ubuntu2.1) ...
Setting up pinentry-curses (1.1.0-3build1) ...
Setting up gpg-agent (2.2.19-3ubuntu2.1) ...
Setting up gpgsm (2.2.19-3ubuntu2.1) ...
Setting up dirmngr (2.2.19-3ubuntu2.1) ...
Setting up gpg-wks-server (2.2.19-3ubuntu2.1) ...
Setting up gpg-wks-client (2.2.19-3ubuntu2.1) ...
Setting up gnupg (2.2.19-3ubuntu2.1) ...
Setting up gnupg2 (2.2.19-3ubuntu2.1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
+ wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB -O -
--2021-07-31 16:07:37-- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
Resolving apt.repos.intel.com (apt.repos.intel.com)... 184.84.65.68, 2600:1408:8400:5ac::4b23, 2600:1408:8400:58d::4b23
Connecting to apt.repos.intel.com (apt.repos.intel.com)|184.84.65.68|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3796 (3.7K) [binary/octet-stream]
Saving to: ‘STDOUT’
0K ... 100% 525M=0s
2021-07-31 16:07:38 (525 MB/s) - written to stdout [3796/3796]
+ apt-key add key_stored2file
Warning: apt-key output should not be parsed (stdout is not a terminal)
OK
+ rm key_stored2file
deb https://apt.repos.intel.com/oneapi all main
+ + tee /etc/apt/sources.list.d/oneAPI.list
echo deb https://apt.repos.intel.com/oneapi all main
+ apt update
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Hit:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Get:2 https://apt.repos.intel.com/oneapi all InRelease [4,390 B]
Hit:3 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Get:6 https://apt.repos.intel.com/oneapi all/main all Packages [16.4 kB]
Get:7 https://apt.repos.intel.com/oneapi all/main amd64 Packages [84.6 kB]
Fetched 105 kB in 0s (238 kB/s)
Reading package lists...
Building dependency tree...
Reading state information...
2 packages can be upgraded. Run 'apt list --upgradable' to see them.
+ apt install -y intel-oneapi-mkl-2021.1.1
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
intel-oneapi-common-licensing intel-oneapi-common-licensing-2021.3.0
intel-oneapi-common-vars intel-oneapi-compiler-dpcpp-cpp-runtime
intel-oneapi-compiler-dpcpp-cpp-runtime-2021.3.0
intel-oneapi-compiler-shared-common-runtime-2021.3.0
intel-oneapi-compiler-shared-runtime-2021.3.0 intel-oneapi-condaindex
intel-oneapi-mkl-common-2021.1.1 intel-oneapi-openmp-2021.3.0
intel-oneapi-openmp-common-2021.3.0 intel-oneapi-tbb
intel-oneapi-tbb-2021.3.0 intel-oneapi-tbb-common-2021.3.0
The following NEW packages will be installed:
intel-oneapi-common-licensing intel-oneapi-common-licensing-2021.3.0
intel-oneapi-common-vars intel-oneapi-compiler-dpcpp-cpp-runtime
intel-oneapi-compiler-dpcpp-cpp-runtime-2021.3.0
intel-oneapi-compiler-shared-common-runtime-2021.3.0
intel-oneapi-compiler-shared-runtime-2021.3.0 intel-oneapi-condaindex
intel-oneapi-mkl-2021.1.1 intel-oneapi-mkl-common-2021.1.1
intel-oneapi-openmp-2021.3.0 intel-oneapi-openmp-common-2021.3.0
intel-oneapi-tbb intel-oneapi-tbb-2021.3.0 intel-oneapi-tbb-common-2021.3.0
0 upgraded, 15 newly installed, 0 to remove and 2 not upgraded.
Need to get 473 MB of archives.
After this operation, 2,442 MB of additional disk space will be used.
Get:1 https://apt.repos.intel.com/oneapi all/main amd64 intel-oneapi-common-licensing-2021.3.0 all 2021.3.0-261 [35.6 kB]
Get:2 https://apt.repos.intel.com/oneapi all/main amd64 intel-oneapi-common-licensing all 2021.3.0-261 [2,298 B]
Get:3 https://apt.repos.intel.com/oneapi all/main amd64 intel-oneapi-common-vars all 2021.3.0-261 [13.0 kB]
Get:4 https://apt.repos.intel.com/oneapi all/main amd64 intel-oneapi-compiler-shared-common-runtime-2021.3.0 all 2021.3.0-3350 [14.6 MB]
Get:5 https://apt.repos.intel.com/oneapi all/main amd64 intel-oneapi-condaindex amd64 2021.3.0-159 [675 kB]
Get:6 https://apt.repos.intel.com/oneapi all/main amd64 intel-oneapi-openmp-common-2021.3.0 all 2021.3.0-3350 [16.0 kB]
Get:7 https://apt.repos.intel.com/oneapi all/main amd64 intel-oneapi-openmp-2021.3.0 amd64 2021.3.0-3350 [120 MB]
Get:8 https://apt.repos.intel.com/oneapi all/main amd64 intel-oneapi-compiler-shared-runtime-2021.3.0 amd64 2021.3.0-3350 [5,851 kB]
Get:9 https://apt.repos.intel.com/oneapi all/main amd64 intel-oneapi-tbb-common-2021.3.0 all 2021.3.0-511 [21.5 kB]
Get:10 https://apt.repos.intel.com/oneapi all/main amd64 intel-oneapi-tbb-2021.3.0 amd64 2021.3.0-511 [2,167 kB]
Get:11 https://apt.repos.intel.com/oneapi all/main amd64 intel-oneapi-compiler-dpcpp-cpp-runtime-2021.3.0 amd64 2021.3.0-3350 [129 MB]
Get:12 https://apt.repos.intel.com/oneapi all/main amd64 intel-oneapi-compiler-dpcpp-cpp-runtime amd64 2021.3.0-3350 [2,818 B]
Get:13 https://apt.repos.intel.com/oneapi all/main amd64 intel-oneapi-mkl-common-2021.1.1 all 2021.1.1-52 [18.6 kB]
Get:14 https://apt.repos.intel.com/oneapi all/main amd64 intel-oneapi-tbb amd64 2021.3.0-511 [1,840 B]
Get:15 https://apt.repos.intel.com/oneapi all/main amd64 intel-oneapi-mkl-2021.1.1 amd64 2021.1.1-52 [200 MB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 473 MB in 19s (24.3 MB/s)
Selecting previously unselected package intel-oneapi-common-licensing-2021.3.0.
(Reading database ... 59173 files and directories currently installed.)
Preparing to unpack .../00-intel-oneapi-common-licensing-2021.3.0_2021.3.0-261_all.deb ...
Unpacking intel-oneapi-common-licensing-2021.3.0 (2021.3.0-261) ...
Selecting previously unselected package intel-oneapi-common-licensing.
Preparing to unpack .../01-intel-oneapi-common-licensing_2021.3.0-261_all.deb ...
Unpacking intel-oneapi-common-licensing (2021.3.0-261) ...
Selecting previously unselected package intel-oneapi-common-vars.
Preparing to unpack .../02-intel-oneapi-common-vars_2021.3.0-261_all.deb ...
Unpacking intel-oneapi-common-vars (2021.3.0-261) ...
Selecting previously unselected package intel-oneapi-compiler-shared-common-runtime-2021.3.0.
Preparing to unpack .../03-intel-oneapi-compiler-shared-common-runtime-2021.3.0_2021.3.0-3350_all.deb ...
Unpacking intel-oneapi-compiler-shared-common-runtime-2021.3.0 (2021.3.0-3350) ...
Selecting previously unselected package intel-oneapi-condaindex.
Preparing to unpack .../04-intel-oneapi-condaindex_2021.3.0-159_amd64.deb ...
Unpacking intel-oneapi-condaindex (2021.3.0-159) ...
Selecting previously unselected package intel-oneapi-openmp-common-2021.3.0.
Preparing to unpack .../05-intel-oneapi-openmp-common-2021.3.0_2021.3.0-3350_all.deb ...
Unpacking intel-oneapi-openmp-common-2021.3.0 (2021.3.0-3350) ...
Selecting previously unselected package intel-oneapi-openmp-2021.3.0.
Preparing to unpack .../06-intel-oneapi-openmp-2021.3.0_2021.3.0-3350_amd64.deb ...
Unpacking intel-oneapi-openmp-2021.3.0 (2021.3.0-3350) ...
Selecting previously unselected package intel-oneapi-compiler-shared-runtime-2021.3.0.
Preparing to unpack .../07-intel-oneapi-compiler-shared-runtime-2021.3.0_2021.3.0-3350_amd64.deb ...
Unpacking intel-oneapi-compiler-shared-runtime-2021.3.0 (2021.3.0-3350) ...
Selecting previously unselected package intel-oneapi-tbb-common-2021.3.0.
Preparing to unpack .../08-intel-oneapi-tbb-common-2021.3.0_2021.3.0-511_all.deb ...
Unpacking intel-oneapi-tbb-common-2021.3.0 (2021.3.0-511) ...
Selecting previously unselected package intel-oneapi-tbb-2021.3.0.
Preparing to unpack .../09-intel-oneapi-tbb-2021.3.0_2021.3.0-511_amd64.deb ...
Unpacking intel-oneapi-tbb-2021.3.0 (2021.3.0-511) ...
Selecting previously unselected package intel-oneapi-compiler-dpcpp-cpp-runtime-2021.3.0.
Preparing to unpack .../10-intel-oneapi-compiler-dpcpp-cpp-runtime-2021.3.0_2021.3.0-3350_amd64.deb ...
Unpacking intel-oneapi-compiler-dpcpp-cpp-runtime-2021.3.0 (2021.3.0-3350) ...
Selecting previously unselected package intel-oneapi-compiler-dpcpp-cpp-runtime.
Preparing to unpack .../11-intel-oneapi-compiler-dpcpp-cpp-runtime_2021.3.0-3350_amd64.deb ...
Unpacking intel-oneapi-compiler-dpcpp-cpp-runtime (2021.3.0-3350) ...
Selecting previously unselected package intel-oneapi-mkl-common-2021.1.1.
Preparing to unpack .../12-intel-oneapi-mkl-common-2021.1.1_2021.1.1-52_all.deb ...
Unpacking intel-oneapi-mkl-common-2021.1.1 (2021.1.1-52) ...
Selecting previously unselected package intel-oneapi-tbb.
Preparing to unpack .../13-intel-oneapi-tbb_2021.3.0-511_amd64.deb ...
Unpacking intel-oneapi-tbb (2021.3.0-511) ...
Selecting previously unselected package intel-oneapi-mkl-2021.1.1.
Preparing to unpack .../14-intel-oneapi-mkl-2021.1.1_2021.1.1-52_amd64.deb ...
Unpacking intel-oneapi-mkl-2021.1.1 (2021.1.1-52) ...
Setting up intel-oneapi-common-licensing-2021.3.0 (2021.3.0-261) ...
Setting up intel-oneapi-condaindex (2021.3.0-159) ...
Setting up intel-oneapi-common-vars (2021.3.0-261) ...
Setting up intel-oneapi-openmp-common-2021.3.0 (2021.3.0-3350) ...
Setting up intel-oneapi-common-licensing (2021.3.0-261) ...
Setting up intel-oneapi-mkl-common-2021.1.1 (2021.1.1-52) ...
Setting up intel-oneapi-compiler-shared-common-runtime-2021.3.0 (2021.3.0-3350) ...
Setting up intel-oneapi-tbb-common-2021.3.0 (2021.3.0-511) ...
Setting up intel-oneapi-openmp-2021.3.0 (2021.3.0-3350) ...
Setting up intel-oneapi-tbb-2021.3.0 (2021.3.0-511) ...
Setting up intel-oneapi-tbb (2021.3.0-511) ...
Setting up intel-oneapi-compiler-shared-runtime-2021.3.0 (2021.3.0-3350) ...
Setting up intel-oneapi-compiler-dpcpp-cpp-runtime-2021.3.0 (2021.3.0-3350) ...
Setting up intel-oneapi-compiler-dpcpp-cpp-runtime (2021.3.0-3350) ...
Setting up intel-oneapi-mkl-2021.1.1 (2021.1.1-52) ...
+ /opt/intel/oneapi/mkl/latest/lib/intel64/libmkl_rt.so
Segmentation fault
FATAL: While performing build: while running engine: exit status 139
FATAL: While performing build: build image size <= 0
I followed the same steps as in script.h for installing but there were some certificate and proxy related issues. On modifying the commands as below, I am now getting "unexpected TLS packet error".
$ wget -q0- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB --no-check-certificate
$ apt-key --keyring /usr/share/keyrings/intel-sw-products.gpg add -
$ echo 'deb [signed by=/usr/share/keyrings/intel-sw-products.gpg trusted=yes] https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list
$ apt-get update
$ apt-get install intel-mkl-64bit-2019.2-057
Ign:1 https://apt.repos.intel.com/mkl all InRelease
Ign:2 https://apt.repos.intel.com/mkl all Release
Ign:3 https://apt.repos.intel.com/mkl all/main all Packages
Ign:4 https://apt.repos.intel.com/mkl all/main i386 Packages
Ign:5 https://apt.repos.intel.com/mkl all/main amd64 Packages
Err:4 https://apt.repos.intel.com/mkl all/main i386 Packages
Could not handshake: An unexpected TLS packet was received. [IP: <ip port>]
E: Failed to fetch https://apt.repos.intel.com/mkl/dists/all/main/binary-i386/Packages
Could not handshake: An unexpected TLS packet was received. [IP: <ip port>]
I am working on Ubuntu 18.04 and the proxy configuration has already been set in /etc/apt/apt.conf
Please let me know if anyone has ideas on how to resolve this issue.
in linux, when you when you get to these commands:
echo "/opt/intel/lib/intel64" > /etc/ld.so.conf.d/mkl.conf
echo "/opt/intel/mkl/lib/intel64" >> /etc/ld.so.conf.d/mkl.conf
ldconfig
you'll get a permission error, if you use "sudo" in order to obtain root permissions in front of each command. This is because sudo only applies to one command at a time. Either use sudo bash to get a root bash shell, or use quotes around the command with the -sh option, eg. like this:
sudo sh -c "echo '/usr/local/lib' >> /etc/ld.so.conf"
Perhaps this should be made clear in the otherwise excellent guide?
I have R package pcoxtime
(my implementation but already in CRAN) which I am using to fit survival model using proximal gradient descent. I have noticed that whenever I run the code on a system which has MKL as the default, I get different (seemingly wrong) results. This mostly happens when the dataset is large. For small dataset (few observations), the results are comparable (generally similar) with other packages (what we expect). Here's part of my sessionInfo()
in this case.
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.5 LTS
Matrix products: default
BLAS/LAPACK: /opt/intel/compilers_and_libraries_2018.2.199/linux/mkl/lib/intel64_lin/libmkl_rt.so
However, default BLAS/LAPACK libraries give me expected results which are consistent. No matter the size of the data.
One thing to mention, pcoxtime
has most of it's matrix operations implemented using Rcpp
and RcppArmadillo
.
Here is the example, but first install pcoxtime
and also the problem only occurs if you MKL as the default.
Small n
: print(mod_coxph)
and print(mod_pcox)
are close enough, which is what we expect.
# install.packages("pcoxtime")
library(survival)
library(pcoxtime)
set.seed(911)
sims <- simtdc(10)
df <- sims$data
betas <- sims$betas
print(betas)
df <- df[, c("Start", "Stop", "Event", names(betas))]
## coxph
mod_coxph <- coxph(Surv(Start, Stop, Event) ~ ., data = df, method = "breslow")
print(mod_coxph)
## pcoxtime
mod_pcox <- pcoxtime(Surv(Start, Stop, Event) ~ ., data = df, alpha = 1, lambda = 0)
print(mod_pcox)
Relatively large n
: print(mod_coxph)
and print(mod_pcox)
gives inconsistent results
sims <- simtdc(100)
df <- sims$data
betas <- sims$betas
print(betas)
df <- df[, c("Start", "Stop", "Event", names(betas))]
## coxph
mod_coxph <- coxph(Surv(Start, Stop, Event) ~ ., data = df, method = "breslow")
print(mod_coxph)
## pcoxtime
mod_pcox <- pcoxtime(Surv(Start, Stop, Event) ~ ., data = df, alpha = 1, lambda = 0)
print(mod_pcox)
Any help will be appreciated.
Thanks,
First of all, thank you for the update-alternatives trick! I had no idea that libmkl_rt.so can stand for all four libraries. It's just WOW! A fantastic trick!
I'm a little bit worried about your unconditional recommendation to use MKL_THREADING_LAYER=GNU
. I've been doing numerical stuff with MKL for many years, and (while I normally went with TBB threading, as it seems to have the least lock contention) the results are mixed. Sometimes it's a big gain on one architecture, and slows down the computation on another. My most surprising moment was when I ran the same program on an MS Server (2012 R2, IIRC), and on a Hyper-V VM on the same host, with the same OS, same number of CPU and a lot of RAM (probably less that the host, but close). I've got a big gain on the VM, but unexpected drop in speed on the host (yes, not the other way round!)
I suggest maybe adding a paragraph that the users should try also MKL_THREADING_LAYER=SEQUENTIAL
and see which one is actually better for their problem would be helpful. It's really both problem-dependent and hardware-dependent. The LinPACK benchmark always benefits from threading, in my experience, so it should be the real code for their task that they test the performance on. My impression is MKL does not always makes the best choice as to whether shard the computation between threads or not.
FWIW, the default for MKL_THREADING_LAYER
is intel
.
My experimental toolkit (assume that you have seen my mails on -devel) enables user to manage tricks with dpkg. The trick means something trivial that cannot be uploaded to Debian, but some people will use it to modify the system, e.g. the not-quite-safe apt accelerator:
https://github.com/dupr/duprkit/blob/master/examples/apt-nosync.rcp
mkl4deb is a good example of "trick" as well. Does it sound good if I translate your script into a Recipe as an experiment?
That means, the user can build a mkl4deb.deb
package (empty). Upon postinst, your script will be executed. Upon prerm, the update-alternative changes will be reverted. In that case this "trick" is managed by dpkg and the user can do less.
I can't get this to run in a container. benchmarkme
fails :(
sessionInfo(); library("benchmarkme"); benchmark_std(runs = 1)
R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.3 LTS
Matrix products: default
BLAS/LAPACK: /opt/intel/compilers_and_libraries_2018.2.199/linux/mkl/lib/intel64_lin/libmkl_rt.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.4
# Programming benchmarks (5 tests):
3,500,000 Fibonacci numbers calculation (vector calc): 0.867 (sec).
Grand common divisors of 1,000,000 pairs (recursion): 1.38 (sec).
Creation of a 3500x3500 Hilbert matrix (matrix calc): 0.66 (sec).
Creation of a 3000x3000 Toeplitz matrix (loops): 15.4 (sec).
Escoufier's method on a 60x60 matrix (mixed): 1.61 (sec).
# Matrix calculation benchmarks (5 tests):
Creation, transp., deformation of a 5000x5000 matrix: 1.15 (sec).
2500x2500 normal distributed random matrix ^1000: 0.659 (sec).
Sorting of 7,000,000 random values: 0.892 (sec).
2500x2500 cross-product matrix (b = a' * a): 0.992 (sec).
Error in solve(crossprod(a), crossprod(a, b)) :
the leading minor of order 1421 is not positive definite
Calls: benchmark_std ... bm_matrix_cal_lm -> system.time -> solve -> solve -> .Call
Timing stopped at: 1.064 0.032 0.553
It's a ubuntu 16.04 container and here's the mkl part that I use:
# install mkl
RUN wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB -P /tmp \
&& apt-key add /tmp/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB \
&& sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list' \
&& apt-get update \
&& apt-get install -y intel-mkl-64bit-2018.2-046 \
&& update-alternatives --install /usr/lib/x86_64-linux-gnu/libblas.so \
libblas.so-x86_64-linux-gnu /opt/intel/mkl/lib/intel64/libmkl_rt.so 50 \
&& update-alternatives --install /usr/lib/x86_64-linux-gnu/libblas.so.3 \
libblas.so.3-x86_64-linux-gnu /opt/intel/mkl/lib/intel64/libmkl_rt.so 50 \
&& update-alternatives --install /usr/lib/x86_64-linux-gnu/liblapack.so \
liblapack.so-x86_64-linux-gnu /opt/intel/mkl/lib/intel64/libmkl_rt.so 50 \
&& update-alternatives --install /usr/lib/x86_64-linux-gnu/liblapack.so.3 \
liblapack.so.3-x86_64-linux-gnu /opt/intel/mkl/lib/intel64/libmkl_rt.so 50 \
&& echo "/opt/intel/lib/intel64" > /etc/ld.so.conf.d/mkl.conf \
&& echo "/opt/intel/mkl/lib/intel64" >> /etc/ld.so.conf.d/mkl.conf \
&& ldconfig
Any ideas /hints? Can you share the Dockerfile you used?
openblas works fine:
sessionInfo(); library("benchmarkme"); benchmark_std(runs = 1)
R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.3 LTS
Matrix products: default
BLAS: /usr/lib/openblas-base/libblas.so.3
LAPACK: /usr/lib/libopenblasp-r0.2.18.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.4
# Programming benchmarks (5 tests):
3,500,000 Fibonacci numbers calculation (vector calc): 0.874 (sec).
Grand common divisors of 1,000,000 pairs (recursion): 1.31 (sec).
Creation of a 3500x3500 Hilbert matrix (matrix calc): 0.23 (sec).
Creation of a 3000x3000 Toeplitz matrix (loops): 16.9 (sec).
Escoufier's method on a 60x60 matrix (mixed): 1.28 (sec).
# Matrix calculation benchmarks (5 tests):
Creation, transp., deformation of a 5000x5000 matrix: 1.31 (sec).
2500x2500 normal distributed random matrix ^1000: 0.769 (sec).
Sorting of 7,000,000 random values: 0.918 (sec).
2500x2500 cross-product matrix (b = a' * a): 0.558 (sec).
Linear regr. over a 3000x3000 matrix (c = a \ b'): 0.396 (sec).
# Matrix function benchmarks (5 tests):
Cholesky decomposition of a 3000x3000 matrix: 0.773 (sec).
Determinant of a 2500x2500 random matrix: 1.03 (sec).
Eigenvalues of a 640x640 random matrix: 0.865 (sec).
FFT over 2,500,000 random values: 0.536 (sec).
Inverse of a 1600x1600 random matrix: 0.81 (sec).
user system elapsed test test_group cores
1 0.856 0.016 0.874 fib prog 0
2 1.220 0.088 1.309 gcd prog 0
3 0.176 0.056 0.230 hilbert prog 0
4 16.824 0.032 16.947 toeplitz prog 0
5 1.236 0.040 1.278 escoufier prog 0
6 1.232 0.048 1.314 manip matrix_cal 0
7 0.768 0.000 0.769 power matrix_cal 0
8 0.892 0.024 0.918 sort matrix_cal 0
9 0.952 0.536 0.558 cross_product matrix_cal 0
10 0.848 0.468 0.396 lm matrix_cal 0
11 0.812 0.784 0.773 cholesky matrix_fun 0
12 1.516 0.384 1.027 determinant matrix_fun 0
13 0.936 1.608 0.865 eigen matrix_fun 0
14 0.536 0.000 0.536 fft matrix_fun 0
15 1.264 0.732 0.810 inverse matrix_fun 0
I'm trying to get MKL installed on my fedora system which uses the dnf package manager. Do you know if intel MKL works for dnf, because I want to use your blog post as a guide line to install it?
Trying to use apt install intel-mkl
is hanging at a prompt in a non-interactive (singularity) build session. Here's my def file. any idea how to get around this prompt?
Bootstrap: docker
From: rocker/geospatial:4.1.0
Stage: build
############################################
%post
############################################
##intel mkl###
apt update
apt install -y gnupg2
apt install -y intel-mkl
singularity build --remote mkl.sif mkl.def
INFO: Access Token Verified!
INFO: Token stored in /root/.singularity/remote.yaml
INFO: Remote "default" now in use.
INFO: Starting build...
Getting image source signatures
Copying blob sha256:16ec32c2132b43494832a05f2b02f7a822479f8250c173d0ab27b3de78b2f058
Copying blob sha256:e031c1a9f2f8981caa2c98eccc68a7f37f276578570815a2a750f1a9a7a26a2b
Copying blob sha256:a70855d85b62f4445418b3403977c218af39b555b9d024b0e34d854b43461a73
Copying blob sha256:ee8d56356e0a287731be50c207130a0960ec541c009ac15613f895f2f2d5278e
Copying blob sha256:5d3c6fe2adc613012e5716756b9ad873b0e98761c70c1f2bbe0c0ab3c92359b4
Copying blob sha256:fc0654371b2f0535df2bda795325c8f2b561f13186a133469562b9685abc6768
Copying blob sha256:8d80cde37ed7f3a04b27909799a1e1c73fe9fafbc38699ecbc7c82d36559d6fd
Copying blob sha256:4cfc1cf5c9b8960e2c477c2273d72febaf6003d9efe46601d484f2876e1193f3
Copying config sha256:7088bb9885c96e3651bac5b55ab97ad5a39f912a837acc7fc72d261107125a21
Writing manifest to image destination
Storing signatures
2021/07/31 16:21:36 info unpack layer: sha256:16ec32c2132b43494832a05f2b02f7a822479f8250c173d0ab27b3de78b2f058
2021/07/31 16:21:38 info unpack layer: sha256:e031c1a9f2f8981caa2c98eccc68a7f37f276578570815a2a750f1a9a7a26a2b
2021/07/31 16:21:38 info unpack layer: sha256:a70855d85b62f4445418b3403977c218af39b555b9d024b0e34d854b43461a73
2021/07/31 16:21:47 info unpack layer: sha256:ee8d56356e0a287731be50c207130a0960ec541c009ac15613f895f2f2d5278e
2021/07/31 16:22:01 info unpack layer: sha256:5d3c6fe2adc613012e5716756b9ad873b0e98761c70c1f2bbe0c0ab3c92359b4
2021/07/31 16:22:01 info unpack layer: sha256:fc0654371b2f0535df2bda795325c8f2b561f13186a133469562b9685abc6768
2021/07/31 16:22:13 info unpack layer: sha256:8d80cde37ed7f3a04b27909799a1e1c73fe9fafbc38699ecbc7c82d36559d6fd
2021/07/31 16:22:33 info unpack layer: sha256:4cfc1cf5c9b8960e2c477c2273d72febaf6003d9efe46601d484f2876e1193f3
INFO: Running post scriptlet
+ apt update
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
Get:3 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [30.6 kB]
Get:4 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [785 kB]
Get:5 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [989 kB]
Get:6 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [432 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:8 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal/restricted amd64 Packages [33.4 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [177 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [11.3 MB]
Get:12 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [1,275 kB]
Get:13 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1,055 kB]
Get:14 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,421 kB]
Get:15 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [33.1 kB]
Get:16 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [478 kB]
Get:17 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages [2,668 B]
Get:18 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [6,319 B]
Fetched 18.7 MB in 2s (7,595 kB/s)
Reading package lists...
Building dependency tree...
Reading state information...
2 packages can be upgraded. Run 'apt list --upgradable' to see them.
+ apt install -y gnupg2
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
dirmngr gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client
gpg-wks-server gpgconf gpgsm libassuan0 libksba8 libnpth0 pinentry-curses
Suggested packages:
dbus-user-session libpam-systemd pinentry-gnome3 tor parcimonie xloadimage
scdaemon pinentry-doc
The following NEW packages will be installed:
dirmngr gnupg gnupg-l10n gnupg-utils gnupg2 gpg gpg-agent gpg-wks-client
gpg-wks-server gpgconf gpgsm libassuan0 libksba8 libnpth0 pinentry-curses
0 upgraded, 15 newly installed, 0 to remove and 2 not upgraded.
Need to get 2,541 kB of archives.
After this operation, 7,541 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal/main amd64 libassuan0 amd64 2.5.3-7ubuntu2 [35.7 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 gpgconf amd64 2.2.19-3ubuntu2.1 [124 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal/main amd64 libksba8 amd64 1.3.5-2 [92.6 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal/main amd64 libnpth0 amd64 1.6-1 [7,736 B]
Get:5 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 dirmngr amd64 2.2.19-3ubuntu2.1 [329 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 gnupg-l10n all 2.2.19-3ubuntu2.1 [51.7 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 gnupg-utils amd64 2.2.19-3ubuntu2.1 [480 kB]
Get:8 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 gpg amd64 2.2.19-3ubuntu2.1 [483 kB]
Get:9 http://archive.ubuntu.com/ubuntu focal/main amd64 pinentry-curses amd64 1.1.0-3build1 [36.3 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 gpg-agent amd64 2.2.19-3ubuntu2.1 [232 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 gpg-wks-client amd64 2.2.19-3ubuntu2.1 [97.6 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 gpg-wks-server amd64 2.2.19-3ubuntu2.1 [90.3 kB]
Get:13 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 gpgsm amd64 2.2.19-3ubuntu2.1 [217 kB]
Get:14 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 gnupg all 2.2.19-3ubuntu2.1 [259 kB]
Get:15 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 gnupg2 all 2.2.19-3ubuntu2.1 [4,584 B]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 2,541 kB in 1s (3,109 kB/s)
Selecting previously unselected package libassuan0:amd64.
(Reading database ... 58960 files and directories currently installed.)
Preparing to unpack .../00-libassuan0_2.5.3-7ubuntu2_amd64.deb ...
Unpacking libassuan0:amd64 (2.5.3-7ubuntu2) ...
Selecting previously unselected package gpgconf.
Preparing to unpack .../01-gpgconf_2.2.19-3ubuntu2.1_amd64.deb ...
Unpacking gpgconf (2.2.19-3ubuntu2.1) ...
Selecting previously unselected package libksba8:amd64.
Preparing to unpack .../02-libksba8_1.3.5-2_amd64.deb ...
Unpacking libksba8:amd64 (1.3.5-2) ...
Selecting previously unselected package libnpth0:amd64.
Preparing to unpack .../03-libnpth0_1.6-1_amd64.deb ...
Unpacking libnpth0:amd64 (1.6-1) ...
Selecting previously unselected package dirmngr.
Preparing to unpack .../04-dirmngr_2.2.19-3ubuntu2.1_amd64.deb ...
Unpacking dirmngr (2.2.19-3ubuntu2.1) ...
Selecting previously unselected package gnupg-l10n.
Preparing to unpack .../05-gnupg-l10n_2.2.19-3ubuntu2.1_all.deb ...
Unpacking gnupg-l10n (2.2.19-3ubuntu2.1) ...
Selecting previously unselected package gnupg-utils.
Preparing to unpack .../06-gnupg-utils_2.2.19-3ubuntu2.1_amd64.deb ...
Unpacking gnupg-utils (2.2.19-3ubuntu2.1) ...
Selecting previously unselected package gpg.
Preparing to unpack .../07-gpg_2.2.19-3ubuntu2.1_amd64.deb ...
Unpacking gpg (2.2.19-3ubuntu2.1) ...
Selecting previously unselected package pinentry-curses.
Preparing to unpack .../08-pinentry-curses_1.1.0-3build1_amd64.deb ...
Unpacking pinentry-curses (1.1.0-3build1) ...
Selecting previously unselected package gpg-agent.
Preparing to unpack .../09-gpg-agent_2.2.19-3ubuntu2.1_amd64.deb ...
Unpacking gpg-agent (2.2.19-3ubuntu2.1) ...
Selecting previously unselected package gpg-wks-client.
Preparing to unpack .../10-gpg-wks-client_2.2.19-3ubuntu2.1_amd64.deb ...
Unpacking gpg-wks-client (2.2.19-3ubuntu2.1) ...
Selecting previously unselected package gpg-wks-server.
Preparing to unpack .../11-gpg-wks-server_2.2.19-3ubuntu2.1_amd64.deb ...
Unpacking gpg-wks-server (2.2.19-3ubuntu2.1) ...
Selecting previously unselected package gpgsm.
Preparing to unpack .../12-gpgsm_2.2.19-3ubuntu2.1_amd64.deb ...
Unpacking gpgsm (2.2.19-3ubuntu2.1) ...
Selecting previously unselected package gnupg.
Preparing to unpack .../13-gnupg_2.2.19-3ubuntu2.1_all.deb ...
Unpacking gnupg (2.2.19-3ubuntu2.1) ...
Selecting previously unselected package gnupg2.
Preparing to unpack .../14-gnupg2_2.2.19-3ubuntu2.1_all.deb ...
Unpacking gnupg2 (2.2.19-3ubuntu2.1) ...
Setting up libksba8:amd64 (1.3.5-2) ...
Setting up libnpth0:amd64 (1.6-1) ...
Setting up libassuan0:amd64 (2.5.3-7ubuntu2) ...
Setting up gnupg-l10n (2.2.19-3ubuntu2.1) ...
Setting up gpgconf (2.2.19-3ubuntu2.1) ...
Setting up gpg (2.2.19-3ubuntu2.1) ...
Setting up gnupg-utils (2.2.19-3ubuntu2.1) ...
Setting up pinentry-curses (1.1.0-3build1) ...
Setting up gpg-agent (2.2.19-3ubuntu2.1) ...
Setting up gpgsm (2.2.19-3ubuntu2.1) ...
Setting up dirmngr (2.2.19-3ubuntu2.1) ...
Setting up gpg-wks-server (2.2.19-3ubuntu2.1) ...
Setting up gpg-wks-client (2.2.19-3ubuntu2.1) ...
Setting up gnupg (2.2.19-3ubuntu2.1) ...
Setting up gnupg2 (2.2.19-3ubuntu2.1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
+ apt install -y intel-mkl
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
gcc-7-base gcc-8-base libasan4 libcilkrts5 libgcc-7-dev libmkl-avx
libmkl-avx2 libmkl-avx512 libmkl-avx512-mic libmkl-computational-dev
libmkl-core libmkl-def libmkl-dev libmkl-gf-ilp64 libmkl-gf-lp64
libmkl-gnu-thread libmkl-intel-ilp64 libmkl-intel-lp64 libmkl-intel-thread
libmkl-interface-dev libmkl-locale libmkl-mc libmkl-mc3
libmkl-meta-computational libmkl-meta-interface libmkl-meta-threading
libmkl-pgi-thread libmkl-rt libmkl-sequential libmkl-tbb-thread
libmkl-threading-dev libmkl-vml-avx libmkl-vml-avx2 libmkl-vml-avx512
libmkl-vml-avx512-mic libmkl-vml-cmpt libmkl-vml-def libmkl-vml-mc
libmkl-vml-mc2 libmkl-vml-mc3 libmpx2 libomp-10-dev libomp-dev libomp5-10
libtbb-dev libtbb2 libubsan0
Suggested packages:
intel-mkl-doc libomp-10-doc libtbb-doc
The following NEW packages will be installed:
gcc-7-base gcc-8-base intel-mkl libasan4 libcilkrts5 libgcc-7-dev libmkl-avx
libmkl-avx2 libmkl-avx512 libmkl-avx512-mic libmkl-computational-dev
libmkl-core libmkl-def libmkl-dev libmkl-gf-ilp64 libmkl-gf-lp64
libmkl-gnu-thread libmkl-intel-ilp64 libmkl-intel-lp64 libmkl-intel-thread
libmkl-interface-dev libmkl-locale libmkl-mc libmkl-mc3
libmkl-meta-computational libmkl-meta-interface libmkl-meta-threading
libmkl-pgi-thread libmkl-rt libmkl-sequential libmkl-tbb-thread
libmkl-threading-dev libmkl-vml-avx libmkl-vml-avx2 libmkl-vml-avx512
libmkl-vml-avx512-mic libmkl-vml-cmpt libmkl-vml-def libmkl-vml-mc
libmkl-vml-mc2 libmkl-vml-mc3 libmpx2 libomp-10-dev libomp-dev libomp5-10
libtbb-dev libtbb2 libubsan0
0 upgraded, 48 newly installed, 0 to remove and 2 not upgraded.
Need to get 274 MB of archives.
After this operation, 1,733 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal/universe amd64 gcc-7-base amd64 7.5.0-6ubuntu2 [18.5 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal/universe amd64 gcc-8-base amd64 8.4.0-3ubuntu2 [18.7 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-locale amd64 2020.0.166-1 [25.8 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-intel-lp64 amd64 2020.0.166-1 [1,504 kB]
Get:5 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-intel-ilp64 amd64 2020.0.166-1 [1,357 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-gf-lp64 amd64 2020.0.166-1 [1,508 kB]
Get:7 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-gf-ilp64 amd64 2020.0.166-1 [1,370 kB]
Get:8 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-meta-interface amd64 2020.0.166-1 [7,416 B]
Get:9 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-intel-thread amd64 2020.0.166-1 [6,662 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-gnu-thread amd64 2020.0.166-1 [3,888 kB]
Get:11 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-sequential amd64 2020.0.166-1 [3,991 kB]
Get:12 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-tbb-thread amd64 2020.0.166-1 [4,642 kB]
Get:13 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-pgi-thread amd64 2020.0.166-1 [5,231 kB]
Get:14 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-meta-threading amd64 2020.0.166-1 [7,424 B]
Get:15 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-avx amd64 2020.0.166-1 [12.5 MB]
Get:16 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-avx2 amd64 2020.0.166-1 [11.0 MB]
Get:17 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-avx512 amd64 2020.0.166-1 [11.6 MB]
Get:18 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-avx512-mic amd64 2020.0.166-1 [12.5 MB]
Get:19 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-def amd64 2020.0.166-1 [8,785 kB]
Get:20 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-vml-def amd64 2020.0.166-1 [1,816 kB]
Get:21 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-core amd64 2020.0.166-1 [14.0 MB]
Get:22 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-mc amd64 2020.0.166-1 [10.2 MB]
Get:23 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-mc3 amd64 2020.0.166-1 [10.5 MB]
Get:24 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-vml-avx amd64 2020.0.166-1 [3,017 kB]
Get:25 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-vml-avx2 amd64 2020.0.166-1 [2,845 kB]
Get:26 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-vml-avx512 amd64 2020.0.166-1 [2,806 kB]
Get:27 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-vml-avx512-mic amd64 2020.0.166-1 [3,189 kB]
Get:28 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-vml-cmpt amd64 2020.0.166-1 [1,738 kB]
Get:29 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-vml-mc amd64 2020.0.166-1 [2,714 kB]
Get:30 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-vml-mc2 amd64 2020.0.166-1 [2,711 kB]
Get:31 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-vml-mc3 amd64 2020.0.166-1 [2,720 kB]
Get:32 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-meta-computational amd64 2020.0.166-1 [7,468 B]
Get:33 http://archive.ubuntu.com/ubuntu focal/universe amd64 libomp5-10 amd64 1:10.0.0-4ubuntu1 [300 kB]
Get:34 http://archive.ubuntu.com/ubuntu focal/universe amd64 libomp-10-dev amd64 1:10.0.0-4ubuntu1 [47.7 kB]
Get:35 http://archive.ubuntu.com/ubuntu focal/universe amd64 libomp-dev amd64 1:10.0-50~exp1 [2,824 B]
Get:36 http://archive.ubuntu.com/ubuntu focal/universe amd64 libasan4 amd64 7.5.0-6ubuntu2 [358 kB]
Get:37 http://archive.ubuntu.com/ubuntu focal/universe amd64 libubsan0 amd64 7.5.0-6ubuntu2 [126 kB]
Get:38 http://archive.ubuntu.com/ubuntu focal/universe amd64 libcilkrts5 amd64 7.5.0-6ubuntu2 [42.7 kB]
Get:39 http://archive.ubuntu.com/ubuntu focal/universe amd64 libmpx2 amd64 8.4.0-3ubuntu2 [11.8 kB]
Get:40 http://archive.ubuntu.com/ubuntu focal/universe amd64 libgcc-7-dev amd64 7.5.0-6ubuntu2 [2,311 kB]
Get:41 http://archive.ubuntu.com/ubuntu focal/universe amd64 libtbb2 amd64 2020.1-2 [124 kB]
Get:42 http://archive.ubuntu.com/ubuntu focal/universe amd64 libtbb-dev amd64 2020.1-2 [273 kB]
Get:43 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-rt amd64 2020.0.166-1 [933 kB]
Get:44 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-interface-dev amd64 2020.0.166-1 [4,599 kB]
Get:45 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-threading-dev amd64 2020.0.166-1 [22.9 MB]
Get:46 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-computational-dev amd64 2020.0.166-1 [96.8 MB]
Get:47 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 libmkl-dev amd64 2020.0.166-1 [519 kB]
Get:48 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 intel-mkl amd64 2020.0.166-1 [11.7 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 274 MB in 15s (18.6 MB/s)
Selecting previously unselected package gcc-7-base:amd64.
(Reading database ... 59173 files and directories currently installed.)
Preparing to unpack .../00-gcc-7-base_7.5.0-6ubuntu2_amd64.deb ...
Unpacking gcc-7-base:amd64 (7.5.0-6ubuntu2) ...
Selecting previously unselected package gcc-8-base:amd64.
Preparing to unpack .../01-gcc-8-base_8.4.0-3ubuntu2_amd64.deb ...
Unpacking gcc-8-base:amd64 (8.4.0-3ubuntu2) ...
Selecting previously unselected package libmkl-locale.
Preparing to unpack .../02-libmkl-locale_2020.0.166-1_amd64.deb ...
Unpacking libmkl-locale (2020.0.166-1) ...
Selecting previously unselected package libmkl-intel-lp64:amd64.
Preparing to unpack .../03-libmkl-intel-lp64_2020.0.166-1_amd64.deb ...
Unpacking libmkl-intel-lp64:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-intel-ilp64:amd64.
Preparing to unpack .../04-libmkl-intel-ilp64_2020.0.166-1_amd64.deb ...
Unpacking libmkl-intel-ilp64:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-gf-lp64:amd64.
Preparing to unpack .../05-libmkl-gf-lp64_2020.0.166-1_amd64.deb ...
Unpacking libmkl-gf-lp64:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-gf-ilp64:amd64.
Preparing to unpack .../06-libmkl-gf-ilp64_2020.0.166-1_amd64.deb ...
Unpacking libmkl-gf-ilp64:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-meta-interface:amd64.
Preparing to unpack .../07-libmkl-meta-interface_2020.0.166-1_amd64.deb ...
Unpacking libmkl-meta-interface:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-intel-thread:amd64.
Preparing to unpack .../08-libmkl-intel-thread_2020.0.166-1_amd64.deb ...
Unpacking libmkl-intel-thread:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-gnu-thread:amd64.
Preparing to unpack .../09-libmkl-gnu-thread_2020.0.166-1_amd64.deb ...
Unpacking libmkl-gnu-thread:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-sequential:amd64.
Preparing to unpack .../10-libmkl-sequential_2020.0.166-1_amd64.deb ...
Unpacking libmkl-sequential:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-tbb-thread:amd64.
Preparing to unpack .../11-libmkl-tbb-thread_2020.0.166-1_amd64.deb ...
Unpacking libmkl-tbb-thread:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-pgi-thread:amd64.
Preparing to unpack .../12-libmkl-pgi-thread_2020.0.166-1_amd64.deb ...
Unpacking libmkl-pgi-thread:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-meta-threading:amd64.
Preparing to unpack .../13-libmkl-meta-threading_2020.0.166-1_amd64.deb ...
Unpacking libmkl-meta-threading:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-avx:amd64.
Preparing to unpack .../14-libmkl-avx_2020.0.166-1_amd64.deb ...
Unpacking libmkl-avx:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-avx2:amd64.
Preparing to unpack .../15-libmkl-avx2_2020.0.166-1_amd64.deb ...
Unpacking libmkl-avx2:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-avx512:amd64.
Preparing to unpack .../16-libmkl-avx512_2020.0.166-1_amd64.deb ...
Unpacking libmkl-avx512:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-avx512-mic:amd64.
Preparing to unpack .../17-libmkl-avx512-mic_2020.0.166-1_amd64.deb ...
Unpacking libmkl-avx512-mic:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-def:amd64.
Preparing to unpack .../18-libmkl-def_2020.0.166-1_amd64.deb ...
Unpacking libmkl-def:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-vml-def:amd64.
Preparing to unpack .../19-libmkl-vml-def_2020.0.166-1_amd64.deb ...
Unpacking libmkl-vml-def:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-core:amd64.
Preparing to unpack .../20-libmkl-core_2020.0.166-1_amd64.deb ...
Unpacking libmkl-core:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-mc:amd64.
Preparing to unpack .../21-libmkl-mc_2020.0.166-1_amd64.deb ...
Unpacking libmkl-mc:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-mc3:amd64.
Preparing to unpack .../22-libmkl-mc3_2020.0.166-1_amd64.deb ...
Unpacking libmkl-mc3:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-vml-avx:amd64.
Preparing to unpack .../23-libmkl-vml-avx_2020.0.166-1_amd64.deb ...
Unpacking libmkl-vml-avx:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-vml-avx2:amd64.
Preparing to unpack .../24-libmkl-vml-avx2_2020.0.166-1_amd64.deb ...
Unpacking libmkl-vml-avx2:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-vml-avx512:amd64.
Preparing to unpack .../25-libmkl-vml-avx512_2020.0.166-1_amd64.deb ...
Unpacking libmkl-vml-avx512:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-vml-avx512-mic:amd64.
Preparing to unpack .../26-libmkl-vml-avx512-mic_2020.0.166-1_amd64.deb ...
Unpacking libmkl-vml-avx512-mic:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-vml-cmpt:amd64.
Preparing to unpack .../27-libmkl-vml-cmpt_2020.0.166-1_amd64.deb ...
Unpacking libmkl-vml-cmpt:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-vml-mc:amd64.
Preparing to unpack .../28-libmkl-vml-mc_2020.0.166-1_amd64.deb ...
Unpacking libmkl-vml-mc:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-vml-mc2:amd64.
Preparing to unpack .../29-libmkl-vml-mc2_2020.0.166-1_amd64.deb ...
Unpacking libmkl-vml-mc2:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-vml-mc3:amd64.
Preparing to unpack .../30-libmkl-vml-mc3_2020.0.166-1_amd64.deb ...
Unpacking libmkl-vml-mc3:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-meta-computational:amd64.
Preparing to unpack .../31-libmkl-meta-computational_2020.0.166-1_amd64.deb ...
Unpacking libmkl-meta-computational:amd64 (2020.0.166-1) ...
Selecting previously unselected package libomp5-10:amd64.
Preparing to unpack .../32-libomp5-10_1%3a10.0.0-4ubuntu1_amd64.deb ...
Unpacking libomp5-10:amd64 (1:10.0.0-4ubuntu1) ...
Selecting previously unselected package libomp-10-dev.
Preparing to unpack .../33-libomp-10-dev_1%3a10.0.0-4ubuntu1_amd64.deb ...
Unpacking libomp-10-dev (1:10.0.0-4ubuntu1) ...
Selecting previously unselected package libomp-dev.
Preparing to unpack .../34-libomp-dev_1%3a10.0-50~exp1_amd64.deb ...
Unpacking libomp-dev (1:10.0-50~exp1) ...
Selecting previously unselected package libasan4:amd64.
Preparing to unpack .../35-libasan4_7.5.0-6ubuntu2_amd64.deb ...
Unpacking libasan4:amd64 (7.5.0-6ubuntu2) ...
Selecting previously unselected package libubsan0:amd64.
Preparing to unpack .../36-libubsan0_7.5.0-6ubuntu2_amd64.deb ...
Unpacking libubsan0:amd64 (7.5.0-6ubuntu2) ...
Selecting previously unselected package libcilkrts5:amd64.
Preparing to unpack .../37-libcilkrts5_7.5.0-6ubuntu2_amd64.deb ...
Unpacking libcilkrts5:amd64 (7.5.0-6ubuntu2) ...
Selecting previously unselected package libmpx2:amd64.
Preparing to unpack .../38-libmpx2_8.4.0-3ubuntu2_amd64.deb ...
Unpacking libmpx2:amd64 (8.4.0-3ubuntu2) ...
Selecting previously unselected package libgcc-7-dev:amd64.
Preparing to unpack .../39-libgcc-7-dev_7.5.0-6ubuntu2_amd64.deb ...
Unpacking libgcc-7-dev:amd64 (7.5.0-6ubuntu2) ...
Selecting previously unselected package libtbb2:amd64.
Preparing to unpack .../40-libtbb2_2020.1-2_amd64.deb ...
Unpacking libtbb2:amd64 (2020.1-2) ...
Selecting previously unselected package libtbb-dev:amd64.
Preparing to unpack .../41-libtbb-dev_2020.1-2_amd64.deb ...
Unpacking libtbb-dev:amd64 (2020.1-2) ...
Selecting previously unselected package libmkl-rt:amd64.
Preparing to unpack .../42-libmkl-rt_2020.0.166-1_amd64.deb ...
Unpacking libmkl-rt:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-interface-dev:amd64.
Preparing to unpack .../43-libmkl-interface-dev_2020.0.166-1_amd64.deb ...
Unpacking libmkl-interface-dev:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-threading-dev:amd64.
Preparing to unpack .../44-libmkl-threading-dev_2020.0.166-1_amd64.deb ...
Unpacking libmkl-threading-dev:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-computational-dev:amd64.
Preparing to unpack .../45-libmkl-computational-dev_2020.0.166-1_amd64.deb ...
Unpacking libmkl-computational-dev:amd64 (2020.0.166-1) ...
Selecting previously unselected package libmkl-dev:amd64.
Preparing to unpack .../46-libmkl-dev_2020.0.166-1_amd64.deb ...
Unpacking libmkl-dev:amd64 (2020.0.166-1) ...
Selecting previously unselected package intel-mkl:amd64.
Preparing to unpack .../47-intel-mkl_2020.0.166-1_amd64.deb ...
Unpacking intel-mkl:amd64 (2020.0.166-1) ...
Setting up libtbb2:amd64 (2020.1-2) ...
Setting up libmkl-locale (2020.0.166-1) ...
Setting up libmkl-vml-cmpt:amd64 (2020.0.166-1) ...
Setting up libmkl-mc:amd64 (2020.0.166-1) ...
Setting up libmkl-avx512:amd64 (2020.0.166-1) ...
Setting up libmkl-vml-avx512:amd64 (2020.0.166-1) ...
Setting up libmkl-vml-mc:amd64 (2020.0.166-1) ...
Setting up gcc-7-base:amd64 (7.5.0-6ubuntu2) ...
Setting up libmkl-avx512-mic:amd64 (2020.0.166-1) ...
Setting up libasan4:amd64 (7.5.0-6ubuntu2) ...
Setting up libmkl-tbb-thread:amd64 (2020.0.166-1) ...
Setting up gcc-8-base:amd64 (8.4.0-3ubuntu2) ...
Setting up libmpx2:amd64 (8.4.0-3ubuntu2) ...
Setting up libmkl-avx2:amd64 (2020.0.166-1) ...
Setting up libmkl-gnu-thread:amd64 (2020.0.166-1) ...
Setting up libomp5-10:amd64 (1:10.0.0-4ubuntu1) ...
Setting up libcilkrts5:amd64 (7.5.0-6ubuntu2) ...
Setting up libubsan0:amd64 (7.5.0-6ubuntu2) ...
Setting up libtbb-dev:amd64 (2020.1-2) ...
Setting up libmkl-vml-avx512-mic:amd64 (2020.0.166-1) ...
Setting up libmkl-def:amd64 (2020.0.166-1) ...
Setting up libmkl-vml-mc3:amd64 (2020.0.166-1) ...
Setting up libmkl-vml-def:amd64 (2020.0.166-1) ...
Setting up libmkl-vml-mc2:amd64 (2020.0.166-1) ...
Setting up libmkl-avx:amd64 (2020.0.166-1) ...
Setting up libmkl-gf-lp64:amd64 (2020.0.166-1) ...
Setting up libmkl-sequential:amd64 (2020.0.166-1) ...
Setting up libmkl-intel-thread:amd64 (2020.0.166-1) ...
Setting up libmkl-gf-ilp64:amd64 (2020.0.166-1) ...
Setting up libmkl-vml-avx2:amd64 (2020.0.166-1) ...
Setting up libmkl-mc3:amd64 (2020.0.166-1) ...
Setting up libmkl-intel-ilp64:amd64 (2020.0.166-1) ...
Setting up libomp-10-dev (1:10.0.0-4ubuntu1) ...
Setting up libmkl-intel-lp64:amd64 (2020.0.166-1) ...
Setting up libmkl-vml-avx:amd64 (2020.0.166-1) ...
Setting up libmkl-pgi-thread:amd64 (2020.0.166-1) ...
Setting up libmkl-core:amd64 (2020.0.166-1) ...
Setting up libmkl-meta-computational:amd64 (2020.0.166-1) ...
Setting up libmkl-computational-dev:amd64 (2020.0.166-1) ...
Setting up libgcc-7-dev:amd64 (7.5.0-6ubuntu2) ...
Setting up libmkl-meta-interface:amd64 (2020.0.166-1) ...
Setting up libomp-dev (1:10.0-50~exp1) ...
Setting up libmkl-meta-threading:amd64 (2020.0.166-1) ...
Setting up libmkl-rt:amd64 (2020.0.166-1) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
Intel Math Kernel Library (Intel MKL)
-------------------------------------
Intel MKL's Single Dynamic Library (SDL) is installed on your machine. This
shared object can be used as an alternative to both libblas.so.3 and
liblapack.so.3, so that packages built against BLAS/LAPACK can directly use MKL
without rebuild.
However, MKL is non-free software, and in particular its source code is not
publicly available. By using MKL as the default BLAS/LAPACK implementation, you
might be violating the licensing terms of copyleft software that would become
dynamically linked against it. Please verify that the licensing terms of the
program(s) that you intend to use with MKL are compatible with the MKL
licensing terms. For the case of software under the GNU General Public License,
you may want to read this FAQ:
https://www.gnu.org/licenses/gpl-faq.html#GPLIncompatibleLibs
If you don't know what MKL is, or unwilling to set it as default, just choose
the preset value or simply type Enter.
Use libmkl_rt.so as the default alternative to BLAS/LAPACK? [yes/no]
Newer versions of MKL are now uploaded into a different repository called "oneapi-mkl" instead of just "mkl" - the newest version in the repository referenced in this guide stands at around 2020.something, whereas the current version is 2023.something.
These are the instructions that they provide in their webpage:
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
Hi,
Thanks a lot for your wonderful script. I am trying to update bioconductor docker to support MKL. I followed all the mentioned steps, but I still get that sessionInfo() uses OpenBLAS:
sessionInfo()
R version 4.0.0 (2020-04-24)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.4 LTS
Matrix products: default
BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.2.20.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=C
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] BiocManager_1.30.10
loaded via a namespace (and not attached):
[1] compiler_4.0.0
I were able to compile R 4.0 with MKL with no problem, and the performance increase is drastic. I am trying to see if I can achieve the same without compiling R from scratch. I would greatly appreciate your feedback.
Thanks,
-- Shahin.
Sebastien and I bumped Debian's OpenBLAS priority number to 100. That means people who use Buster (or newer) will find this script not working because it assigns 50 to MKL (I guess they still need the /opt
installation layout for some reason).
I think the update alternatives is wrong. But don't know how to fix it:
After following the steps I end up with:
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/liblapack.so.3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.