diff --git a/EESSI-pilot-install-software.sh b/EESSI-pilot-install-software.sh index 10c57c6d13..a25c3f1d9e 100755 --- a/EESSI-pilot-install-software.sh +++ b/EESSI-pilot-install-software.sh @@ -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 diff --git a/eb_hooks.py b/eb_hooks.py index 126d89ca46..653094266d 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -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' @@ -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, +} diff --git a/eessi-2021.12.yml b/eessi-2021.12.yml index 0d060f55ac..f3ed9dd9c4 100644 --- a/eessi-2021.12.yml +++ b/eessi-2021.12.yml @@ -47,3 +47,9 @@ software: toolchains: SYSTEM: versions: '3.7.3' + WRF: + toolchains: + foss-2020a: + versions: + '3.9.1.1': + versionsuffix: -dmpar