-
Notifications
You must be signed in to change notification settings - Fork 47
/
configure_easybuild
65 lines (53 loc) · 2.98 KB
/
configure_easybuild
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# if $WORKDIR is not defined, use a local temporary directory
if [ -z ${WORKDIR} ]; then
WORKDIR=$(mktemp -d)
fi
export EASYBUILD_PREFIX=${WORKDIR}/easybuild
export EASYBUILD_INSTALLPATH=${EESSI_PREFIX}/software/${EESSI_OS_TYPE}/${EESSI_SOFTWARE_SUBDIR}
export EASYBUILD_SOURCEPATH=${WORKDIR}/easybuild/sources:${EESSI_SOURCEPATH}
# take into account accelerator target (if specified via $EESSI_ACCELERATOR_TARGET)
if [ ! -z ${EESSI_ACCELERATOR_TARGET} ]; then
if [[ "${EESSI_ACCELERATOR_TARGET}" =~ ^nvidia/cc[0-9][0-9]$ ]]; then
# tweak path to installation directories used by EasyBuild
export EASYBUILD_INSTALLPATH=${EASYBUILD_INSTALLPATH}/accel/${EESSI_ACCELERATOR_TARGET}
# nvidia/cc80 should result in setting $EASYBUILD_CUDA_COMPUTE_CAPABILITIES to '8.0'
export EASYBUILD_CUDA_COMPUTE_CAPABILITIES=$(echo ${EESSI_ACCELERATOR_TARGET} | cut -f2 -d/ | sed 's/^cc\([0-9]\)\([0-9]\)/\1.\2/g')
else
fatal_error "Incorrect value for \$EESSI_ACCELERATOR_TARGET: ${EESSI_ACCELERATOR_TARGET}"
fi
else
echo_yellow "(configure_easybuild) \$EESSI_ACCELERATOR_TARGET not defined"
fi
# just ignore OS dependencies for now, see https://github.com/easybuilders/easybuild-framework/issues/3430
export EASYBUILD_IGNORE_OSDEPS=1
export EASYBUILD_SYSROOT=${EPREFIX}
export EASYBUILD_DEBUG=1
export EASYBUILD_TRACE=1
export EASYBUILD_ZIP_LOGS=bzip2
export EASYBUILD_RPATH=1
export EASYBUILD_FILTER_ENV_VARS=LD_LIBRARY_PATH
export EASYBUILD_READ_ONLY_INSTALLDIR=1
# assume that eb_hooks.py is located in same directory as this script (configure_easybuild)
TOPDIR=$(dirname $(realpath $BASH_SOURCE))
export EASYBUILD_HOOKS=$(realpath ${TOPDIR}/eb_hooks.py)
# make sure hooks are available, so we can produce a clear error message
if [ ! -f $EASYBUILD_HOOKS ]; then
fatal_error "$EASYBUILD_HOOKS does not exist!"
fi
# note: filtering Bison may break some installations, like Qt5 (see https://github.com/EESSI/software-layer/issues/49)
# filtering pkg-config breaks R-bundle-Bioconductor installation (see also https://github.com/easybuilders/easybuild-easyconfigs/pull/11104)
DEPS_TO_FILTER=Autoconf,Automake,Autotools,binutils,bzip2,DBus,flex,gettext,gperf,help2man,intltool,libreadline,libtool,M4,makeinfo,ncurses,util-linux,XZ,zlib
# For aarch64 we need to also filter out Yasm.
# See https://github.com/easybuilders/easybuild-easyconfigs/issues/11190
if [[ "$EESSI_CPU_FAMILY" == "aarch64" ]]; then
DEPS_TO_FILTER="${DEPS_TO_FILTER},Yasm"
fi
# Version 23.06 of EESSI ships PSM2 in the compat layer, so we can filter this out while retaining support for OFA fabric
# (longer term this is probably not the right move as PSM2 should be configured with accelerator support, hence the restricted version)
if [[ "$EESSI_VERSION" == "2023.06" ]]; then
DEPS_TO_FILTER="${DEPS_TO_FILTER},PSM2"
fi
export EASYBUILD_FILTER_DEPS=$DEPS_TO_FILTER
export EASYBUILD_MODULE_EXTENSIONS=1
# need to enable use of experimental features, since we're using easystack files
export EASYBUILD_EXPERIMENTAL=1