Skip to content

Commit

Permalink
don't raise Error on non-aarch64/generic
Browse files Browse the repository at this point in the history
  • Loading branch information
truib committed Jun 7, 2024
1 parent 11d6992 commit 18f3672
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions eb_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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?!")

Expand Down

0 comments on commit 18f3672

Please sign in to comment.