intel complerが無償で使えるそうな
https://software.intel.com/content/www/us/en/develop/articles/free-intel-software-developer-tools.html

ドキュメントを読むと商用でも使えるそうな.
https://www.intel.co.jp/content/www/jp/ja/software/oneapi-commercial-faq.html
2023y05m12d_043058923.png

入手方法

入手方法は

とかが選べます. ごく簡単には「dnf」コマンド一発がいいのでしょうが、インストール場所が選べない模様.
ここでは場所を指定したいので後者のインストーラーを入手して進めます.

https://www.intel.com/content/www/us/en/developer/tools/oneapi/toolkits.htmlには複数のToolkit(インストーラー)がありますが、
ここでは下記2つのToolkitを取得します

ここでは「Intel® C++ Essentials」からは「oneAPI DPC++/C++ Compiler」と「oneAPI Threading Building Blocks」「oneAPI Math Kernel Library」を入れて
「Intel® Fortran Essentials」からはと「Fortran Compiler」、「MPI Library」を入れます.

*「Base Toolkit」の「oneAPI DPC++/C++ Compiler」はllvmベースのコンパイラ(icx/icpx)で、従来のicc/icpcコンパイラは提供されていない模様

インストール

「intel-cpp-essentials-2025.2.0.532_offline.sh」と「intel-fortran-essentials-2025.2.0.509_offline.sh」の中にあるパッケージを調べてコマンドラインで入れてみます

[root@rockylinux9 ~]# bash /Public/em/intel-cpp-essentials-2025.2.0.532_offline.sh -a --list-components
 :
ID                                  Version      Installed Name
===================================================================================================
intel.oneapi.lin.dpcpp-ct           2025.2.0+517 false     Intel® DPC++ Compatibility Tool
intel.oneapi.lin.dpcpp_dbg          2025.2.0+388 false     Intel® Distribution for GDB*
intel.oneapi.lin.dpl                2022.9.0+377 false     Intel® oneAPI DPC++ Library
intel.oneapi.lin.dpcpp-cpp-compiler 2025.2.0+766 false     Intel® oneAPI DPC++/C++ Compiler
   intel.oneapi.lin.dpl             2022.9.0+377 false       Intel® oneAPI DPC++ Library
intel.oneapi.lin.tbb.devel          2022.2.0+507 false     Intel® oneAPI Threading Building Blocks
intel.oneapi.lin.mkl.devel          2025.2.0+628 false     Intel® oneAPI Math Kernel Library
 :
[root@rockylinux9 ~]# bash /Public/em/intel-fortran-essentials-2025.2.0.509_offline.sh -a --list-components
 :
ID                              Version       Installed Name
==========================================================================================
intel.oneapi.lin.ifort-compiler 2025.2.0+766  false     Intel® Fortran Compiler
intel.oneapi.lin.dpcpp_dbg      2025.2.0+388  false     Intel® Distribution for GDB*
intel.oneapi.lin.mkl.devel      2025.2.0+628  false     Intel® oneAPI Math Kernel Library
intel.oneapi.lin.mpi.devel      2021.16.0+442 false     Intel® MPI Library
 :
[root@rockylinux9 ~]#

となっているので、

[root@rockylinux9 ~]# bash /Public/em/intel-cpp-essentials-2025.2.0.532_offline.sh -a -s --eula accept --intel-sw-improvement-program-consent decline --action install --components \
intel.oneapi.lin.dpcpp-cpp-compiler:intel.oneapi.lin.tbb.devel:intel.oneapi.lin.mkl.devel
 :
[root@rockylinux9 ~]# bash /Public/em/intel-fortran-essentials-2025.2.0.509_offline.sh -a -s --eula accept --intel-sw-improvement-program-consent decline  --components \
intel.oneapi.lin.ifort-compiler:intel.oneapi.lin.mpi.devel
 :
[root@rockylinux9 ~]#

一応削除は下記のようにします.

