Using Intel® MPI Library 5.0 with MPICH based applications

By Dmitry Sivkov,

Published:08/25/2014   Last Updated:08/25/2014

Why it is needed?

Different MPI implementations have their specific benefits and advantages. So in the specific cluster environment the HPC application with the other MPI implementation can probably perform better.

 Intel® MPI Library has the following benefits:

  • Support of the wide range of cluster hardware and software
    • Full support and tuned performance of all modern Intel processors
    • Full support and tuned performance of wide variety of modern interconnects, full support of Intel interconnects
  • Integration with Intel® Trace Analyzer and Collector
    • Tracing all MPI events in parallel application;
    • Disbalance detection;
    • MPI correctness checks;
    • API for user code instrumentation;
  • Extended debug and statistics output
    • Intel MPI Library has an ability to output key statistics about parallel run to identify issues and tune performance;
  • Full control of parallel application execution
    • Rich set of controls via environment variables, control flags or configuration files
  • Support



To use Intel MPI Library the following is required:

  • System based on the Intel® 64 or Intel® MIC architecture;

How to

Note. There are two possible ways  to use Intel MPI Library 5.0 for MPICH based applications:

In this article the usage of ABI compatibility will be covered.

The MPI-3 standard has announced a new routine MPI_Get_library_version to determine what MPI implementation is used in runtime.
This small MPI application demonstrates its functionality.

$ cat ./version_info.c 
#include "mpi.h"
#include <stdio.h>

int main (int argc, char *argv[])
    int rank, namelen;

    MPI_Init (&argc, &argv);

    MPI_Comm_rank (MPI_COMM_WORLD, &rank);

    MPI_Get_library_version (mpi_name, &namelen);

    if (rank == 0)
        printf ("Hello world: MPI implementation:\n %s\n", mpi_name);

    MPI_Finalize ();

    return (0);


  1. For testing purposes compile the application with MPICH
    $ export PATH=~/mpich/3.1.2/bin/:$PATH
    $ mpicc ./version_info.c -o version_info
  2. Check that MPI library is linked dynamically (in other case recompilation from sources is needed)
    $ ldd ./version_info | grep libmpi => /home/user/mpich/3.1.2/lib/ (0x00007f44e7c29000)
  3. For MPICH-3 the MPI application shows
    $ mpiexec -n 2 ./version_info
    Hello world: MPI implementation:
     MPICH Version: 3.1.2
    MPICH Release date: Mon Jul 21 16:00:21 CDT 2014
    MPICH Device: ch3:nemesis
    MPICH configure: --prefix=/home/user/mpich/3.1.2/
    MPICH CC: gcc    -O2
    MPICH CXX: g++   -O2
    MPICH F77: gfortran   -O2
    MPICH FC: gfortran   -O2
  4. Make Intel(R) MPI Library loaded
    $ export LD_LIBRARY_PATH=/opt/intel/impi/$LD_LIBRARY_PATH
    $ mpiexec -n 2 ./version_info
    Hello world: MPI implementation:
     Intel(R) MPI Library 5.0 Update 1 for Linux* OS
  5. On step 4. only the  library was changed, the rest of MPI implementation was MPICH. It is simple to change it also
    $ source /opt/intel/impi/ 
    $ mpiexec.hydra -V
    Intel(R) MPI Library for Linux* OS, Version 5.0 Update 1 Build 20140709
    Copyright (C) 2003-2014, Intel Corporation. All rights reserved.
    $ mpiexec.hydra -n 2 ./version_info
    Hello world: MPI implementation:
     Intel(R) MPI Library 5.0 Update 1 for Linux* OS


For evaluation of this ABI compatibility feature of Intel MPI Library one can download the Free 30-Day Evaluation Version or use Intel MPI Library Runtime Environment free of charge (with limited support options). For more details please refer to the Intel MPI Library Licensing FAQ.


Product and Performance Information


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