Compile and run your MPI program

Intel® MPI Library is a multi-fabric message passing library that implements the Message Passing Interface, version 3.0 (MPI-3.0) specification. Use the library to develop applications that can run on multiple cluster interconnects.

The Intel® MPI Library has the following features:

To start using the Intel® MPI Library:

  1. Source the mpivars.[c]sh script to establish the proper environment settings for the Intel® MPI Library. It is located in the <installdir>/<arch>/bin directory, where <installdir> refers to the Intel MPI Library installation directory (for example, /opt/intel/impi) and <arch> is one of the following architectures:
    • intel64 - Intel® 64 architecture
    • mic - Intel® Many Integrated Core Achitecture
  2. Create a hostfile text file that lists the nodes in the cluster using one host name per line.

To compile your MPI program:

  1. (SDK only) Make sure you have a compiler in your PATH. To find the path to your compiler, run the which command on the desired compiler. For example:
  2. $ which icc

    /opt/intel/composer_xe_2015/bin/intel64/icc

  3. (SDK only) Compile a test program using the appropriate compiler driver. For example:
  4. $ mpiicc -o myprog <installdir>/test/test.c

To run your MPI program:

  1. Use the previously created hostfile and start the mpirun command as follows:

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

See the Intel® MPI Library Reference Manual for more details.


Optimization Notice

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

Legal Information

Intel, VTune and the Intel logo are trademarks of Intel Corporation in the U.S. and/or other countries.

* Other names and brands may be claimed as the property of others.

Copyright © 2012-2014, Intel Corporation. All rights reserved.