Rate This Document
Findability
Accuracy
Completeness
Readability

Compiling and Installing Open MPI

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Run the following command to install dependencies:

    yum install numactl-devel-* systemd-devel-*

  3. Load the compiler.

    export PATH=/path/to/GNU/bin:$PATH

    export LD_LIBRARY_PATH=/path/to/GNU/lib64:$LD_LIBRARY_PATH

  4. Decompress the Open MPI installation package.

    cd /path/to/OPENMPI

    tar -xvf openmpi-4.0.1.tar.gz

  5. Run the following commands:

    cd openmpi-4.0.1

    ./configure --prefix=/path/to/OPENMPI --enable-pretty-print-stacktrace --enable-orterun-prefix-by-default --with-knem=/opt/knem-1.1.3.90mlnx1/ --with-hcoll=/opt/mellanox/hcoll/ --with-cma --with-ucx --enable-mpi1-compatibility CC=gcc CXX=g++ FC=gfortran

    • --with-ucx: Use the built-in library /usr/lib64/ucx.
    • --with-knem and --with-hcoll: Install the mellanox driver. For details, see "Installing the InfiniBand NIC Driver" in HPC Solution Basic Environment Setup Guide.
  6. Compile and install Open MPI.

    make -j 16

    make install