[root@rockylinux9 ~]# bash /Public/em/intel-cpp-essentials-2025.2.0.532_offline.sh -a -s --action remove --components \
intel.oneapi.lin.dpcpp-cpp-compiler:intel.oneapi.lin.tbb.devel:intel.oneapi.lin.mkl.devel
 :
[root@rockylinux9 ~]# bash /Public/em/intel-fortran-essentials-2025.2.0.509_offline.sh -a -s  --action remove --components \
intel.oneapi.lin.ifort-compiler:intel.oneapi.lin.mpi.devel
 :
[root@rockylinux9 ~]#

つかう

単純に「source /opt/intel/oneapi/setvars.sh」を実行すればPATH環境設定らが有効になる.

[saber@rockylinux9 ~]$ source /opt/intel/oneapi/setvars.sh
 
:: initializing oneAPI environment ...
   -bash: BASH_VERSION = 5.1.8(1)-release
   args: Using "$@" for setvars.sh arguments:
:: compiler -- latest
:: debugger -- latest
:: dev-utilities -- latest
:: dpl -- latest
:: mkl -- latest
:: mpi -- latest
:: tbb -- latest
:: umf -- latest
:: oneAPI environment initialized ::
 
[saber@rockylinux9 ~]$

PATH環境変数は先頭に下記が加わる

/opt/intel/oneapi/mpi/2021.16/bin
/opt/intel/oneapi/mkl/2025.2/bin
/opt/intel/oneapi/dev-utilities/2025.2/bin
/opt/intel/oneapi/debugger/2025.2/opt/debugger/bin
/opt/intel/oneapi/compiler/2025.2/bin

これでintel謹製コンパイラ llvm ベースの icx, icpx, ifx の他にintel謹製のmpiの mpirun は当然の事、mpiicc, mpiicpc が使えます.

Environment-Modules

oneAPIでは簡単にEnvironment-Modules向けの modulefile を作ってくれます.

[root@rockylinux9 ~]# /opt/intel/oneapi/modulefiles-setup.sh --help
 
usage: modulefiles-setup.sh [--output-dir=dir] [--help]
 
Scans the oneAPI installation folder for available modulefiles and organizes
them into a single folder that can be added to the $MODULEPATH environment
variable or by using the 'module use' command. For each tool or library that
is found in the oneAPI installation folder, every version available for that
tool or library is added to the output folder.
 
  --output-dir=path/to/folder/name
    Specify path/name of folder to contain oneAPI modulefile links.
    Default output location is the '/root/modulefiles' folder.
      e.g., --output-dir=~/intel-oneapi-modulefiles
 
  --force
    Force replacement of modulefiles output directory without warning.
 
  --ignore-latest
    Ignore (do not include) the "latest" version symlink in the list of
    modulefiles created in the modulefiles output directory. Add only the
    versioned modulefiles into the modulefiles output directory.
 
  --help
    Display this help message and exit.
 
[root@rockylinux9 ~]#

なので「--output-dir」を「/apps/modulefiles」として作ってみます

[root@rockylinux9 ~]# /opt/intel/oneapi/modulefiles-setup.sh --output-dir=/apps/modulefiles --ignore-latest
:: Initializing oneAPI modulefiles folder ...
:: Removing any previous oneAPI modulefiles folder content.
 
:: WARNING: "/apps/modulefiles" exists and will be deleted.
   Okay to proceed with deletion? [yn] n                    <--- すでに /apps/modulefiles があるので消さないために「n」
 
