- 追加された行はこの色です。
- 削除された行はこの色です。
#author("2020-03-29T11:16:19+00:00","default:sysosa","sysosa")
#author("2020-03-30T16:27:44+00:00","default:sysosa","sysosa")
Intel Compilers
***再配布可能ライブラリ [#sb504275]
インテルコンパイラを購入して、ソースからビルドしていざ実行する際、ビルドしたマシンなら
問題ないでしょうが、他のPCにコピーして実行する際、
「ライブラリがないよ」
って怒られる場合がある。
って怒られる。
そんなときに使うサイトがここ
[[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の再配布可能ライブラリを導入します
#code(nonumber){{
[root@c ~]# yum install nextgen-yum4.noarch # yumをversion3からversion4にします
[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向けとか沢山あって
[root@c ~]# rpm --import https://yum.repos.intel.com/2019/setup/RPM-GPG-KEY-intel-psxe-runtime-2019
#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
}}
次にインストールするruntimeを選ぶ
と多種に及ぶ。
ここでは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 ~]#
}}
***例 [#d13308ef]
例えば、インテルコンパイラでコンパイルした relion_refine がどんなライブラリを参照するかをlddで調べると
***つかう [#v46e110d]
単純に
#code(nonumber){{
[illya@c ~]$ ldd /Appl/relion-3.0.6.icc/bin/relion_refine
linux-vdso.so.1 => (0x00007ffe689f3000)
libmkl_intel_lp64.so => /opt/intel/compilers_and_libraries_2018.2.199/linux/mkl/lib/intel64/libmkl_intel_lp64.so (0x00007f646e16d000)
libmkl_intel_thread.so => /opt/intel/compilers_and_libraries_2018.2.199/linux/mkl/lib/intel64/libmkl_intel_thread.so (0x00007f646be21000)
libmkl_core.so => /opt/intel/compilers_and_libraries_2018.2.199/linux/mkl/lib/intel64/libmkl_core.so (0x00007f6467e18000)
libiomp5.so => /opt/intel/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64/libiomp5.so (0x00007f6467a40000)
libimf.so => /opt/intel/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64/libimf.so (0x00007f64674b0000)
libmpi_cxx.so.1 => /Appl/local/openmpi-1.10.7_intel-18.0.2/lib/libmpi_cxx.so.1 (0x00007f6467295000)
libmpi.so.12 => /Appl/local/openmpi-1.10.7_intel-18.0.2/lib/libmpi.so.12 (0x00007f6466f85000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f6466d81000)
libtbb.so.2 => /opt/intel/compilers_and_libraries_2018.2.199/linux/tbb/lib/intel64/gcc4.7/libtbb.so.2 (0x00007f6466b26000)
libtiff.so.5 => /lib64/libtiff.so.5 (0x00007f64668b2000)
libm.so.6 => /lib64/libm.so.6 (0x00007f64665b0000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f64662a9000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f6466093000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f6465e77000)
libc.so.6 => /lib64/libc.so.6 (0x00007f6465aaa000)
/lib64/ld-linux-x86-64.so.2 (0x00007f646ec5a000)
libintlc.so.5 => /opt/intel/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64/libintlc.so.5 (0x00007f646583c000)
libopen-rte.so.12 => /Appl/local/openmpi-1.10.7_intel-18.0.2/lib/libopen-rte.so.12 (0x00007f64655a5000)
libopen-pal.so.13 => /Appl/local/openmpi-1.10.7_intel-18.0.2/lib/libopen-pal.so.13 (0x00007f6465293000)
librt.so.1 => /lib64/librt.so.1 (0x00007f646508b000)
libutil.so.1 => /lib64/libutil.so.1 (0x00007f6464e88000)
libirng.so => /opt/intel/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64/libirng.so (0x00007f6464b14000)
libcilkrts.so.5 => /opt/intel/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64/libcilkrts.so.5 (0x00007f64648d9000)
libsvml.so => /opt/intel/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64/libsvml.so (0x00007f6463223000)
libjbig.so.2.0 => /lib64/libjbig.so.2.0 (0x00007f6463017000)
libjpeg.so.62 => /lib64/libjpeg.so.62 (0x00007f6462dc2000)
libz.so.1 => /lib64/libz.so.1 (0x00007f6462bac000)
[illya@c ~]$
source /opt/intel/psxe_runtime/linux/mpi/intel64/bin/mpivars.sh intel64
}}
となる。「/opt/intel」から参照される部分を下記に示す
で環境変数らは定義される。
&color(red){*};「/opt/intel/psxe_runtime/linux/bin/psxevars.sh」は正しく機能しなかった
[[EnvironmentModules]]で制御するなら下記のようなmoduleファイルを用意する
#code(nonumber){{
libmkl_core.so => /opt/intel/compilers_and_libraries_2018.2.199/linux/mkl/lib/intel64/libmkl_core.so
libmkl_intel_lp64.so => /opt/intel/compilers_and_libraries_2018.2.199/linux/mkl/lib/intel64/libmkl_intel_lp64.so
libmkl_intel_thread.so => /opt/intel/compilers_and_libraries_2018.2.199/linux/mkl/lib/intel64/libmkl_intel_thread.so
libcilkrts.so.5 => /opt/intel/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64/libcilkrts.so.5
libintlc.so.5 => /opt/intel/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64/libintlc.so.5
libimf.so => /opt/intel/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64/libimf.so
libiomp5.so => /opt/intel/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64/libiomp5.so
libirng.so => /opt/intel/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64/libirng.so
libsvml.so => /opt/intel/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64/libsvml.so
libtbb.so.2 => /opt/intel/compilers_and_libraries_2018.2.199/linux/tbb/lib/intel64/gcc4.7/libtbb.so.2
#%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
}}