From 0cb1d2af5ad9ad8f2ccdb7e9da9d2614c61781d0 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 25 Jun 2024 09:29:21 +0200 Subject: [PATCH 1/3] implement hook to inject -DCACHE_SECTOR_SIZE_READONLY in $CFLAGS when building BLIS 0.9.0 on A64FX --- eb_hooks.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/eb_hooks.py b/eb_hooks.py index 8b0a11b0ed..fd3e0830ee 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -23,6 +23,7 @@ CPU_TARGET_NEOVERSE_N1 = 'aarch64/neoverse_n1' CPU_TARGET_NEOVERSE_V1 = 'aarch64/neoverse_v1' CPU_TARGET_AARCH64_GENERIC = 'aarch64/generic' +CPU_TARGET_A64FX = 'aarch64/a64fx' EESSI_RPATH_OVERRIDE_ATTR = 'orig_rpath_override_dirs' @@ -335,6 +336,19 @@ def pre_configure_hook(self, *args, **kwargs): PRE_CONFIGURE_HOOKS[self.name](self, *args, **kwargs) +def pre_configure_hook_BLIS_a64fx(self, *args, **kwargs): + """ + Pre-configure hook for BLIS when building for A64FX: + - add -DCACHE_SECTOR_SIZE_READONLY to $CFLAGS for BLIS 0.9.0, cfr. https://github.com/flame/blis/issues/800 + """ + if self.name == 'BLIS': + cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR') + if self.version == '0.9.0' and cpu_target == CPU_TARGET_A64FX: + self.cfg.update('configopts', 'CFLAGS="$CFLAGS -DCACHE_SECTOR_SIZE_READONLY"') + else: + raise EasyBuildError("BLIS-specific hook triggered for non-BLIS easyconfig?!") + + def pre_configure_hook_gromacs(self, *args, **kwargs): """ Pre-configure hook for GROMACS: @@ -680,12 +694,13 @@ def inject_gpu_property(ec): } PRE_CONFIGURE_HOOKS = { + 'at-spi2-core': pre_configure_hook_atspi2core_filter_ld_library_path, + 'BLIS': pre_configure_hook_BLIS_a64fx, 'GROMACS': pre_configure_hook_gromacs, 'libfabric': pre_configure_hook_libfabric_disable_psm3_x86_64_generic, 'MetaBAT': pre_configure_hook_metabat_filtered_zlib_dep, 'OpenBLAS': pre_configure_hook_openblas_optarch_generic, 'WRF': pre_configure_hook_wrf_aarch64, - 'at-spi2-core': pre_configure_hook_atspi2core_filter_ld_library_path, } PRE_TEST_HOOKS = { From 3aac7ea854e8f4613ad89fc8e15e2ca26df0af6f Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 25 Jun 2024 09:29:38 +0200 Subject: [PATCH 2/3] {2023.06,a64fx} foss/2023a --- .../2023.06/a64fx/eessi-2023.06-eb-4.9.2-2023a.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/easystacks/software.eessi.io/2023.06/a64fx/eessi-2023.06-eb-4.9.2-2023a.yml b/easystacks/software.eessi.io/2023.06/a64fx/eessi-2023.06-eb-4.9.2-2023a.yml index 1475ad0866..3a060e30a7 100644 --- a/easystacks/software.eessi.io/2023.06/a64fx/eessi-2023.06-eb-4.9.2-2023a.yml +++ b/easystacks/software.eessi.io/2023.06/a64fx/eessi-2023.06-eb-4.9.2-2023a.yml @@ -1,2 +1,3 @@ easyconfigs: - OpenMPI-4.1.5-GCC-12.3.0.eb + - foss-2023a.eb From da1b6710152dcf912db34147e88c739914e0290d Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 25 Jun 2024 18:16:24 +0200 Subject: [PATCH 3/3] fix hook to tweak BLIS configure command when building for A64FX --- eb_hooks.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/eb_hooks.py b/eb_hooks.py index fd3e0830ee..b14c799eae 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -344,7 +344,12 @@ def pre_configure_hook_BLIS_a64fx(self, *args, **kwargs): if self.name == 'BLIS': cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR') if self.version == '0.9.0' and cpu_target == CPU_TARGET_A64FX: - self.cfg.update('configopts', 'CFLAGS="$CFLAGS -DCACHE_SECTOR_SIZE_READONLY"') + # last argument of BLIS' configure command is configuration target (usually 'auto' for auto-detect), + # specifying of variables should be done before that + config_opts = self.cfg['configopts'].split(' ') + cflags_var = 'CFLAGS="$CFLAGS -DCACHE_SECTOR_SIZE_READONLY"' + config_target = config_opts[-1] + self.cfg['configopts'] = ' '.join(config_opts[:-1] + [cflags_var, config_target]) else: raise EasyBuildError("BLIS-specific hook triggered for non-BLIS easyconfig?!")