• 2019 Update 7
  • 03/31/2020
Contents

Build a Singularity* Container for an MPI Application

Intel® MPI Library Developer Guide for Linux* OS
There are several ways to build Singularity* containers described in the Singularity official documentation.
This section demonstrates how to build a container for an MPI application from scratch using recipes. Singularity recipes are files that include software requirements, environment variables, metadata, and other useful details for designing a custom container.

Recipe File Structure

A recipe file consists of the header and sections. The header part defines the core operating system and core packages to be installed. In particular:
  • Bootstrap
    - specifies the bootstrap module.
  • OSVersion
    - specifies the OS version. Required if only you have specified the %{OSVERSION} variable in
    MirrorURL.
  • MirrorURL
    - specifies the URL to use as a mirror to download the OS.
  • Include
    - specifies additional packages to be installed into the core OS (optional).
The content of a recipe file is divided into sections that execute commands at different times during the build process. The build process stops if a command fails. The main sections of a recipe are:
  • %help
    - provides help information.
  • %setup
    - executes commands on the host system outside of the container after the base OS is installed.
  • %post
    - executes commands within the container after the base OS has been installed at build time.
  • %environment
    - adds environment variables sourced at runtime. If you need environment variables sourced during build time, define them in the %post section.

Build a Container

After the recipe file is created, use it to create a Singularity container. The example below shows how to build a container with default parameters:
$ singularity build mpi.img ./Singularity_recipe_mpi

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