(picture from Wikimedia, see also http:%%//%%www.worldshipping.org)
(picture from http:%%//%%www.bricoleurbanism.org)
Singularity:
section | |
---|---|
setup | executed before post |
post | install commands |
files | executed after post |
environment | add variables for runtime |
runscript | commands when container is executed |
labels | metadata |
test | |
apps |
Filename: OpenMPI-3.0.0
BootStrap: docker From: centos:7.4.1708 %setup cp openmpi-3.0.0.tar.bz2 \ ${SINGULARITY_ROOTFS}/usr/local/src/openmpi-3.0.0.tar.bz2
%post yum install -y gcc gcc-c++ gcc-gfortran yum install -y wget tar make bzip2 gzip perl rsync zip yum install -y infinipath-psm-devel infinipath-psm yum install -y libibverbs-devel libibverbs cd /usr/local/src tar -xjf openmpi-3.0.0.tar.bz2 cd openmpi-3.0.0 ./configure --prefix=/usr/local --with-hwloc --with-psm --with-verbs make -j 16 make install ldconfig
on your local system as root user:
#singularity must be present module load singularity/2.4.2 singularity build OpenMPI-3.0.0.img OpenMPI-3.0.0
Filename: MPI-Hello
BootStrap: localimage From: .../OpenMPI-3.0.0.img %post yum install -y git mkdir /usr/local/src/git cd /usr/local/src/git git clone https://github.com/wesleykendall/mpitutorial cd mpitutorial/tutorials/mpi-hello-world/code make cp mpi_hello_world /usr/local/bin %runscript /usr/local/bin/mpi_hello_world $@
singularity build MPI-Hello.img MPI-Hello
#!/bin/bash #SBATCH -J singularity #SBATCH -N 2 module purge module load intel/18 openmpi/3.0.0 singularity/2.4.2 mpirun -np 32 ./MPI-Hello.img
<html><br></html> <html><br></html> <html><br></html> <html><br></html> <html><br></html> <html><br></html> <html><br></html> http://singularity.lbl.gov