Intel® MPI Benchmarks User Guide and Methodology Description

# Building Intel® MPI Benchmarks

## Linux* OS

To build the benchmarks for Linux* OS, do the following:

1. Set the `CC` variable to point to the appropriate compiler wrapper, `mpiicc` or `mpicc`.

2. Run one or more makefile commands listed below.

Command | Description
--- | ---
`make clean` | Remove legacy binary object files and executable files
`make MPI1` | Build the executable file for the IMB-MPI1 component.
`make EXT` | Build the executable file for one-sided communications benchmarks.
`make IO` | Build the executable file for I/O benchmarks.
`make NBC` | Build the executable file for `IMB-NBC` benchmarks.
`make RMA` | Build the executable file for `IMB-RMA` benchmarks.
`make all` | Build all executable files available.

To build the benchmarks for Intel® Many Integrated Core Architecture (Intel® MIC Architecture), follow these steps:

1. Build the Intel MPI Benchmarks for the host system:

   host$ source <psxe_install_dir>/bin/psxevars.sh
   host$ cd <path to IMB directory>/src
   host$ make -f make_ict

2. Build the Intel MPI Benchmarks for the target system based on the Intel® MIC Architecture.

   host$ cd <path to IMB directory>/src
   host$ make -f make_ict_mic

For details on running the resulting executable files on the Intel® MIC Architecture, see the Intel® MPI Library documentation.

## Windows* OS

To build the benchmarks for `IMB-MPI1`, `IMB-IO`, `IMB-EXT`, `IMB-NBC`, or `IMB-RMA`, follow these steps:

1. Check the environment variable settings for `Include`, `Lib`, and `Path`. Make sure they are set in accordance with this table:

   Intel® 64 Architecture Settings | IA-32 Architecture Settings
   --- | ---
   `%I_MPI_ROOT%\intel64\include` `%I_MPI_ROOT%\intel64\lib` `%I_MPI_ROOT%\intel64\bin` | `%I_MPI_ROOT%\ia32\include` `%I_MPI_ROOT%\ia32\lib` `%I_MPI_ROOT%\ia32\bin`

   ### Note

   Intel® MPI Library 5.0 does not support the IA-32 architecture. Use an earlier version of Intel MPI Library to build IA-32 architecture benchmarks.

2. Go to the subfolder that corresponds to the Intel® MPI Benchmarks component you would like to build and the Microsoft* Visual Studio* version installed on your system. For example, to build `IMB-EXT.exe` with the Visual* Studio* 2010, go to `IMB-EXT_VS_2010`.

3. Open the `.vcproj` or `.vcxproj` file in Visual Studio*. The executable file for one of the Intel MPI Benchmarks components is created:

   - `IMB-EXT.exe`
   - `IMB-IO.exe`
   - `IMB-MPI1.exe`
   - `IMB-NBC.exe`
   - `IMB-RMA.exe`

4. From the Solution Platforms drop-down list, choose the required architecture (x64 or Win32).

5. From the Solution Configurations drop-down list, choose Release.

6. Highlight the project folder in the Solution Explorer.

7. Go to Project > Properties to open Configuration Properties dialog box. Make sure you have something like the following settings:

   Setting | Value | Notes
   --- | --- | ---
   General > Project Defaults
   Character Set | `Use Multi-Byte Character Set` |
   Debugging
   Debugger to launch | `Local Windows Debugger` | Depending on your system configuration, you may select other debuggers.
   Command | x64: %`I_MPI_ROOT%\intel64\bin\mpiexec.exe` IA-32: %`I_MPI_ROOT%\ia32\bin\mpiexec.exe` |
   Command Arguments | `-n 2 %TargetPath%` | `%TargetPath%` should be quoted as in: `"-n 2 %TargetPath%"`
   C/C++ > General
   Additional Include Directories | x64: %`I_MPI_ROOT%\intel64\include` IA-32: %`I_MPI_ROOT%\ia32\include` |
   Warning Level | `to Level 1 (/W1)` |
   C/C++ > Preprocessor
   Preprocessor Definition | IMB-EXT: `WIN_IMB, _CRT_SECURE_NO_DEPRECATE, EXT` IMB-IO: `WIN_IMB, _CRT_SECURE_NO_DEPRECATE, MPIIO` IMB-MPI1: `WIN_IMB, _CRT_SECURE_NO_DEPRECATE, MPI1` IMB-NBC: `WIN_IMB, _CRT_SECURE_NO_DEPRECATE, NBC` IMB-RMA: `WIN_IMB, _CRT_SECURE_NO_DEPRECATE, RMA` |
   Linker > Input
   Additional Dependencies | x64: `%I_MPI_ROOT%\intel64\lib\impi.lib` IA-32: `%I_MPI_ROOT%\ia32\lib\impi.lib` |

8. Go to Build > Build Solution to create an executable file.

9. Run the executable file using Debug > Start Without Debugging command.

## See Also

Running Intel® MPI Benchmarks