91 lines
3.4 KiB
Plaintext
Executable File
91 lines
3.4 KiB
Plaintext
Executable File
#!/usr/bin/env modbuild
|
|
|
|
pbuild::pre_configure() {
|
|
# It seems 'unset F90' is here since 2015-10-14
|
|
# Probably some old gcc or mpich versions had problems with it
|
|
# To review for gcc, but I think this should be not set anymore
|
|
#
|
|
# The versions compiled with 'unset F90' on Merlin7 are:
|
|
# mpich/3.3.2 unstable Compiler Alps gcc/8.4.0
|
|
# mpich/4.2.3 stable Compiler Alps gcc/8.5.0
|
|
# mpich/4.2.3 stable Compiler Alps gcc/12.3.0
|
|
# mpich/4.3.1 stable Compiler Alps gcc/8.5.0
|
|
# mpich/4.3.1 stable Compiler Alps gcc/12.3.0
|
|
#
|
|
# Finally, compiling with 'unset F90' crashes IntelCC based compilations
|
|
# which require it
|
|
#
|
|
# Commented out from now on:
|
|
# unset F90
|
|
|
|
pbuild::add_configure_args "--enable-shared"
|
|
pbuild::add_configure_args "--enable-static"
|
|
|
|
if [[ -v CUDA_VERSION ]] || pbuild::use_flag cuda; then
|
|
std::info "Enabling CUDA ${CUDA_VERSION}."
|
|
pbuild::add_configure_args "--with-cuda=${CUDA_HOME}"
|
|
pbuild::add_configure_args "--with-cuda-lib=${CUDA_HOME}/lib64/stubs"
|
|
fi
|
|
|
|
if [[ -v HWLOC_VERSION ]]; then
|
|
unset HWLOC_VERSION
|
|
std::info "Enabling external hwloc ${HWLOC_PREFIX}."
|
|
pbuild::add_configure_args "--with-hwloc=${HWLOC_PREFIX}"
|
|
else
|
|
pbuild::add_configure_args "--with-hwloc=embedded"
|
|
fi
|
|
|
|
if [[ -v PMIX_VERSION ]]; then
|
|
std::info "Enabling PMIX ${PMIX_VERSION}."
|
|
unset PMIX_VERSION
|
|
pbuild::add_configure_args "--with-pmix=${PMIX_PREFIX}"
|
|
pbuild::add_configure_args "--with-pmi=pmix"
|
|
fi
|
|
|
|
if pbuild::use_flag merlin7 && [[ ! -v LIBFABRIC_VERSION ]]; then
|
|
if pkg-config --exists libfabric; then
|
|
std::info "Get LIBFABRIC_VERSION via pkg-config"
|
|
LIBFABRIC_PREFIX=$(pkg-config --variable=prefix libfabric)
|
|
LIBFABRIC_VERSION="$(LIBFABRIC_PREFIX##*/)"
|
|
fi
|
|
fi
|
|
if [[ -v LIBFABRIC_VERSION ]]; then
|
|
std::info "Enabling libfabric ${LIBFABRIC_VERSION}."
|
|
if (( V_MAJOR < 4 )); then
|
|
pbuild::add_configure_args "--with-ofi=${LIBFABRIC_PREFIX}"
|
|
fi
|
|
pbuild::add_configure_args "--with-libfabric=${LIBFABRIC_PREFIX}"
|
|
fi
|
|
|
|
if [[ -v UCX_VERSION ]]; then
|
|
std::info "Enabling UCX ${UCX_VERSION}."
|
|
pbuild::add_configure_args "--with-ucx=${UCX_PREFIX}"
|
|
fi
|
|
|
|
if [[ -v INTEL_VERSION ]] || [[ -v INTELCC_VERSION ]]; then
|
|
# Commented out, since this comes with the Intel/IntelCC modules
|
|
#
|
|
# pbuild::add_configure_args "CC=$(which icc)"
|
|
# pbuild::add_configure_args "CXX=$(which icpc)"
|
|
# pbuild::add_configure_args "FC=$(which ifort)"
|
|
# pbuild::add_configure_args "F90=$(which ifort)"
|
|
# pbuild::add_configure_args "F77=$(which ifort)"
|
|
# pbuild::add_configure_args "LDFLAGS=-Wc,-static-intel,-O0"
|
|
#
|
|
# In general, any extra configure args should go to config.yaml
|
|
fi
|
|
|
|
if pbuild::use_flag slurm || \
|
|
pbuild::use_flag merlin6 || \
|
|
pbuild::use_flag merlin7; then
|
|
std::info "Enabling SLURM."
|
|
pbuild::add_configure_args "--with-slurm"
|
|
fi
|
|
}
|
|
|
|
# Local Variables:
|
|
# mode: sh
|
|
# sh-basic-offset: 8
|
|
# tab-width: 8
|
|
# End:
|