For zen4 builds we are using a hook from the EESSI/software-layer:
def pre_configure_hook_LAMMPS_zen4(self, *args, **kwargs):
"""
pre-configure hook for LAMMPS:
- set kokkos_arch on x86_64/amd/zen4
"""
cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR')
if self.name == 'LAMMPS':
if self.version in ('2Aug2023_update2', '2Aug2023_update4', '29Aug2024'):
if get_cpu_architecture() == X86_64:
if cpu_target == CPU_TARGET_ZEN4:
# There is no support for ZEN4 in LAMMPS yet so falling back to ZEN3
self.cfg['kokkos_arch'] = 'ZEN3'
else:
raise EasyBuildError("LAMMPS-specific hook triggered for non-LAMMPS easyconfig?!")
This does a check of self.version. when using software-commit this value is set to the commit that was passed through the command or easystack. Because of this the necessary changes are not done for kokkos_arch
A possible way to resolve is to find out what the version is similarly as we do in the EasyBlock:
path = self.builddir
if os.path.exists(path) and os.listdir(path):
txt = read_file(os.path.join(path, 'src', 'version.h'))
result = re.search(r'(?<=LAMMPS_VERSION ")\d+ \S+ \d+', txt)
For zen4 builds we are using a hook from the EESSI/software-layer:
This does a check of
self.version. when usingsoftware-committhis value is set to the commit that was passed through the command or easystack. Because of this the necessary changes are not done forkokkos_archA possible way to resolve is to find out what the version is similarly as we do in the EasyBlock: