Visible to Intel only — GUID: GUID-B9AC0E5C-4D44-4AA7-A557-C36D685E0982
Visible to Intel only — GUID: GUID-B9AC0E5C-4D44-4AA7-A557-C36D685E0982
Run the Application with a Container
You can choose from three usage models for running your application using a Singularity* container:
- Everything packed into a single container
- The Intel MPI Library installed both inside and outside the container
- 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.
Recipe file
BootStrap: yum OSVersion: 8 MirrorURL: http://linux-ftp.jf.intel.com/pub/mirrors/centos/8/BaseOS/$basearch/os/ Include: yum %environment source /opt/intel/oneapi/mpi/latest/env/vars.sh %post export http_proxy=http://*** yum repolist yum install -y yum-utils tee > /tmp/oneAPI.repo << EOF [oneAPI] name=Intel(R) oneAPI repository baseurl=https://yum.repos.intel.com/oneapi enabled=1 gpgcheck=1 repo_gpgcheck=1 gpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB EOF mv /tmp/oneAPI.repo /etc/yum.repos.d yum install -y intel-oneapi-mpi* yum install -y sudo wget vi which numactl bzip2 tar gcc hostname util-linux redhat-lsb openssh-server openssh-clients
Launch
When recipe is created, execute the following command:
$ singularity exec <container-name> mpirun -n <number-of-processes> -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.
Recipe file
BootStrap: yum OSVersion: 8 MirrorURL: http://linux-ftp.jf.intel.com/pub/mirrors/centos/8/BaseOS/$basearch/os/ Include: yum %environment source /opt/intel/oneapi/mpi/latest/env/vars.sh %post export http_proxy=http://*** yum repolist yum install -y yum-utils tee > /tmp/oneAPI.repo << EOF [oneAPI] name=Intel(R) oneAPI repository baseurl=https://yum.repos.intel.com/oneapi enabled=1 gpgcheck=1 repo_gpgcheck=1 gpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB EOF mv /tmp/oneAPI.repo /etc/yum.repos.d yum install -y intel-oneapi-mpi* yum install -y sudo wget vi which numactl bzip2 tar gcc hostname util-linux redhat-lsb
Launch
When recipe is created, execute the following command:
$ mpirun -n <number-of-processes> -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.
Recipe file
BootStrap: yum OSVersion: 8 MirrorURL: http://linux-ftp.jf.intel.com/pub/mirrors/centos/8/BaseOS/$basearch/os/ Include: yum %environment source /opt/intel/oneapi/mpi/latest/env/vars.sh %post export http_proxy=http://*** yum repolist yum install -y yum-utils tee > /tmp/oneAPI.repo << EOF [oneAPI] name=Intel(R) oneAPI repository baseurl=https://yum.repos.intel.com/oneapi enabled=1 gpgcheck=1 repo_gpgcheck=1 gpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB EOF mv /tmp/oneAPI.repo /etc/yum.repos.d yum install -y intel-oneapi-mpi* yum install -y sudo wget vi which numactl bzip2 tar gcc hostname util-linux 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 <number-of-processes> -ppn <processes-per-node> -hostlist <hosts> <application>