- 追加された行はこの色です。
- 削除された行はこの色です。
#author("2020-03-30T16:27:44+00:00","default:sysosa","sysosa")
Intel Compilers
#author("2020-03-30T22:06:46+00:00","default:sysosa","sysosa")
Intel Compilers runtime ライブラリ
***再配布可能ライブラリ [#sb504275]
インテルコンパイラを購入して、ソースからビルドしていざ実行する際、ビルドしたマシンなら
問題ないでしょうが、他のPCにコピーして実行する際、
「ライブラリがないよ」
って怒られる。
って怒られる。まぁ当然なお話.
そんなときに使うサイトがここ
そんなときに使うサイトがここ Intel Compilers runtime ライブラリ 配布サイト
[[https://software.intel.com/en-us/articles/intel-compilers-redistributable-libraries-by-version>+https://software.intel.com/en-us/articles/intel-compilers-redistributable-libraries-by-version]]
コンパイルしたバイナリーを実行したいノードにて下記手順でintelの再配布可能ライブラリを導入します
このruntime ライブラリを導入すれば icc でコンパイルされたバイナリーを実行することができます
導入方法ですが、ここでは簡単にyumで入れてみたいと思います
#code(nonumber){{
[root@c ~]# yum install nextgen-yum4.noarch
[root@c ~]# yum-config-manager --add-repo https://yum.repos.intel.com/2019/setup/intel-psxe-runtime-2019.repo
[root@c ~]# rpm --import https://yum.repos.intel.com/2019/setup/RPM-GPG-KEY-intel-psxe-runtime-2019
[root@c ~]# cat /etc/yum.repos.d/intel-psxe-runtime-2019.repo #確認
[intel-psxe-runtime-2019]
name=Intel(R) Parallel Studio XE 2019 runtime
baseurl=https://yum.repos.intel.com/2019
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-intel-psxe-runtime-2019
}}
次にインストールするruntimeはicc向けifort向けとか沢山あって
#code(nonumber){{
[root@c ~]# yum list |grep intel-psxe-runtime-2019
intel-comp-common-runtime.noarch 2019.6-324 intel-psxe-runtime-2019
intel-comp-runtime-32bit.i486 2019.6-324 intel-psxe-runtime-2019
intel-comp-runtime-64bit.x86_64 2019.6-324 intel-psxe-runtime-2019
intel-daal-common-runtime.noarch 2019.6-324 intel-psxe-runtime-2019
intel-daal-runtime-32bit.i486 2019.6-324 intel-psxe-runtime-2019
intel-daal-runtime-64bit.x86_64 2019.6-324 intel-psxe-runtime-2019
intel-icc-common-runtime.noarch 2019.6-324 intel-psxe-runtime-2019
intel-icc-runtime-32bit.i486 2019.6-324 intel-psxe-runtime-2019
intel-icc-runtime-64bit.x86_64 2019.6-324 intel-psxe-runtime-2019
intel-ifort-common-runtime.noarch 2019.6-324 intel-psxe-runtime-2019
intel-ifort-runtime-32bit.i486 2019.6-324 intel-psxe-runtime-2019
intel-ifort-runtime-64bit.x86_64 2019.6-324 intel-psxe-runtime-2019
intel-ipp-common-runtime.noarch 2019.6-324 intel-psxe-runtime-2019
intel-ipp-runtime-32bit.i486 2019.6-324 intel-psxe-runtime-2019
intel-ipp-runtime-64bit.x86_64 2019.6-324 intel-psxe-runtime-2019
intel-mkl-common-runtime.noarch 2019.6-324 intel-psxe-runtime-2019
intel-mkl-runtime-32bit.i486 2019.6-324 intel-psxe-runtime-2019
intel-mkl-runtime-64bit.x86_64 2019.6-324 intel-psxe-runtime-2019
intel-mpi-runtime-64bit.x86_64 2019.6-324 intel-psxe-runtime-2019
intel-openmp-runtime-32bit.i486 2019.6-324 intel-psxe-runtime-2019
intel-openmp-runtime-64bit.x86_64 2019.6-324 intel-psxe-runtime-2019
intel-psxe-common-runtime.noarch 2019.6-324 intel-psxe-runtime-2019
intel-psxe-runtime.i486 2019.6-324 intel-psxe-runtime-2019
intel-psxe-runtime.x86_64 2019.6-324 intel-psxe-runtime-2019
intel-tbb-common-runtime.noarch 2019.6-324 intel-psxe-runtime-2019
intel-tbb-libs-runtime-32bit.i486 2019.6-324 intel-psxe-runtime-2019
intel-tbb-libs-runtime-64bit.x86_64 2019.6-324 intel-psxe-runtime-2019
intel-tbb-runtime-32bit.i486 2019.6-324 intel-psxe-runtime-2019
intel-tbb-runtime-64bit.x86_64 2019.6-324 intel-psxe-runtime-2019
}}
と多種に及ぶ。
ここではintel mpiでコンパイルしたrelionを動かしたいので「&color(magenta){intel-mpi-runtime-64bit};」を入れます。
パッケージには複数の「版」が存在していて「&color(magenta){intel-mpi-runtime-64bit};」では
#code(nonumber){{
[root@c ~]# yum --showduplicates list intel-mpi-runtime-64bit
:
Available Packages
intel-mpi-runtime-64bit.x86_64 2019.0-117 intel-psxe-runtime-2019
intel-mpi-runtime-64bit.x86_64 2019.1-144 intel-psxe-runtime-2019
intel-mpi-runtime-64bit.x86_64 2019.2-187 intel-psxe-runtime-2019
intel-mpi-runtime-64bit.x86_64 2019.3-199 intel-psxe-runtime-2019
intel-mpi-runtime-64bit.x86_64 2019.4-243 intel-psxe-runtime-2019
intel-mpi-runtime-64bit.x86_64 2019.5-281 intel-psxe-runtime-2019
intel-mpi-runtime-64bit.x86_64 2019.6-324 intel-psxe-runtime-2019
[root@c ~]#
}}
となります。何もしなければ最新の「&color(orangered){2019.6-324};」版がインストールされますが、使用したコンパイラが「&color(orange){''2019.4-243''};」なので「 &color(magenta){intel-mpi-runtime-64bit-2019.4-243};」を選択します。
関連ライブラリも合わせて下記のようにインストールを行います
#code(nonumber){{
yum install intel-mpi-runtime-64bit-2019.4-243 \
intel-mkl-runtime-64bit-2019.4-243 intel-mkl-common-runtime-2019.4-243 \
intel-comp-runtime-64bit-2019.4-243 intel-comp-common-runtime-2019.4-243
}}
***内容 [#odbe8dae]
「intel-mpi-runtime-64bit-2019.4-243」パッケージをインストールすると下記のように展開される。
#code(nonumber){{
[root@c ~]# ls -l /opt/intel/
total 0
lrwxrwxrwx 1 root root 17 Mar 29 20:20 psxe_runtime -> psxe_runtime_2019
lrwxrwxrwx 1 root root 23 Mar 29 20:20 psxe_runtime_2019 -> psxe_runtime_2019.4.243
drwxr-xr-x 5 root root 57 Mar 29 20:20 psxe_runtime_2019.4.243
[root@c ~]#
}}
***つかう [#v46e110d]
単純に
#code(nonumber){{
source /opt/intel/psxe_runtime/linux/mpi/intel64/bin/mpivars.sh intel64
}}
で環境変数らは定義される。
&color(red){*};「/opt/intel/psxe_runtime/linux/bin/psxevars.sh」は正しく機能しなかった
[[EnvironmentModules]]で制御するなら下記のようなmoduleファイルを用意する
#code(nonumber){{
#%Module1.0
#
set icc /opt/intel/psxe_runtime_2019.4.243/linux
set tbb $icc/tbb/lib/intel64/gcc4.7
set mpi $icc/mpi/intel64/libfabric/lib:$icc/mpi/intel64/lib/release:$icc/mpi/intel64/lib
set mkl $icc/mkl/lib/intel64
set cmp $icc/compiler/lib/intel64_lin
setenv FI_PROVIDER_PATH $icc/mpi/intel64/libfabric/lib/prov
prepend-path MANPATH $icc/mpi/man
prepend-path LIBRARY_PATH $icc/mpi/intel64/libfabric/lib
prepend-path LD_LIBRARY_PATH $mpi:$mkl:$cmp:$tbb
prepend-path PATH $icc/mpi/intel64/libfabric/bin:$icc/mpi/intel64/bin
prepend-path CLASSPATH $icc/mpi/intel64/lib/mpi.jar
setenv I_MPI_ROOT $icc/mpi
}}