Intel Math Kernel Library
サイトhttps://software.intel.com/content/www/us/en/develop/tools/math-kernel-library.html

インテルさんのチップをお持ちならこのライブラリで計算が早くなる(かもよ)

MKLはintelコンパイラーに同封されていて、購入すれば使える。
あるいはユーザ登録すればフリーで入手可能で、gccを噛ましても使えます。
ライセンスに関してはここhttps://software.intel.com/content/www/us/en/develop/articles/intel-math-kernel-library-license-faq.html
再配布可能なので1つライセンスを取得してクラスターに配布とかOKみたい

ここではユーザ登録してMKLをインストールしてみます

入手

ここのページの「Register & Download」ボタンを押下します
https://software.intel.com/content/www/us/en/develop/tools/math-kernel-library/choose-download/linux.html

「Get Intel® Performance Libraries. Free.」ページにて
https://software.seek.intel.com/performance-libraries
入力欄に必要事項を記載して、「submit」ボタンを押下します。
2020y08m09d_004502254.png

その後ダウンロード画面に移って、「ChooseProduct to Download」にて「Intel Math Kernel Library for Linux」を選択して、
その下の「Choose a Version」から最新版とかを選択します。
2020y08m09d_004842126.png

ダウンロードの選択肢が表示され
「Customaizeable Package」
「Full Package」
が選べる。ここでは「Full Package」を選択してファイル「I_mkl2020.2.254.tgz」を得た

インストール

取得したファイルを展開します。

[root@c ~]# cd /opt/src/
[root@c src]# tar xzf /tmp/l_mkl_2020.2.254.tgz
[root@c src]# cd l_mkl_2020.2.254/
 
[root@c l_mkl_2020.2.254]# ls -CF
install_GUI.sh*  install.sh*  ipsxe_support_mkl.txt  license.txt  pset/  PUBLIC_KEY.PUB  rpm/  silent.cfg*
 
[root@c l_mkl_2020.2.254]#

この中にある「install_GUI.sh」を起動させます

[root@c l_mkl_2020.2.254]# ./install_GUI.sh

すると下記のようなアプリ画面が立ち上がります。
2020y08m09d_020444891.png

暫くすると、インストールへの「End User License Agreement」が表示され、内容を読んでライセンスに同意するなら画面下部の
「I accept the terms of the license agreement」にチェックを入れて、「Next」ボタンを押下します。
2020y08m09d_020737067.png

「Installation summary」画面が表示されます。
既定ではインストール先は「/opt/intel」で、C/C++とFortran向けのIntel Math Kernel Libraryがインストールされます。
不要な項目があるなら「Customaize...」ボタンを押下して不要なパッケージを削除します。
ここではFortranを外したいと思いますので、「Customize...」ボタンを押下します。
2020y08m09d_021224090.png

すると「Choose an installtion location」画面に移ります。
「Customize」なのでインストール先の変更も受け付けれるようです。
ここではそのまま「/opt/intel」を使いたいので、そのままで「Next」ボタンを押下します。
2020y08m09d_021455371.png

次に「Select components to install」画面に移ります。
ここで「Target platform architecture」から「Intel 64」のみを選び、リストのComponentsからは
「Intel Math Kernel Library 2020 Update 2 for Fortran」のチェックを外して、
加えて「C/C++」の「PGI* C/C++ compiler support」も外します。  PGIコンパイラを持ってないので
そうして、「Next」ボタンを押下します。
2020y08m09d_021920091.png

「Installtion summary」画面に戻ります。
内容を確認して「Install」ボタンを押下します。
2020y08m09d_022045027.png

インストール進捗画面が表示され
2020y08m09d_022114962.png

「Complete」画面が表示され、インストールは完了となります。「Finish」ボタンを押下して終了します。
2020y08m09d_022335842.png

フォルダ確認

インストール先のフォルダ構成を確認します

[root@c l_mkl_2020.2.254]# cd /opt/intel/
[root@c intel]# ls -l
total 0
drwxr-xr-x. 2 root root  53 Aug  9 02:23 bin
lrwxrwxrwx. 1 root root  28 Aug  9 02:23 compilers_and_libraries -> compilers_and_libraries_2020
drwxr-xr-x. 3 root root  19 Aug  9 02:23 compilers_and_libraries_2020
drwxr-xr-x. 4 root root  36 Jun 26 05:23 compilers_and_libraries_2020.2.254
drwxr-xr-x. 6 root root 102 Jun 26 04:43 conda_channel
drwxr-xr-x. 4 root root  26 Jun 26 05:16 documentation_2020
lrwxrwxrwx. 1 root root  33 Aug  9 02:23 lib -> compilers_and_libraries/linux/lib
lrwxrwxrwx. 1 root root  33 Aug  9 02:23 mkl -> compilers_and_libraries/linux/mkl
lrwxrwxrwx. 1 root root  29 Aug  9 02:23 parallel_studio_xe_2020 -> parallel_studio_xe_2020.2.108
drwxr-xr-x. 5 root root 196 Aug  9 02:23 parallel_studio_xe_2020.2.108
lrwxrwxrwx. 1 root root  33 Aug  9 02:23 tbb -> compilers_and_libraries/linux/tbb
 
[root@c intel]#

つかう

source /opt/intel/bin/compilervars.sh intel64

と実行します。

Environment Modules

EnvironmentModulesに対応するためには下記のようなファイル[mklRuntime]を用意します。

#%Module1.0
#
set icc /opt/intel/compilers_and_libraries_2020.2.254/linux
#
setenv INTEL_LICENSE_FILE $icc/licenses:/opt/intel/licenses
#
setenv MKLROOT            $icc/mkl
setenv TBBROOT            $icc/tbb
#
setenv CPATH              $icc/mkl/include:$icc/tbb/include
setenv NLSPATH            $icc/compiler/lib/intel64/locale/%l_%t/%N:$icc/mkl/lib/intel64_lin/locale/%l_%t/%N
setenv LIBRARY_PATH       $icc/compiler/lib/intel64_lin:$icc/mkl/lib/intel64_lin:$icc/tbb/lib/intel64/gcc4.8
#
prepend-path PATH            $icc/bin/intel64:$icc/bin
prepend-path LD_LIBRARY_PATH $icc/compiler/lib/intel64_lin:$icc/mkl/lib/intel64_lin:$icc/tbb/lib/intel64/gcc4.8
prepend-path PKG_CONFIG_PATH $icc/mkl/bin/pkgconfig
最新の60件
2023-09-20 2023-09-19 2023-09-18 2023-09-17 2023-09-16 2023-09-14 2023-09-12 2023-09-11 2023-09-08 2023-09-05 2023-09-02 2023-08-30 2023-08-29 2023-08-28 2023-08-27 2023-08-22 2023-08-20 2023-08-18 2023-08-17 2023-08-14 2023-08-12 2023-08-09 2023-08-07 2023-08-06 2023-08-03 2023-07-31 2023-07-29 2023-07-27 2023-07-25 2023-07-24 2023-07-22 2023-07-17 2023-07-16 2023-07-09 2023-07-08

edit


トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2020-11-08 (日) 11:49:26