Intel® MPI Library


This Developer Reference provides you with the complete reference for the Intel® MPI Library. It is intended to help an experienced user fully utilize the Intel MPI Library functionality. You can freely redistribute this document in any desired form.

Document Organization



Program Examples

pthreads - Explicit Submodel

#include <mpi.h> 
#include <pthread.h> 
#define n 2 
int thread_id[n]; 
MPI_Comm split_comm[n]; 
pthread_t thread[n]; 
void *worker(void *arg) { 
    int i = *((int*)arg), j = i; 
    MPI_Comm comm = split_comm[i]; 
    MPI_Allreduce(MPI_IN_PLACE, &j, 1, MPI_INT, MPI_SUM, comm); 
    printf("Thread %d: allreduce returned %d\n", i, j); 
int main() { 
    MPI_Info info; 
    int i, provided; 
    char s[16]; 

Running an MPI Program

Before running an MPI program, place it to a shared location and make sure it is accessible from all cluster nodes. Alternatively, you can have a local copy of your program on all the nodes. In this case, make sure the paths to the program match.

Run the MPI program using the mpirun command. The command line syntax is as follows:

$ mpirun -n <# of processes> -ppn <# of processes per node> -f <hostfile> ./myprog

For example:

Multiple Endpoints Support

The traditional MPI/OpenMP* threading model has certain performance issues: thread safe access to some MPI objects, such as requests or communicators requires some internal synchronization between threads, and the performance of typical hybrid application which uses MPI calls from several threads per rank is often lower than expected.

Configuring a Visual Studio* Project

To configure a Visual Studio* project with Intel® MPI Library, do the following:

  1. In Microsoft* Visual Studio*, create a console application project, or open an existing one.

  2. Open the project properties and go to Configuration Properties > Debugging. Set the following parameters:

    Command: $(I_MPI_ROOT)\intel64\bin\mpiexec.exe
    Command arguments: -n <processes_number> "$(TargetPath)"

Introducing Intel® MPI Library

Intel® MPI Library is a multi-fabric message passing library that implements the Message Passing Interface, v3.1 (MPI-3.1) specification. It provides a standard library across Intel® platforms that enable adoption of MPI-3.1 functions as their needs dictate.

Intel® MPI Library enables developers to change or to upgrade processors and interconnects as new technology becomes available without changes to the software or to the operating environment.

Subscribe to Intel® MPI Library