From e9756d18c350a471b5ea39cd9b61705480441523 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 28 Nov 2023 09:43:09 +0100 Subject: [PATCH 1/4] {2023.06}[foss/2023a] TensorFlow v2.13.0 --- .../2023.06/eessi-2023.06-eb-4.8.2-2023a.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.8.2-2023a.yml b/easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.8.2-2023a.yml index e685785f16..277fc4ca27 100644 --- a/easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.8.2-2023a.yml +++ b/easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.8.2-2023a.yml @@ -12,3 +12,8 @@ easyconfigs: options: from-pr: 19270 - SciPy-bundle-2023.07-gfbf-2023a.eb + - TensorFlow-2.13.0-foss-2023a.eb: + # patch setup.py for grpcio extension in TensorFlow 2.13.0 easyconfigs to take into account alternate sysroot; + # see https://github.com/easybuilders/easybuild-easyconfigs/pull/19268 + options: + from-pr: 19268 From ce0d5ca7d3386f1f4b37e632017bd2bbba9b1f13 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 28 Nov 2023 11:17:35 +0100 Subject: [PATCH 2/4] update hook to also ignore failing tests on neoverse_v1 for SciPy-bundle 2023.07 --- eb_hooks.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/eb_hooks.py b/eb_hooks.py index 8d05523c2b..b0c5fafea0 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -314,11 +314,19 @@ def pre_test_hook_ignore_failing_tests_FFTWMPI(self, *args, **kwargs): def pre_test_hook_ignore_failing_tests_SciPybundle(self, *args, **kwargs): """ - Pre-test hook for SciPy-bundle: skip failing tests for SciPy-bundle 2021.10 (currently the only version that is failing). + Pre-test hook for SciPy-bundle: skip failing tests for selected SciPy-bundle vrsions + In version 2021.10, 2 failing tests in scipy 1.6.3: + FAILED optimize/tests/test_linprog.py::TestLinprogIPSparse::test_bug_6139 - A... + FAILED optimize/tests/test_linprog.py::TestLinprogIPSparsePresolve::test_bug_6139 + = 2 failed, 30554 passed, 2064 skipped, 10992 deselected, 76 xfailed, 7 xpassed, 40 warnings in 380.27s (0:06:20) = + In versions 2023.07, 2 failing tests in scipy 1.11.1: + FAILED scipy/spatial/tests/test_distance.py::TestPdist::test_pdist_correlation_iris + FAILED scipy/spatial/tests/test_distance.py::TestPdist::test_pdist_correlation_iris_float32 + = 2 failed, 54409 passed, 3016 skipped, 223 xfailed, 13 xpassed, 10917 warnings in 892.04s (0:14:52) = In previous versions we were not as strict yet on the numpy/SciPy tests """ cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR') - if self.name == 'SciPy-bundle' and self.version == '2021.10' and cpu_target == CPU_TARGET_NEOVERSE_V1: + if self.name == 'SciPy-bundle' and self.version in ['2021.10', '2023.07'] and cpu_target == CPU_TARGET_NEOVERSE_V1: self.cfg['testopts'] = "|| echo ignoring failing tests" From 37898378ca48270f29bab0dab233885e72c92d4c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 28 Nov 2023 11:18:25 +0100 Subject: [PATCH 3/4] add parse hook to replace Catch2 build dependency using system toolchain in pybind11 --- eb_hooks.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/eb_hooks.py b/eb_hooks.py index b0c5fafea0..583cd446e0 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -4,6 +4,7 @@ import re from easybuild.easyblocks.generic.configuremake import obtain_config_guess +from easybuild.framework.easyconfig.constants import EASYCONFIG_CONSTANTS from easybuild.tools.build_log import EasyBuildError, print_msg from easybuild.tools.config import build_option, update_build_option from easybuild.tools.filetools import apply_regex_substitutions, copy_file, which @@ -23,6 +24,8 @@ EESSI_RPATH_OVERRIDE_ATTR = 'orig_rpath_override_dirs' +SYSTEM = EASYCONFIG_CONSTANTS['SYSTEM'][0] + def get_eessi_envvar(eessi_envvar): """Get an EESSI environment variable from the environment""" @@ -181,6 +184,25 @@ def parse_hook_openblas_relax_lapack_tests_num_errors(ec, eprefix): raise EasyBuildError("OpenBLAS-specific hook triggered for non-OpenBLAS easyconfig?!") +def parse_hook_pybind11_replace_catch2(ec, eprefix): + """ + Replace Catch2 build dependency in pybind11 easyconfigs with one that doesn't use system toolchain. + cfr. https://github.com/easybuilders/easybuild-easyconfigs/pull/19270 + """ + # tihs is mainly necessary to avoid that --missing keeps reporting Catch2/2.13.9 is missing, + # and to avoid that we need to use "--from-pr 19270" for every easyconfigs that (indirectly) depends on pybind11 + if ec.name == 'pybind11' and ec.version in ['2.10.3', '2.11.1']: + build_deps = ec['builddependencies'] + catch2_build_dep = None + catch2_name, catch2_version = ('Catch2', '2.13.9') + for idx, build_dep in enumerate(build_deps): + if build_dep[0] == catch2_name and build_dep[1] == catch2_version: + catch2_build_dep = build_dep + break + if catch2_build_dep and len(catch2_build_dep) == 4 and catch2_build_dep[3] == SYSTEM: + build_deps[idx] = (catch2_name, catch2_version) + + def parse_hook_qt5_check_qtwebengine_disable(ec, eprefix): """ Disable check for QtWebEngine in Qt5 as workaround for problem with determining glibc version. @@ -360,6 +382,7 @@ def pre_single_extension_isoband(ext, *args, **kwargs): 'CGAL': parse_hook_cgal_toolchainopts_precise, 'fontconfig': parse_hook_fontconfig_add_fonts, 'OpenBLAS': parse_hook_openblas_relax_lapack_tests_num_errors, + 'pybind11': parse_hook_pybind11_replace_catch2, 'Qt5': parse_hook_qt5_check_qtwebengine_disable, 'UCX': parse_hook_ucx_eprefix, } From 04d39a77d3fcc5b7a919139d44c739428c73fa07 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 28 Nov 2023 21:01:20 +0100 Subject: [PATCH 4/4] add post_ready_hook to limit parallellism for selected builds, incl. TensorFlow --- eb_hooks.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/eb_hooks.py b/eb_hooks.py index 3d0e63f4c2..6fe92c7f7b 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -69,6 +69,21 @@ def parse_hook(ec, *args, **kwargs): PARSE_HOOKS[ec.name](ec, eprefix) +def post_ready_hook(self, *args, **kwargs): + """ + Post-ready hook: limit parallellism for selected builds, because they require a lot of memory per used core. + """ + # 'parallel' easyconfig parameter is set via EasyBlock.set_parallel in ready step based on available cores. + # here we reduce parallellism to only use half of that for selected software, + # to avoid failing builds/tests due to out-of-memory problems + if self.name in ['TensorFlow']: + parallel = self.cfg['parallel'] + if parallel > 1: + self.cfg['parallel'] = parallel // 2 + msg = "limiting parallelism to %s (was %s) for %s to avoid out-of-memory failures during building/testing" + print_msg(msg % (self.cfg['parallel'], parallel, self.name), log=self.log) + + def pre_prepare_hook(self, *args, **kwargs): """Main pre-prepare hook: trigger custom functions."""