Updated on 2022-05-09 GMT+08:00

Intel MPI

Scenarios

This section describes how to install and use Intel MPI (for example, l_mpi_2018.0.128) on an ECS.

Prerequisites

You have configured the ECS password-free login.

Procedure

  1. Install Intel MPI.

    1. Download Intel MPI.

      Download path: https://software.intel.com/en-us/intel-mpi-library

    2. Run the following commands to decompress and install Intel MPI:

      For example, run the following commands to decompress and install l_mpi_2018.0.128.tgz:

      # tar -xvf l_mpi_2018.0.128.tgz

      # cd l_mpi_2018.0.128/

      # ./install.sh

      Figure 1 Successful Intel MPI installation

  2. Configure environment variables.

    1. Add the following statements in ~/.bashrc as a common user:

      export PATH=$PATH:/opt/intel/impi/2018.0.128/bin64

      export LD_LIBRARY_PATH=/opt/intel/impi/2018.0.128/lib64

    2. Run the following command to import environment variables:

      # source ~/.bashrc

  3. Run the following command to check whether environment variables are imported successfully:

    # which mpirun

    Figure 2 Successful importing of environment variables

    If information shown in Figure 2 is displayed, the environment variables have been imported.

  4. Run the following commands to run Intel MPI on an ECS:

    1. Run the following commands to generate an executable file:

      # cd

      # mpicc hello.c -o intel_hello

    2. Run the following command to run Intel MPI on an ECS:

      # mpirun -np 2 /root/intel_hello

      Figure 3 Running Intel MPI on an ECS