Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
151 lines (129 sloc) 5.66 KB
##
# @file This file is part of EDGE.
#
# @author Alexander Breuer (anbreuer AT ucsd.edu)
#
# @section LICENSE
# Copyright (c) 2016-2018, Regents of the University of California
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# @section DESCRIPTION
#
# Debian bootstrap for EDGE and supporting software.
# Build a container via: `sudo singularity build ./edge.simg ./edge.def`
##
BootStrap: debootstrap
OSVersion: stretch
MirrorURL: http://ftp.us.debian.org/debian/
Include:
%post
echo "deb http://http.us.debian.org/debian testing main non-free contrib" >> /etc/apt/sources.list
echo "deb-src http://http.us.debian.org/debian testing main non-free contrib" >> /etc/apt/sources.list
apt-get update -qq -o=Dpkg::Use-Pty=0
apt-get install -qq -o=Dpkg::Use-Pty=0 -y sudo
sudo apt-get install -qq -o=Dpkg::Use-Pty=0 -y curl
bash <<EOF
bash <(curl -s https://raw.githubusercontent.com/3343/edge/develop/tools/build/install_tools.sh)
EOF
%appinstall edge
bash <<EOF
bash <(curl -s https://raw.githubusercontent.com/3343/edge/develop/tools/build/install_libs.sh)
EOF
EDGE_N_BUILD_PROC=$(cat /proc/cpuinfo | grep "cpu cores" | uniq | awk '{print $NF}')
git clone https://github.com/3343/edge.git
cd edge
git checkout develop
git submodule init
git submodule update
for order in 1 2 3 4 5
do
# haswell
for mesh_type in reg uns
do
if [ "${mesh_type}" = "reg" ]; then moab=no; else moab=yes; fi
CXX=mpiCC scons equations=elastic element_type=tet4 order=${order} cfr=1 arch=hsw precision=32 xsmm=yes zlib=yes hdf5=yes moab=${moab} parallel=omp -j ${EDGE_N_BUILD_PROC} > /dev/null
cp build/edge /bin/edge_elastic_${mesh_type}_o${order}_cfr1_hsw_xsmm_omp
done
# AVX512
for mesh_type in reg uns
do
if [ "${mesh_type}" = "reg" ]; then moab=no; else moab=yes; fi
for cfr in 1 16
do
CXX=mpiCC scons equations=elastic element_type=tet4 order=${order} cfr=${cfr} arch=avx512 precision=32 xsmm=yes zlib=yes hdf5=yes moab=${moab} parallel=omp -j ${EDGE_N_BUILD_PROC} > /dev/null
cp build/edge /bin/edge_elastic_${mesh_type}_o${order}_cfr${cfr}_avx512_xsmm_omp
done
done
done
cd ..
############
# Clean up #
############
echo "cleaning up"
rm -rf ${INSTALL_DIR}
%apphelp edge
Installation of the Extreme-scale Discontinuous Galerkin Environment (EDGE).
http://dial3343.org
Supported configurations:
* AVX2 (Haswell, EPYC):
- tetrahedral elements
- elastic wave equations
- orders 1-5
- regular (runtime generated) and unstructured meshes (MOAB)
- HDF5 support
- non-fused simulations (1 concurrent run) only
- single precision arithmetic (32bit)
- parallelization: LIBXSMM (SIMD), OpenMP (multicore)
* AVX512 (Knights Landing, Skylake, Knights Mill), everything as AVX2 except for:
- non-fused simulations (1 concurrent run)
- fused simulations (16 concurrent runs)
%apprun edge
# check input
if [ "$#" -ne 1 ]
then
echo "Error: Only one command line argument, containing EDGE's xml-file, is allowed."
exit 1
fi
# parse xml
MOAB="$(echo "cat /edge/build/moab/text()" | xmllint --nocdata --shell $* | sed -n -e 2p)"
ORDER="$(echo "cat /edge/build/order/text()" | xmllint --nocdata --shell $* | sed -n -e 2p)"
CFR="$(echo "cat /edge/build/cfr/text()" | xmllint --nocdata --shell $* | sed -n -e 2p )"
ARCH="$(echo "cat /edge/build/arch/text()" | xmllint --nocdata --shell $* | sed -n -e 2p)"
# derive mesh type
if [ "${MOAB}" = "no" ]
then
MESH_TYPE=reg
else
MESH_TYPE=uns
fi
# catch non-supported executables
if [ "${CFR}" != "1" ] && [ "${CFR}" != "16" ]
then
echo "CFR-tag: is not supported (<cfr>CFR</cfr>); ${CFR}"
exit 1
fi
if [ "${ORDER}" != "1" ] && [ "${ORDER}" != "2" ] && [ "${ORDER}" != "3" ] && [ "${ORDER}" != "4" ] && [ "${ORDER}" != "5" ]
then
echo "Error: ORDER-tag is not supported (<order>ORDER</order>); ${ORDER}"
exit 1
fi
if [ "${ARCH}" != "hsw" ] && [ "${ARCH}" != "avx512" ]
then
echo "Warning: ARCH-tag is not supported (<arch>ARCH</arch>): ${ARCH}; falling back to hsw and CFR=1"
ARCH=hsw
CFR=1
fi
# define excecutable
EDGE_EXEC=edge_elastic_${MESH_TYPE}_o${ORDER}_cfr${CFR}_${ARCH}_xsmm_omp
# run EDGE
${EDGE_EXEC} -x $*
You can’t perform that action at this time.