Skip to content
Snippets Groups Projects
Commit 8c59ea28 authored by Marty Kandes's avatar Marty Kandes
Browse files

Update HPL def file to OpenMPI 4.0.5; fixed PMIX bug

Added Singularity.hpl-2.3-ubuntu-18.04-openmpi-4.0.5-openblas-0.3.14
definition file. Updating to OpenMPI 4.0.5 fixed the PMIX errors
observed with OpenMPI 4.0.4 discussed in the previous commit.
parent 210cd3ed
No related branches found
No related tags found
No related merge requests found
Bootstrap: shub
From: mkandes/naked-singularity:ubuntu-18.04-openmpi-4.0.5
%labels
APPLICATION_NAME High-Performance Linpack (HPL)
APPLICATION_VERSION 2.3
APPLICATION_URL https://www.netlib.org/benchmark/hpl
AUTHOR_NAME Marty Kandes
AUTHOR_EMAIL mkandes@sdsc.edu
LAST_UPDATED 20210321
%setup
%environment
# Set OpenBLAS version number, target architecture, maximum number
# of threads, root and installation directories
export OPENBLAS_REPO_URL='https://github.com/xianyi/OpenBLAS.git'
export OPENBLAS_VERSION='0.3.14'
export OPENBLAS_ROOT_DIR='/opt/openblas'
export OPENBLAS_INSTALL_DIR="${OPENBLAS_ROOT_DIR}/${OPENBLAS_VERSION}"
export OPENBLAS_USE_OPENMP=1
export OPENBLAS_DYNAMIC_ARCH=1
export OPENBLAS_TARGET_ARCH='HASWELL'
export OPENBLAS_MAX_NUM_THREADS=256
# Set path to OpenBLAS libraries
export LD_LIBRARY_PATH="${OPENBLAS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}"
# Set HPL version number, target architecture, root and installation
# directories
export HPL_ROOT_URL='http://www.netlib.org/benchmark/hpl'
export HPL_VERSION='2.3'
export HPL_ARCH='linux64'
export HPL_ROOT_DIR='/opt/hpl'
export HPL_INSTALL_DIR="${HPL_ROOT_DIR}/${HPL_VERSION}"
# Set path to HPL binary
export PATH="${HPL_INSTALL_DIR}/bin:${PATH}"
%post -c /bin/bash
# Set operating system mirror URL
export MIRRORURL='http://us.archive.ubuntu.com/ubuntu'
# Set operating system version
export OSVERSION='bionic'
# Set system locale
export LC_ALL='C'
# Set debian frontend interface
export DEBIAN_FRONTEND='noninteractive'
# Set Mellanox OFED version, operating system, and hardware platform
export MLNX_ROOT_URL='http://www.mellanox.com/downloads/ofed'
export MLNX_OFED_VERSION='4.7-3.2.9.0'
export MLNX_OS_VERSION='ubuntu18.04'
export MLNX_PLATFORM='x86_64'
# Set OpenMPI major, minor, and revision numbers, root and
# installation directories
export OMPI_ROOT_URL='https://download.open-mpi.org/release/open-mpi'
export OMPI_MAJOR='4'
export OMPI_MINOR='0'
export OMPI_REVISION='5'
export OMPI_VERSION="${OMPI_MAJOR}.${OMPI_MINOR}.${OMPI_REVISION}"
export OMPI_ROOT_DIR='/opt/openmpi'
export OMPI_INSTALL_DIR="${OMPI_ROOT_DIR}/${OMPI_VERSION}"
# Set paths to OpenMPI binaries and libraries
export PATH="${OMPI_INSTALL_DIR}/bin:${PATH}"
export LD_LIBRARY_PATH="${OMPI_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}"
# Upgrade all software packages to their latest versions
apt-get -y update && apt-get -y upgrade
cd /tmp
# Set OpenBLAS version number, target architecture, maximum number
# of threads, root and installation directories
export OPENBLAS_REPO_URL='https://github.com/xianyi/OpenBLAS.git'
export OPENBLAS_VERSION='0.3.14'
export OPENBLAS_ROOT_DIR='/opt/openblas'
export OPENBLAS_INSTALL_DIR="${OPENBLAS_ROOT_DIR}/${OPENBLAS_VERSION}"
export OPENBLAS_USE_OPENMP=1
export OPENBLAS_DYNAMIC_ARCH=1
export OPENBLAS_TARGET_ARCH='HASWELL'
export OPENBLAS_MAX_NUM_THREADS=256
# Download, build, and install OpenBLAS
git clone "${OPENBLAS_REPO_URL}"
cd OpenBLAS
git checkout "v${OPENBLAS_VERSION}"
if (( "${OPENBLAS_DYNAMIC_ARCH}" == 1 )); then
make FC='gfortran' BINARY=64 USE_OPENMP="${OPENBLAS_USE_OPENMP}" DYNAMIC_ARCH=1 NUM_THREADS="${OPENBLAS_MAX_NUM_THREADS}"
else
make FC='gfortran' BINARY=64 USE_OPENMP="${OPENBLAS_USE_OPENMP}" TARGET="${OPENBLAS_TARGET_ARCH}" NUM_THREADS="${OPENBLAS_MAX_NUM_THREADS}"
fi
make PREFIX="${OPENBLAS_INSTALL_DIR}" install
# Set path to OpenBLAS libraries
export LD_LIBRARY_PATH="${OPENBLAS_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}"
cd /tmp
# Remove OpenBLAS build directory
rm -rf OpenBLAS
# Set HPL version number, target architecture, root and installation
# directories
export HPL_ROOT_URL='http://www.netlib.org/benchmark/hpl'
export HPL_VERSION='2.3'
export HPL_ARCH='linux64'
export HPL_ROOT_DIR='/opt/hpl'
export HPL_INSTALL_DIR="${HPL_ROOT_DIR}/${HPL_VERSION}"
# Download, build, and install HPL
wget "${HPL_ROOT_URL}/hpl-${HPL_VERSION}.tar.gz"
tar -xf "hpl-${HPL_VERSION}.tar.gz"
cd "hpl-${HPL_VERSION}/setup"
source make_generic
mv Make.UNKNOWN Make.linux64
sed -i 's/ARCH = UNKNOWN/ARCH = linux64/' Make.linux64
sed -i 's/TOPdir = $(HOME)\/hpl/TOPdir =/' Make.linux64
sed -i "s/TOPdir =/TOPdir = \/opt\/hpl\/${HPL_VERSION}/" Make.linux64
sed -i 's/MPdir = /MPdir = \/opt\/openmpi/4.0.4/' Make.linux64
sed -i 's/MPinc = /MPinc = -I$(MPdir)\/include/' Make.linux64
sed -i 's/MPlib = /MPlib = $(MPdir)\/lib\/libmpi.so/' Make.linux64
sed -i "s/LAdir = /LAdir = \/opt\/openblas\/${OPENBLAS_VERSION}/" Make.linux64
sed -i 's/LAinc = /LAinc = -I$(LAdir)\/include/' Make.linux64
sed -i 's/LAlib = -lblas/LAlib = $(LAdir)\/lib\/libopenblas.a/' Make.linux64
sed -i 's/LINKER = mpif77/LINKER = mpicc/' Make.linux64
cp Make.linux64 ../
cd ../
export LDFLAGS="-L${OPENBLAS_INSTALL_DIR}/lib"
./configure --prefix="${HPL_INSTALL_DIR}"
make arch='linux64'
make install
cd /tmp
# Remove HPL build directory and source tarball
rm -rf "hpl-${HPL_VERSION}"
rm "hpl-${HPL_VERSION}.tar.gz"
# Cleanup
apt-get -y autoremove --purge
apt-get -y clean
# Update database for mlocate
updatedb
%files
%runscript
%test
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment