--- 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 | System A | System B | System C | Notes ----------------- | -------- | -------- | -------- | --------------------------- 2021.3.0 | ― | + | + | Installed in September 2021 2021.1.1 | ― | + | + | Installed in March 2021 2019.9 | ― | + | + | Installed in March 2021 2019.8 | ― | + | + | Installed in September 2020 2019.6 | ― | + | + | Installed in March 2020 2019.5 | ― | + | + | Installed in October 2019 2019.3 | ― | + | + | Installed in March 2019 2018.4 | ― | + (default) | + (default) | Installed in March 2019 2018.3 | ― | + | + | Installed in October 2018 2018.2 | ― | + | + | Installed in March 2018 2018.0 | ― | + | + | Installed in October 2017 2017.4 | ― | + | + | Installed in October 2017 2017.2 | ― | + | + | Installed in March 2017 2017.1 | ― | + | + | Installed in December 2016 5.1.3 | ― | + | + | \+: Available for use ― : Not available for use ### Library Settings{#modules} Version | Modulefile Name ----------------- | --------------- 2021.3.0|impi/2021.3.0 2021.1.1|impi/2021.1.1 19.1.3 |impi/2019.9 2019.8 | impi/2019.8 2019.6 | impi/2019.6 2019.5 | impi/2019.5 2019.3 | impi/2019.3 2018.4 | impi/2018.4 2018.3 | impi/2018.3 2018.2 | impi/2018.2 2018.0 | impi/2018.0 2017.4 | impi/2017.4 2017.2 | impi/2017.2 2017.1 | impi/2017.1 5.1.3 | impi/5.1.3 The compilation environment for Intel MPI Library varies by [Intel compiler](/compilers/intel) and [GNU compiler](/compilers/gnu). The default compiler of the System B and C is set to Intel compiler. Therefore, when using GNU compiler, you need to switch the compiler from Intel to GNU by executing the module command as below: ```nohighlight $ module switch PrgEnv-intel PrgEnv-gnu ``` When switching between the versions of Intel MPI Library, execute the module command as below: ```nohighlight $ module switch impi/4.1.0 impi/4.0.3 ``` For details of the module commands, see [Modules](/config/modules). ### Level of Threading Support{#threadsafe} The value for threading support level available in Intel MPI Library is **MPI_THREAD_MULTIPLE**. It means that MPI functions can be called from each thread with no restriction. ## How to Compile and Run{#usage} ### How to Compile{#compile} **Compile commands (Intel compiler)** Language | Command | Operands --------- | --------- | ------------------------------------------------ Fortran | mpiifort | mpiifort [sequence_of_options] sequence_of_files C | mpiicc | mpiicc [sequence_of_options] sequence_of_files C++ | mpiicpc | mpiicpc [sequence_of_options] sequence_of_files **Compile commands (GNU compiler)** Language | Command | Operands --------- | -------- | ---------------------------------------------- Fortran | mpif90 | mpif90 [sequence_of_options] sequence_of_files C | mpicc | mpicc [sequence_of_options] sequence_of_files C++ | mpicxx | mpicxx [sequence_of_options] sequence_of_files **Examples of Compiling** ```nohighlight $ mpiifort -O3 -parallel sample_mpi.f90 ``` ### Options{#option} * ** Key options** Option | Explanation ------------ | ------------------- -static_mpi | Links MPI libraries statically ### How to Run{#exec} To run a compiled MPI program, use the **tssrun** command in interactive mode and use the **mpiexec.hydra** command in batch mode. In both of interactive mode and batch mode, the number of parallels is specified as argument of the -A option, p. For details, see Examples. **Example(in interactive mode)** ```nohighlight $ tssrun -A p=2 mpiexec.hydra ./a.out ``` <!-- old information ### Using InfiniBand{#infiniband} In the System B and C, two InfiniBand networks are connected per node. By default one InfiniBand network is used, and two InfiniBand networks bonded can be used by setting up the environment variable below when executing. ```nohighlight (tcsh shell) setenv I_MPI_FABRICS shm:ofa  setenv I_MPI_OFA_NUM_ADAPTERS 2 (bash shell) export I_MPI_FABRICS=shm:ofa export I_MPI_OFA_NUM_ADAPTERS=2 ``` --> ## Examples{#sample} ### Running an MPI Program in Interactive Mode{#tss} For more details of interactive mode, see [Interactive Processing](/run/interactive). * **Running with 8-fold parallelization** ```nohighlight tssrun -A p=8 mpiexec.hydra ./a.out ``` * **Running in combination with thread parallelization(MPI 4-fold parallelization, OpenMP 8-fold parallelization)** ```nohighlight tssrun -A p=4:t=8:c=8 mpiexec.hydra ./a.out ``` ### Running an MPI Program in Batch Mode{#lsf} For more details of batch mode, see Batch Processing (For System B and C)(in preparation) . * **Running with 8-fold parallelization** ```nohighlight $ cat sample.sh #!/bin/bash #QSUB -q gr19999b #QSUB -ug gr19999 #QSUB -W 5:00 #QSUB -A p=8 mpiexec.hydra ./a.out $ qsub sample.sh ``` * **Running in combination with thread parallelization(MPI 4-fold parallelization, OpenMP 8-fold parallelization)** ```nohighlight $ cat sample.sh #!/bin/bash #QSUB -q gr19999b #QSUB -ug gr19999 #QSUB -W 5:00 #QSUB -A p=4:t=8:c=8:m=4G #QSUB -o %J.out mpiexec.hydra ./a.out $ qsub sample.sh ``` ## Manuals{#manual} ### 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 Documentation](https://software.intel.com/en-us/articles/intel-mpi-library-documentation)