Skip to content
Snippets Groups Projects
Commit 5886a8cd authored by Michael Blaschek's avatar Michael Blaschek :bicyclist:
Browse files

MPI definitions

parent d92b0df7
No related branches found
No related tags found
No related merge requests found
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
Bootstrap: library
From: mblaschek/imgw/ubuntu:18.04
# Bootstrap: library
# From: mblaschek/imgw/ubuntu:18.04
Bootstrap: localimage
From: ubuntu.sif
%labels
......
BootStrap: docker
From: rockylinux/rockylinux:8.4
%setup
echo "Looking in directory '$SINGULARITY_ROOTFS' for /bin/sh"
if [ ! -x "$SINGULARITY_ROOTFS/bin/sh" ]; then
echo "Hrmm, this container does not have /bin/sh installed..."
exit 1
fi
exit 0
%post
echo "Installing Development Tools YUM group"
yum -y groupinstall "Development Tools"
echo "Installing OpenMPI into container..."
mkdir -p /tmp/git
cd /tmp/git
# just clone that version
git clone -b v4.0.5 --depth 1 --recursive https://github.com/open-mpi/ompi.git
cd ompi
./autogen.pl
./configure --prefix=/usr/local
make
make install
/usr/local/bin/mpicc examples/ring_c.c -o /usr/bin/mpi_ring
cd /
rm -rf /tmp/git
exit 0
%runscript
exec /usr/bin/mpi_ring
%test
/usr/local/bin/mpirun --allow-run-as-root /usr/bin/mpi_ring
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment