Get Started Guide

  • 2020
  • 07/28/2020
  • Public Content

Get Started with the Intel® MPI Library for Intel® Parallel Studio XE on Windows* OS

The Intel® MPI Library is a multi-fabric message passing library that implements the Message Passing Interface, version 3.1 (MPI-3.1) specification. Use the library to develop applications that can run on multiple cluster interconnects.
The Intel MPI Library has the following features:
  • Low overhead enables analysis of large amounts of data.
  • MPI tuning utility for accelerating your applications.
  • Interconnect independence and flexible runtime fabric selection.
The Intel MPI Library is available as a standalone product, as part of the Intel® Parallel Studio XE Cluster Edition, and as part of Intel® oneAPI.
Product Contents
The product comprises the following main components:
  • Runtime Environment (RTO)
    has the tools you need to run programs, including the scalable process management system (Hydra*) and supporting utilities, dynamic (.dll) libraries, and documentation.
  • Software Development Kit (SDK)
    includes all of the Runtime Environment components plus compilation tools, including compiler drivers such as mpiicc, include files and modules, debug libraries, program database (.pdb) files, and test codes.
Besides the SDK and RTO components, Intel MPI Library also includes Intel® MPI Benchmarks, which enable you to measure MPI operations on various cluster architectures and MPI implementations. You can see more details in
Intel MPI Benchmarks User Guide
.
Key Features
The Intel MPI Library has the following major features:
  • MPI-1, MPI-2.2 and MPI-3.1 specification conformance
  • Support for any combination of the following interconnection fabrics:
  • Shared memory
  • RDMA-capable network fabrics through DAPL*, such as InfiniBand* and Myrinet*
  • Sockets, for example, TCP/IP over Ethernet*, Gigabit Ethernet, and other interconnects
  • (SDK only)
    Support for Intel® 64 architecture clusters using:
  • Intel® C++ Compiler version 15.0 and higher
  • Intel® Fortran Compiler version 15.0 and higher
  • Microsoft* Visual C++* Compilers
  • (SDK only)
    C, C++, Fortran* 77 and Fortran 90 language bindings
  • (SDK only)
    Dynamic linking
Prerequisites
Before you start using the Intel MPI Library make sure to complete the following steps:
  1. Set the environment variables: from the installation directory
    <install-dir>
    \mpi\<
    package-number
    >\intel64\bin directory, run the
    mpivars.bat
    batch file:
>
<install-dir>
\mpi\<
package-number
>\intel64\bin\mpivars.bat
where
<install-dir>
is the Intel MPI Library installation directory (by default,
C:\Program Files (x86)\IntelSWTools
).
  1. Install and run the Hydra services on the compute nodes:
> hydra_service -install> hydra_service -start
  1. Register your credentials:
> mpiexec -register
For detailed system requirements, see the “System Requirements” section in the
Release Notes
.
Building and Running MPI Programs
Compiling an MPI Program
If you have the SDK component installed, you can build your MPI programs with Intel MPI Library. Do the following:
  1. Make sure you have the desired compiler installed and configured properly. For example, for the Intel C++ Compiler, run:
    > icl
    If the command is not recognized, add the compiler to your PATH. For Intel® compilers, you can run the
    compilvervars.bat
    script.
  2. Compile your program using the appropriate compiler driver. For example, for a test C program:
> mpiicc -o test.exe
<install-dir>
\test\test.c
Running an MPI Program
Execute the program using the mpiexec command. For example, for the test program:
> mpiexec -n <
number-of-processes
> test.exe
To specify the hosts to run the program on, use the -hosts option:
> mpiexec -n <number -
of-processes
> -ppn <
number-of-processes-per-node
> -hosts <host1>,<host2>,...,<hostN> test.exe
Using NuGet* MPI Packages in Microsoft Visual Studio*
Use the NuGet package manager to install MPI packages in a Microsoft Visual Studio project. Run the following command in the NuGet Package Manager console:
Install-Package intelmpi.devel.win-x64
Local Usage (one node)
  • Link Intel MPI Library in the project's properties: choose the "Dynamic" value in Properties -> intelmpi.devel.win-x64 -> Linkage.
  • Specify the path to mpiexec in the project's properties (Properties -> Debugging -> Command):
<
path-to-Visual-Studio-project
>\packages\<
redist-package-folder
>\runtimes\win-x64\bin\mpiexec.exe 
  • Specify the mpiexec parameters in Properties -> Debugging -> CommandArguments:
 -localonly -n <
number-of-ranks
> "$(TargetPath)"
For example:
 -localonly -n 2 "$(TargetPath)" 
Multinode Usage
General Steps
1. Make sure to place the Visual Studio project and MPI packages on all the nodes you want to use. The paths must be the same.
2. Install the hydra service on each node (run cmd as administrator):
<
path-to-Visual-Studio-project
>\packages\<
redist-package-folder
>\runtimes\win-x64\bin\hydra-service.exe --install 
3. Register your Windows* user credentials to enable the process manager to launch MPI jobs. Credentials are encrypted and stored in the registry:
<
path-to-Visual-Studio-project
>\packages\<
redist-package-folder
>\runtimes\win-x64\bin\mpiexec.exe --register
4. Link Intel MPI Library in the project's properties: choose the "Dynamic" value in Properties->intelmpi.devel.win-x64->Linkage
5. Specify the path to mpiexec in the project's properties (Properties -> Debugging -> Command):
<
path-to-Visual-Studio-project
>\packages\<
redist-package-folder
>\runtimes\win-x64\bin\mpiexec.exe 
If there is no shared path between nodes:
1. Specify the mpiexec parameters in Properties -> Debugging -> CommandArguments:
 -hosts <host1>,<host2>,...,<hostN> -n <
number of ranks
> -ppn <
number of processes per node
> "$(TargetPath)"
For example:
-hosts hostname1,hostname2 -n 4 -ppn 2 "$(TargetPath)"
2. Compile your application and copy it to other nodes (use the same path for all nodes).
3. Run the application.
If there is a shared path between nodes:
1. Specify the mpiexec parameters (Properties -> Debugging ->CommandArguments):
-hosts <host1>,<host2>,...,<hostN> -n <
number of nodes
> -ppn <
number of processes per node
> <
shared path to your application .exe inclusive
>
For example:
-hosts hostname1,hostname2 -n 4 -ppn 2 "\\hostname2\VS_project\x64\Release\application.exe"
2. Compile the application on one node. In our case, it is
hostname2
.
3. Run the application.
Troubleshooting
If you encounter problems when using Intel MPI Library, go through the following general procedures to troubleshoot them:
  • Check system requirements and known issues in the
    Release Notes
    .
  • Check hosts accessibility. Try to run a simple non-MPI application (for example,
    hostname utility
    ) on the problem hosts with
    mpiexec
    . This check helps you reveal the environmental or connectivity problem (for example, unreachable hosts).
  • Run MPI application with debug information enabled. To enable the debug information, set the environment variable I_MPI_DEBUG=6. You can also set a different debug level to get more detailed information. This action helps to find out the problem component.
See more details in the
Troubleshooting
section of the
Developer Guide
.
Training and Documentation
  • Online Training: An excellent resource for learning the Intel MPI Library capabilities through various guides, videos, webinars, and more.
  • Release Notes: Up-to-date information about the product, including: what's new, key features, system requirements, and known limitations.
  • Online Documentation: Links to all available Intel MPI Library documents.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804