:: Generating oneAPI modulefiles folder links.
:: compiler/2025.2.0 -> /opt/intel/oneapi/compiler/2025.2/etc/modulefiles/compiler/2025.2.0
:: compiler-intel-llvm/2025.2.0 -> /opt/intel/oneapi/compiler/2025.2/etc/modulefiles/compiler-intel-llvm/2025.2.0
:: compiler-rt/2025.2.0 -> /opt/intel/oneapi/compiler/2025.2/etc/modulefiles/compiler-rt/2025.2.0
:: debugger/2025.2.0 -> /opt/intel/oneapi/debugger/2025.2/etc/modulefiles/debugger/2025.2.0
:: dev-utilities/2025.2.0 -> /opt/intel/oneapi/dev-utilities/2025.2/etc/modulefiles/dev-utilities/2025.2.0
:: dpl/2022.9 -> /opt/intel/oneapi/dpl/2022.9/etc/modulefiles/dpl/2022.9
:: mkl/2025.2 -> /opt/intel/oneapi/mkl/2025.2/etc/modulefiles/mkl/2025.2
:: mpi/2021.16 -> /opt/intel/oneapi/mpi/2021.16/etc/modulefiles/mpi/2021.16
:: tbb/2022.2 -> /opt/intel/oneapi/tbb/2022.2/etc/modulefiles/tbb/2022.2
:: umf/0.11.0 -> /opt/intel/oneapi/umf/0.11/etc/modulefiles/umf/0.11.0
:: oneAPI modulefiles folder initialized.
:: oneAPI modulefiles folder is here: "/apps/modulefiles"
 
[root@rockylinux9 ~]#
[root@rockylinux9 ~]# ls -l  /apps/modulefiles/
total 0
drwxr-xr-x. 2 root root  22 Aug 14 04:11 compiler
drwxr-xr-x. 2 root root  22 Aug 14 04:11 compiler-intel-llvm
drwxr-xr-x. 2 root root  22 Aug 14 04:11 compiler-rt
drwxr-xr-x. 2 root root  22 Aug 14 04:11 debugger
drwxr-xr-x. 2 root root  22 Aug 14 04:11 dev-utilities
drwxr-xr-x. 2 root root  20 Aug 14 04:11 dpl
drwxr-xr-x. 2 root root  20 Aug 14 04:11 mkl
drwxr-xr-x. 2 root root  21 Aug 14 04:11 mpi
drwxr-xr-x. 2 root root  20 Aug 14 04:11 tbb
drwxr-xr-x. 2 root root  20 Aug 14 04:11 umf
[root@rockylinux9 ~]#

これで一応完成なのですが、compiler-intel-llvm、debugger、dev-utilities、dpl は不要かなぁ.

[root@rockylinux9 ~]# rm -rf /apps/modulefiles/{compiler-intel-llvm,debugger,dev-utilities,dpl}

これで下記のようにコンパイラーをロードして使います

[saber@rockylinux9 ~]$ module use /apps/modulefiles/
[saber@rockylinux9 ~]$ module ava
------------------------------------------ /apps/modulefiles -------------------------------------------
compiler-rt/2025.2.0  compiler/2025.2.0  mkl/2025.2  mpi/2021.16  tbb/2022.2  umf/0.11.0
 
------------------------------------ /usr/share/Modules/modulefiles ------------------------------------
dot  module-git  module-info  modules  null  use.own
 
---------------------------------------- /usr/share/modulefiles ----------------------------------------
mpi/openmpi-x86_64
 
Key:
modulepath
[root@rockylinux9 ~]#
 
[saber@rockylinux9 ~]$ module load compiler
Loading compiler/2025.2.0
  Loading requirement: tbb/2022.2 compiler-rt/2025.2.0 umf/0.11.0
 
[saber@rockylinux9 ~]$ icx --version
Intel(R) oneAPI DPC++/C++ Compiler 2025.2.0 (2025.2.0.20250605)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/intel/oneapi/compiler/2025.2/bin/compiler
Configuration file: /opt/intel/oneapi/compiler/2025.2/bin/compiler/../icx.cfg
 
[saber@rockylinux9 ~]$

openmpi

intel謹製のmpiもいいのですが、openmpiをコンパイルしてみます. llvmベースの icx, icpx, ifxで作ります

[root@rockylinux9 ~]# source /opt/intel/oneapi/setvars.sh
 
