Skip to content

Commit

Permalink
Merge pull request #18 from smoors/zen4
Browse files Browse the repository at this point in the history
add intel compiler flags for zen4
  • Loading branch information
wpoely86 authored Feb 23, 2024
2 parents 2fb91d6 + 5ddccd3 commit 1f352ad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions lib/vsc/eb_hooks/hooks_hydra.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,17 @@ def parse_hook(ec, *args, **kwargs): # pylint: disable=unused-argument

# set optarch for intel compilers on AMD nodes
local_arch = os.getenv('VSC_ARCH_LOCAL')
if local_arch in ['zen2', 'zen3'] and ec.toolchain.name in ['intel-compilers', 'iimpi', 'iimkl', 'intel']:
optarchs_intel = {
'zen2': 'march=core-avx2',
# common-avx512 gives test failure for scipy
# see https://github.com/easybuilders/easybuild-easyconfigs/pull/18875
'zen4': 'march=rocketlake',
}
if local_arch in optarchs_intel and ec.toolchain.name in ['intel-compilers', 'iimpi', 'iimkl', 'intel']:
optarch = ec.toolchain.options.get('optarch')
# only set if not set in the easyconfig or if set to default value (i.e. True)
if not optarch or optarch is True:
ec.toolchain.options['optarch'] = 'march=core-avx2'
ec.toolchain.options['optarch'] = optarchs_intel[local_arch]
ec.log.info(f"[parse hook] Set optarch in parameter toolchainopts: {ec.toolchain.options['optarch']}")


Expand Down Expand Up @@ -169,7 +175,7 @@ def pre_module_hook(self, *args, **kwargs): # pylint: disable=unused-argument
self.cfg.enable_templating = False

##########################
#------- MPI ------------#
# ------ MPI ----------- #
##########################

if self.name == 'OpenMPI':
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@


PACKAGE = {
'version': '1.3.2',
'version': '1.4.0',
'author': [ad, sm, wp],
'maintainer': [ad, sm, wp],
'setup_requires': [
Expand Down

0 comments on commit 1f352ad

Please sign in to comment.