From 18f3672ac2f428786262ca1e952db3e9071c2887 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Fri, 7 Jun 2024 22:16:57 +0200 Subject: [PATCH] don't raise Error on non-aarch64/generic --- eb_hooks.py | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/eb_hooks.py b/eb_hooks.py index eaa3e5327e..6e2af1e3fb 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -317,18 +317,21 @@ def parse_hook_sentencepiece_disable_tcmalloc_aarch64(ec, eprefix): Disable using TCMalloc """ cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR') - if ec.name == 'SentencePiece' and ec.version in ['0.2.0'] and cpu_target == CPU_TARGET_AARCH64_GENERIC: - print_msg("parse_hook for SentencePiece: OLD '%s'", ec['components']) - new_components = [] - for item in ec['components']: - if item[2]['easyblock'] == 'CMakeMake': - new_item = item[2] - new_item['configopts'] = '-DSPM_ENABLE_TCMALLOC=OFF' - new_components.append((item[0], item[1], new_item)) - else: - new_components.append(item) - ec['components'] = new_components - print_msg("parse_hook for SentencePiece: NEW '%s'", ec['components']) + if ec.name == 'SentencePiece' and ec.version in ['0.2.0']: + if cpu_target == CPU_TARGET_AARCH64_GENERIC: + print_msg("parse_hook for SentencePiece: OLD '%s'", ec['components']) + new_components = [] + for item in ec['components']: + if item[2]['easyblock'] == 'CMakeMake': + new_item = item[2] + new_item['configopts'] = '-DSPM_ENABLE_TCMALLOC=OFF' + new_components.append((item[0], item[1], new_item)) + else: + new_components.append(item) + ec['components'] = new_components + print_msg("parse_hook for SentencePiece: NEW '%s'", ec['components']) + else: + print_msg("parse_hook for SentencePiece on %s -> leaving configopts unchanged", cpu_target) else: raise EasyBuildError("SentencePiece-specific hook triggered for non-SentencePiece easyconfig?!")