[root@rockylinux9 ~]# cd /apps/src/
[root@rockylinux9 src]#
 
[root@rockylinux ~]# cd /apps/src/
[root@rockylinux src]# wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.5.tar.bz2
[root@rockylinux9 src]# tar xf openmpi-5.0.8.tar.bz2
[root@rockylinux9 src]# cd openmpi-5.0.8/
[root@rockylinux9 openmpi-5.0.8]#
 
[root@rockylinux9 openmpi-5.0.8]# CC=icx CXX=icpx FC=ifx ./configure --without-verbs --prefix=/apps/openmpi-5.0.8_icx-2025.2.0
 :
Open MPI configuration:
-----------------------
Version: 5.0.8
MPI Standard Version: 3.1
Build MPI C bindings: yes
Build MPI Fortran bindings: mpif.h, use mpi, use mpi_f08
Build MPI Java bindings (experimental): no
Build Open SHMEM support: false (no spml)
Debug build: no
Platform file: (none)
 
Miscellaneous
-----------------------
Atomics: GCC built-in style atomics
Fault Tolerance support: mpi
HTML docs and man pages: installing packaged docs
hwloc: internal
libevent: internal
Open UCC: no
pmix: internal
PRRTE: internal
Threading Package: pthreads
 
Transports
-----------------------
Cisco usNIC: no
Cray uGNI (Gemini/Aries): no
Intel Omnipath (PSM2): no (not found)
Open UCX: no
OpenFabrics OFI Libfabric: no (not found)
Portals4: no (not found)
Shared memory/copy in+copy out: yes
Shared memory/Linux CMA: yes
Shared memory/Linux KNEM: no
Shared memory/XPMEM: no
TCP: yes
 
Accelerators
-----------------------
CUDA support: no
ROCm support: no
 
OMPIO File Systems
-----------------------
DDN Infinite Memory Engine: no
Generic Unix FS: yes
IBM Spectrum Scale/GPFS: no (not found)
Lustre: no (not found)
PVFS2/OrangeFS: no
 :
[root@rockylinux9 openmpi-5.0.8]# make -j 20; make check ; make install

oneAPIで作ったopenmpiの environment-modules
「/apps/modulefiles/mpi/openmpi-5.0.8_icx-2025.2.0」

#%Module 1.0
conflict      mpi
set           root                 /apps/openmpi-5.0.8_icx-2025.2.0
prepend-path  PATH                 $root/bin
prepend-path  LD_LIBRARY_PATH      $root/lib
prepend-path  PKG_CONFIG_PATH      $root/lib/pkgconfig
prepend-path  MANPATH              $root/man
setenv        MPI_BIN              $root/bin
setenv        MPI_SYSCONFIG        $root/etc
setenv        MPI_FORTRAN_MOD_DIR  $root/lib
setenv        MPI_INCLUDE          $root/include
setenv        MPI_LIB              $root/lib
setenv        MPI_MAN              $root/man
##setenv        MPI_PYTHON3_SITEARCH /usr/lib64/python3.9/site-packages/openmpi
setenv        MPI_COMPILER         openmpi
##setenv        MPI_SUFFIX      _openmpi
setenv        MPI_HOME             $root
最新の60件
2025-12-09 2025-12-08 2025-12-07 2025-12-05 2025-11-30 2025-11-27 2025-11-24 2025-11-23 2025-11-19 2025-11-18 2025-11-16 2025-11-05 2025-11-03 2025-11-02 2025-10-31 2025-10-30 2025-10-29 2025-10-28 2025-10-26 2025-10-25 2025-10-24 2025-10-22 2025-10-21 2025-10-17 2025-10-13 2025-10-11 2025-10-06 2025-10-05 2025-09-30 2025-09-29 2025-09-28 2025-09-25 2025-09-24 2025-09-23 2025-09-21 2025-09-20 2025-09-14 2025-09-13

edit


トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2025-08-14 (木) 04:29:17