システムの紹介 各種手続き 使い方と注意事項 アプリケーション一覧 講習会情報 FAQ
HOME > アプリケーション一覧 > Intel コンパイラ

Intel コンパイラ

機能概要

プログラミング開発環境としては 2021年版以降は Intel oneAPI ベース&HPCツールキット、それ以前のバージョンについては Intel Parallel Studio XE Cluster Edition for Linux が利用できます。 これらは、C/C++コンパイラ、Fortranコンパイラ、パフォーマンス・ライブラリーに加え、パフォーマンス/エラー解析ツールやMPI開発ツールも備えた開発環境です。

プログラミング手法やコードの最適化・並列化に関する詳細な説明については、マニュアルや関連サイトのリンク先の情報をご参照ください。

利用方法

すべてのキューにてIntelコンパイラは利用可能です。 また、ログインノード(apfe1) にて直接コンパイルしていただくことも可能です。
コンパイルおよび実行したい場合、以下を参考にmoduleコマンドで必要な環境設定を行ってください。

利用できるバージョンと環境設定方法(Intel oneAPIの場合)

Intel oneAPIでは、利用したいモジュール毎に環境設定を行います。

利用できるモジュール名は以下の通りです。

advisor                debugger       ifort                       intel_ipp_intel64    mkl
ccl                    dev-utilities  ifort32                     intel-ispc           mkl32
clck                   dnnl           init_opencl                 intel-oidn           mpi
compiler               dnnl-cpu-gomp  inspector                   intel-openpgl        mpi.orig
compiler32             dnnl-cpu-iomp  intel-embree                intel-openvkl        oclfpga
compiler-intel-llvm    dnnl-cpu-tbb   intelfpgadpcpp              intel-ospray         tbb
compiler-intel-llvm32  dpct           intelfpgadpcpp-a10gx-s10sx  intel-ospray_studio  tbb32
compiler-rt            dpl            intel_ippcp_ia32            intel-rkcommon       vpl
compiler-rt32          icc            intel_ippcp_intel64         intel-rkutil         vtune
dal                    icc32          intel_ipp_ia32              itac

様々なモジュールファイルがありますが、compiler と compiler32 のように、同じモジュール名で 最後に32があるものは32bit版、何も数字がないものは64bit版です。

モジュールごとにどのバージョンが利用可能かを確認するには、avail というキーワードを指定します。 例えば、どのバージョンのcompilerが利用できるかを確認するには、次のように実行します。

module avail compiler
--------------------------------- /usr/appli/intel/modulefiles ---------------------------------
compiler-intel-llvm/2024.1.0    compiler-rt/2023.2.1    compiler-rt32/2024.1.0  compiler/latest      
compiler-intel-llvm/latest      compiler-rt/2024.1.0    compiler-rt32/latest    compiler32/2021.1.1  
compiler-intel-llvm32/2024.1.0  compiler-rt/latest      compiler/2021.1.1       compiler32/2021.2.0  
compiler-intel-llvm32/latest    compiler-rt32/2021.1.1  compiler/2021.2.0       compiler32/2022.0.2  
compiler-rt/2021.1.1            compiler-rt32/2021.2.0  compiler/2022.0.2       compiler32/2022.1.0  
compiler-rt/2021.2.0            compiler-rt32/2022.0.2  compiler/2022.1.0       compiler32/2023.2.1  
compiler-rt/2022.0.2            compiler-rt32/2022.1.0  compiler/2023.2.1       compiler32/2024.1.0  
compiler-rt/2022.1.0            compiler-rt32/2023.2.1  compiler/2024.1.0       compiler32/latest  

通常、ソースコードをコンパイルする場合は以下の通りです。

module load compiler
icc test.c
./a.out

intelMPIを使ってコンパイルしたい場合は以下のようにmpiモジュールのロードも必要です。

module load compiler
module load mpi/2021.12   ※ mpi はいくつかの種類がありますので、バージョンを必ず指定するようにしてください。
mpiicc test.c -lmpi
mpirun -np 4 ./a.out

Intel MPI利用時の注意点

Intel MPIでコンパイルしたジョブをPBSに投入して実行する場合、PBSのバッチスクリプト内で以下の設定を追加してください。
特にノードをまたいでジョブを実行する場合、以下の設定がないとエラーが発生します。

(C-Shellの場合)
setenv I_MPI_HYDRA_BOOTSTRAP rsh
setenv I_MPI_HYDRA_BOOTSTRAP_EXEC /usr/appli/pbs/default/bin/pbs_tmrsh

サンプル

サンプルファイルは、/usr/appli/intel/YYYY.V/samples_YYYY/ にあります。( YYYYは西暦(4桁)、V はマイナーバージョンです)

 

マニュアル

なお、Intel oneAPIのマニュアルについては、以下の関連サイト(Documet Library等)をご参照ください。

 

関連サイト