Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Singularity
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Container registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IMGW
Singularity
Commits
6de984ff
Commit
6de984ff
authored
Mar 18, 2021
by
Marty Kandes
Browse files
Options
Downloads
Patches
Plain Diff
Add updated HPL def file with OpenMPI 4.0.4 and OpenBLAS 0.3.14
parent
c54cdf3e
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
definition-files/hpl/Singularity.hpl-2.3-ubuntu-18.04-openmpi-4.0.4-openblas-0.3.14
+161
-0
161 additions, 0 deletions
...larity.hpl-2.3-ubuntu-18.04-openmpi-4.0.4-openblas-0.3.14
with
161 additions
and
0 deletions
definition-files/hpl/Singularity.hpl-2.3-ubuntu-18.04-openmpi-4.0.4-openblas-0.3.14
0 → 100644
+
161
−
0
View file @
6de984ff
Bootstrap: shub
From: mkandes/naked-singularity:ubuntu-18.04-openmpi-4.0.4
%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 20210318
%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='4'
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment