Installation Guide

This Installation Guide guide details the various ways to install and configure the MPC library (Multi-Processor Communications) version including MPI 1.3, OpenMP 3.1 (with patched GCC) and PThread support. For further information on MPC internals, the reader may refer to Documentation for more details about the MPC framework and its execution model.


This section takes you through a sequence of steps to get MPC up and running.

For an easy way to install and run MPC without specific options, please follows the numbered step in the Standard Installation paragraph of this guide, then in the Users Guide.



The following prerequisites are required to compile MPC:

  • The main archive file from the Downloads page.

  • A C compiler (e.g., gcc)
  • A GNU C compiler
  • An optional Fortran compiler if Fortran applications are to be used (e.g., g77 or gfortran)
  • Optional SLURM, HWLOC and OPENPA libraries installed
  • For Infiniband support libibvers is required

Some additional extra libraries are required to compile the patched GCC and GDB. See their corresponding website and installation guide to get a list of prerequisites.

Standard Installation


These steps describe the default installation of MPC with its additional components (GCC, GDB, Hydra, HWLOC and OPENPA). In all commands, replace $MPCVERSION with the desired MPC version number.

  1. Unpack the main archive (tar format) and go to the top-level directory:

    1 % tar xfz MPC_${MPCVERSION}.tar.gz
    2 % cd MPC_${MPCVERSION}

    If your tar program does not accept the ’z’ option, use the following commands

    1 % gunzip MPC_${MPCVERSION}.tar.gz
    2 % tar xf MPC_${MPCVERSION}.tar
    3 % cd MPC_${MPCVERSION}


  2. Choose an installation directory. Using the default /usr/local/ will overwrite legacy headers: choose a custom install path.

    1 % mkdir $HOME/mpc-install

    The most convenient choice is a directory shared among all the machines you want to use the library on. If such a directory is not accessible, you will have to deploy MPC on every machine after the installation.

  3. Build and install MPC using the installmpc script, specifying the installation directory:
     1 % ./installmpc --prefix=$HOME/mpc-install
  4. This script will download and install all dependencies and packages in the prefix or the current directory (if unspecified). You can display the documentation of this script by using the –help option.

     1 % ./installmpc --help
     2 ./installmpc utility
     3 ******************
     4 Usage: ./installmpc [--prefix=<dir>] [-j=<concurrency>] [--mirror=[1|2]] [--help] 
     5 --prefix=<dir> specifies the target installation directory.
     6 if unspecified, installmpc will install the components in the current working directory
     7 --mirror=<mirror_id> specifies the location to download the software.
     8 --mirror=1 (default):
     9 --mirror=2 uses
    10 --mirror=3 uses
    11 --mirror=4 uses
    12 -j=<concurrency> specifies the level of concurrency with which the make -j <concurrency> command is invoked
    13 --mpc_configure_args='<args>' specifies additional MPC parameters passed to configure
    14 For any questions, please e-mail
    15 or refer to the MPC webpage:
    16 ******************

Custom Installation

The previous section described the default installation and configuration of MPC, but other alternatives are available. You can find out more details on the configuration by running: ./configure --help.

Specify the PMI based launcher to be used by MPC as follows:

  • -with-hydra Compile MPC with the Hydra launcher (embedded in the MPC distribution). This option is enabled by default.

  • -with-slurm[=prefix] Compile MPC with the SLURM launcher.

Note that MPC can be compiled with only one launcher. The following options are related to additional libraries required to compile the MPC distribution:

  • -with-cpath=DIR1:DIR2:... Add directories to the CPATH environment variable for the whole MPC distribution.

  • -with-library-path=DIR1:DIR2:... Add directories to the LD\_LIBRARY\_PATH environment variable for the whole MPC distribution

Known issues

  • When building mpc-gcc, you may get errors related to libmpfr or libgmp. If those libraries are installed into a non standard prefix, it may be required to use the following arguments while running the configure script:

    ./configure --gcc-with-mpfr=YOUR_PREFIX --gcc-with-gmp=YOUR_PREFIX --with-library-path=YOUR_PREFIX


  • In case of conflicts with libgmp, it may be preferable to avoid the version 4.3.2 which broke its ABI due to a mistake in documentation and move to 5.0.1 or higher.