Installing OpenMPI
Prerequisites
The IOR test is based on a parallel file system. Install OpenMPI before performing the test.
Procedure
- Install the InfiniBand (IB) driver.
For details about how to install the IB driver, see "Installing the InfiniBand NIC Driver" in the HPC Solution Basic Environment Setup Guide.
- Use PuTTY to log in to the server as the root user.
- Create the /home/OpenMPI directory on the server. If a shared directory or file system exists on the server, you are advised to upload the OpenMPI installation package to and install it in the shared directory or file system.
mkdir /home/OpenMPI
- Upload the OpenMPI installation package openmpi-4.0.1.tar.gz to the /home/OpenMPI directory on the server.
- Run the following command to install OpenMPI. The installation and compilation take about 30 minutes.
cd /home/OpenMPI
tar zxvf openmpi-4.0.1.tar.gz
cd openmpi-4.0.1
mkdir build
cd build
../configure --prefix=/home/OpenMPI --enable-pretty-print-stacktrace --enable-orterun-prefix-by-default --with-knem=/opt/knem-1.1.3.90mlnx1/ --with-mxm=/opt/mellanox/mxm/ --with-hcoll=/opt/mellanox/hcoll/ --with-cma --with-platform=../contrib/platform/mellanox/optimized
make && make install
- Run the either of the following commands on all servers involved in the IOR test to configure the environment variables:
- vi /root/.bashrc
or
vi /etc/profile
- Press i to enter the editing mode and add the following information to the end of the /root/.bashrc or /etc/profile file:
MPI_HOME=/home/OpenMPI export PATH=${MPI_HOME}/bin:$PATH export LD_LIBRARY_PATH=${MPI_HOME}/lib:$LD_LIBRARY_PATH - Press Esc, enter :wq!, and press Enter to save the file and exit.
- vi /root/.bashrc
- Run the following command to make the environment variables take effect:
source /root/.bashrc
or
source /etc/profile
Parent topic: Software Installation and Environment Configuration