--- title: 'Intel MPI Library' taxonomy: category: - docs external_links: process: true no_follow: true target: _blank mode: active --- [toc] ## Environment Settings{#enviroment} ### Software Version and System Requirements{#version} Version | Module file Name | System A | System B/C | System G | Cloud System| Notes --- | --- | --- | --- | --- | --- | --- 2024.0 | intel/2024.0 | + | +| - | + | Introduced in April 2024. Intel compiler + MKL + TBB 2023.2 (default) | intel/2023.2 | + | +| - | + | Introduced in April 2024. Intel compiler + MKL + TBB 2023.2-rt | intel/2023.2-rt | + | +| - | + | Introduced in April 2024. runtime libraries 2023.1 | intel/2023.1 | + | + | - | + | Introduced in August 2023. 2023.1-rt | intel/2023.1-rt | + | + | - | + | Introduced in August 2023. runtime libraries 2022.3 | intelmpi/2022.3 | + | + | - | + | Introduced in November 2022 2022.3-rt | intelmpi/2022.3-rt | + | + | - | + | Introduced in November 2022. runtime library <!-- 注:Intel CompilerとIntel MPIのバージョンは一致しない場合があります --> \+ : Available for all users \- : Not available <!-- コンパイラとして、 [Intelコンパイラ](/compilers/intel) または [GNUコンパイラ](/compilers/gnu) を利用します。システムにログインした時点では、Intelコンパイラがデフォルトで利用できるようになっています。GNUコンパイラを利用される場合は、以下のようにmoduleコマンドを実行し、コンパイラを切り替えてください。 ```nohighlight $ module switch PrgEnvIntel PrgEnvGCC ``` Intel MPIライブラリのバージョンを切り替えたい場合は、以下のようにmoduleコマンドを実行してください。 ```nohighlight $ module switch impi/4.1.0 impi/4.0.3 ``` moduleコマンドの詳細は [Modules](/config/modules) をご覧ください。 --> ### Level of Thread Parallel Support{#threadsafe} The thread parallel support level available in Intel MPI is MPI_THREAD_MULTIPLE. MPI functions can be called from each thread with no restriction. ## How to Compile and Execute{#usage} ### How to Compile{#compile} **Compile commands (Intel compiler)** Language | Command | Operands --------- | --------- | ---------------------------- Fortran | mpiifort | mpiifort Option File Name C | mpiicc | mpiicc Option File Name C++ | mpiicpc | mpiicpc Option File Name **Compile Commands(GNU compiler)** Language | Command | Operands --------- | -------- | -------------------------- Fortran 95 | mpif90 | mpif90 Option File Name Fortran 77 | mpif77 | mpif77 Option File Name C | mpigcc | mpicc Option File Name C++ | mpigcxx | mpicxx Option File Name **Examples of Compiling** ```nohighlight $ mpiifort -O3 -parallel sample_mpi.f90 ``` <!-- ### オプション{#option} Intel MPI のコンパイラでは、 [Intelコンパイラのオプション](/compilers/intel#option) を利用することができます。ただし、オプション -static については利用できません。 * **主要オプション(並列化、最適化など)** オプション名 | 説明 ------------ | ------------------- -static_mpi | MPIライブラリを静的にリンクします。 --> ### How to Execute{#exec} To execute the compiled MPI program, use **tssrun** command for interactive processing and **srun** for batch processing. For both interactive processing and batch processing, the number of parallelism is specified by the --rsc option argument p. Please refer to [sample](#sample) for details. **Example (interactive processing)** ```nohighlight $ tssrun --rsc p=2 ./a.out ``` ## Sampl{#sample} ### MPI program execution with interactive processing{#tss} Please refer to the [Interactive Processing](/run/interactive) for details on the execution with interactive processing. * **Execute in 8 parallels** ```nohighlight $ tssrun --rsc p=8 ./a.out ``` * **Execute in combination with thread parallelism(MPI 4 parallel, OpenMP 8 parallel)** ```nohighlight $ tssrun --rsc p=4:t=8:c=8 ./a.out ``` ### MPI program execution in batch{#slurm} Please refer to the [batch processing](/run/batch) for details on the batch execution. * **Execute in 8 parallels** ```nohighlight $ cat sample.sh #!/bin/bash #============ SBATCH Directives ======= #SBATCH -p gr19999b #SBATCH -t 1:0:0 #SBATCH --rsc p=8 #SBATCH -o %x.%A.out #============ Shell Script ============ srun ./a.out $ sbatch sample.sh ``` * **Execute in combination with thread parallelism(MPI 4 parallel, OpenMP 8 parallel)** ```nohighlight $ cat sample.sh #!/bin/bash #============ SBATCH Directives ======= #SBATCH -p gr19999b #SBATCH -t 1:0:0 #SBATCH --rsc p=4:t=8:c=8:m=8G #SBATCH -o %x.%A.out #============ Shell Script ============ srun ./a.out $ sbatch sample.sh ``` ## Manual{#manual} * [Intel MPI Library Developer Guide for Linux* OS Developer Guide](https://www.intel.com/content/www/us/en/develop/documentation/mpi-developer-guide-linux/top.html) * [Intel MPI Library Developer Guide for Linux* OS Developer Reference](https://www.intel.com/content/www/us/en/develop/documentation/mpi-developer-reference-linux/top.html) <!-- ### Ver 5.1 * [Intel MPI Library for Linux OS Reference Manual](https://web.kudpc.kyoto-u.ac.jp/Compiler_Manual/Intel/Intel_MPI_5.1/Reference_Manual.pdf) * [Intel MPI Library for Linux OS User Guide](https://web.kudpc.kyoto-u.ac.jp/Compiler_Manual/Intel/Intel_MPI_5.1/User_Guide.pdf) ### Ver 2018 * [Intel MPI Library for Linux OS Developer Reference](https://web.kudpc.kyoto-u.ac.jp/Compiler_Manual/Intel/Intel_MPI_2018/intelmpi-2018-developer-reference-linux.pdf) * [Intel MPI Library for Linux OS Developer Guide](https://web.kudpc.kyoto-u.ac.jp/Compiler_Manual/Intel/Intel_MPI_2018/intelmpi-2018-developer-guide-linux.pdf) ### Ver 2019 * [Intel MPI Library for Linux OS Developer Reference](https://web.kudpc.kyoto-u.ac.jp/Compiler_Manual/Intel/intel_parallel_studio_xe_2019_3/en/mpi/mpi_dev_reference_lin/index.htm) * [Intel MPI Library for Linux OS Developer Guide](https://web.kudpc.kyoto-u.ac.jp/Compiler_Manual/Intel/intel_parallel_studio_xe_2019_3/en/mpi/mpi_dev_guide_lin/index.htm) --> ## Link{#link} * [Intel MPI Library](https://www.intel.com/content/www/us/en/developer/tools/oneapi/mpi-library.html)