• 2019 Update 7
  • 03/31/2020
Contents

Run the MPI Application with a Container

Intel® MPI Library Developer Guide for Linux* OS
You can choose from three usage models for running your application using a Singularity* container:
  1. Everything packed into a single container
  2. The Intel MPI Library installed both inside and outside the container
  3. The Intel MPI Library outside the container

Usage model 1: Everything packed into a single container

This approach presumes that the Intel® MPI library, target application, and all its dependencies are packed into a container.
Prerequisites
Before running Intel® MPI Library in a Singularity container, make sure you have the following components installed on each machine of a cluster:
  1. Singularity (version not lower than 3.0). Refer to the official documentation for installation steps.
  2. A container including your application and Intel MPI Library.
Recipe file
BootStrap: yum OSVersion: 7 MirrorURL: http://linux-ftp.jf.intel.com/pub/mirrors/centos/7.6.1810/os/$basearch/ Include: yum %environment source /opt/intel/compilers_and_libraries_2019.5.XXX/linux/mpi/intel64/bin/mpivars.sh %post export http_proxy=http://*** yum repolist yum install -y yum-cron yum install -y yum-utils yum-config-manager --add-repo https://yum.repos.intel.com/mpi/setup/intel-mpi.repo yum install -y intel-mpi-2019.5-XXX yum install -y sudo wget vi which numactl bzip2 tar gcc hostname lscpu uptime redhat-lsb openssh-server openssh-clients
Launch
When recipe is created, execute the following command:
$ singularity exec <container_name> mpirun -n <processes_num> -ppn <processes_per_node> -hostlist <hosts> <application>

Usage model 2: The Intel MPI Library installed both inside and outside the container

In this approach,
additional dependency on hosts (for example, external mpirun) is required. Each rank is a separate Singularity container instance execution.
Prerequisites
Before running Intel MPI Library in a Singularity container, make sure you have the following components installed on each machine of a cluster:
  1. Singularity (version not lower than 3.0).
  2. A container including your application and Intel MPI Library.
  3. Intel MPI Library.
Recipe file
BootStrap: yum OSVersion: 7 MirrorURL: http://linux-ftp.jf.intel.com/pub/mirrors/centos/7.6.1810/os/$basearch/ Include: yum %environment source /opt/intel/compilers_and_libraries_2019.5.XXX/linux/mpi/intel64/bin/mpivars.sh %post export http_proxy=http://*** yum repolist yum install -y yum-cron yum install -y yum-utils yum-config-manager --add-repo https://yum.repos.intel.com/mpi/setup/intel-mpi.repo yum install -y intel-mpi-2019.5-XXX yum install -y sudo wget vi which numactl bzip2 tar gcc hostname lscpu uptime redhat-lsb
Launch
When recipe is created, execute the following command:
$ mpirun -n <processes_num> -ppn <processes_per_node> -hostlist <hosts> singularity exec <container_name>
<application>

Usage model 3: The Intel MPI Library outside the container

In this approach,
additional dependency on hosts (for example, external mpirun) is required.
Each host has a single Singularity container instance executed for all ranks.
Prerequisites
Before running Intel MPI Library in a Singularity container, make sure you have the following components installed on each machine of a cluster:
  1. Singularity (version not lower than 3.0).
  2. A container including your application.
  3. Intel MPI Library.
Recipe file
BootStrap: yum OSVersion: 7 MirrorURL: http://linux-ftp.jf.intel.com/pub/mirrors/centos/7.6.1810/os/$basearch/ Include: yum %environment source /mnt/mpi/intel64/bin/mpivars.sh release %post export http_proxy=http://*** yum repolist yum install -y yum-cron yum install -y yum-utils yum-config-manager --add-repo https://yum.repos.intel.com/mpi/setup/intel-mpi.repo yum install -y intel-mpi-2019.5-XXX yum install -y sudo wget vi which numactl bzip2 tar gcc hostname lscpu uptime redhat-lsb openssh-server openssh-clients
Launch
When recipe is created, execute the following command:
$ singularity shell --bind <path_to_mpi_installation_on_hosts:/mnt> mpirun -n <processes_num> -ppn <processes_per_node> -hostlist <hosts> <application>

Product and Performance Information

1

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