Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions EESSI-pilot-install-software.sh
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,12 @@ fail_msg="Installation of IPython failed, that's unexpected..."
$EB IPython-7.15.0-foss-2020a-Python-3.8.2.eb -r
check_exit_code $? "${ok_msg}" "${fail_msg}"

echo ">> Installing WRF 3.9.1.1..."
ok_msg="WRF installed, it's getting hot in here!"
fail_msg="Installation of WRF failed, that's unexpected..."
OMPI_MCA_pml=ucx UCX_TLS=tcp $EB WRF-3.9.1.1-foss-2020a-dmpar.eb -r --include-easyblocks-from-pr 2648
check_exit_code $? "${ok_msg}" "${fail_msg}"

echo ">> Creating/updating Lmod cache..."
export LMOD_RC="${EASYBUILD_INSTALLPATH}/.lmod/lmodrc.lua"
if [ ! -f $LMOD_RC ]; then
Expand Down
26 changes: 25 additions & 1 deletion eb_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from easybuild.tools.build_log import EasyBuildError, print_msg
from easybuild.tools.config import build_option, update_build_option
from easybuild.tools.systemtools import POWER, get_cpu_architecture
from easybuild.tools.systemtools import AARCH64, POWER, get_cpu_architecture

EESSI_RPATH_OVERRIDE_ATTR = 'orig_rpath_override_dirs'

Expand Down Expand Up @@ -124,8 +124,32 @@ def ucx_eprefix(ec, eprefix):
raise EasyBuildError("UCX-specific hook triggered for non-UCX easyconfig?!")


def pre_configure_hook(self, *args, **kwargs):
"""Main pre-configure hook: trigger custom functions based on software name."""
if self.name in PRE_CONFIGURE_HOOKS:
PRE_CONFIGURE_HOOKS[self.name](self, *args, **kwargs)


def wrf_preconfigure(self, *args, **kwargs):
"""
Pre-configure hook for WRF:
- patch arch/configure_new.defaults so building WRF with foss toolchain works on aarch64
"""
if self.name == 'WRF':
if get_cpu_architecture() == AARCH64:
pattern = "Linux x86_64 ppc64le, gfortran"
repl = "Linux x86_64 aarch64 ppc64le, gfortran"
self.cfg.update('preconfigopts', "sed -i 's/%s/%s/g' arch/configure_new.defaults && " % (pattern, repl))
print_msg("Using custom preconfigopts for %s: %s", self.name, self.cfg['preconfigopts'])
else:
raise EasyBuildError("WRF-specific hook triggered for non-WRF easyconfig?!")

PARSE_HOOKS = {
'CGAL': cgal_toolchainopts_precise,
'fontconfig': fontconfig_add_fonts,
'UCX': ucx_eprefix,
}

PRE_CONFIGURE_HOOKS = {
'WRF': wrf_preconfigure,
}
6 changes: 6 additions & 0 deletions eessi-2021.12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,9 @@ software:
toolchains:
SYSTEM:
versions: '3.7.3'
WRF:
toolchains:
foss-2020a:
versions:
'3.9.1.1':
versionsuffix: -dmpar