Skip to content

Commit

Permalink
{2023.06}[foss/2023b] Extrae V4.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Top committed Jul 23, 2024
1 parent fba78de commit e39120b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@ easyconfigs:
options:
# see https://github.com/easybuilders/easybuild-easyconfigs/pull/20889
from-commit: c66c4788a17f7e4f55aa23f9fdb782aad97c9ce7
- Extrae-4.2.0-gompi-2023b.eb:
options:
# see https://github.com/easybuilders/easybuild-easyconfigs/pull/21017
from-commit: 120f4d56efebd2bc61382db4c84a664a339c66cf
# see https://github.com/easybuilders/easybuild-easyblocks/pull/3393
include-easyblocks-from-commit: c4951c78d62fa5cf8e9f6fe0ead212d2a4d7cb9c
32 changes: 32 additions & 0 deletions eb_hooks.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Hooks to customize how EasyBuild installs software in EESSI
# see https://docs.easybuild.io/en/latest/Hooks.html
import glob
import os
import re

Expand Down Expand Up @@ -466,6 +467,36 @@ def pre_configure_hook_gobject_introspection(self, *args, **kwargs):
raise EasyBuildError("GObject-Introspection-specific hook triggered for non-GObject-Introspection easyconfig?!")


def pre_configure_hook_extrae(self, *args, **kwargs):
"""
Pre-configure hook for Extrae
- avoid use of 'which' in configure script
- specify correct path to binutils/zlib (in compat layer)
"""
if self.name == 'Extrae':

# determine path to Prefix installation in compat layer via $EPREFIX
eprefix = get_eessi_envvar('EPREFIX')

binutils_lib_path_glob_pattern = os.path.join(eprefix, 'usr', 'lib*', 'binutils', '*-linux-gnu', '2.*')
binutils_lib_path = glob.glob(binutils_lib_path_glob_pattern)
if len(binutils_lib_path) == 1:
self.cfg.update('configopts', '--with-binutils=' + binutils_lib_path[0])
else:
raise EasyBuildError("Failed to isolate path for binutils libraries using %s, got %s",
binutils_lib_path_glob_pattern, binutils_lib_path)

# zlib is a filtered dependency, so we need to manually specify it's location to avoid the host version
self.cfg.update('configopts', '--with-libz=' + eprefix)

# replace use of 'which' with 'command -v', since 'which' is broken in EESSI build container;
# this must be done *after* running configure script, because initial configuration re-writes configure script,
# and problem due to use of which only pops up when running make ?!
self.cfg.update('prebuildopts', "cp config/mpi-macros.m4 config/mpi-macros.m4.orig && sed -i 's/`which /`command -v /g' config/mpi-macros.m4 && ")
else:
raise EasyBuildError("Extrae-specific hook triggered for non-Extrae easyconfig?!")


def pre_configure_hook_gromacs(self, *args, **kwargs):
"""
Pre-configure hook for GROMACS:
Expand Down Expand Up @@ -969,6 +1000,7 @@ def pre_module_hook_librosa_augment_modluafooter(self, *args, **kwargs):
}

PRE_CONFIGURE_HOOKS = {
'Extrae': pre_configure_hook_extrae,
'GObject-Introspection': pre_configure_hook_gobject_introspection,
'GROMACS': pre_configure_hook_gromacs,
'libfabric': pre_configure_hook_libfabric_disable_psm3_x86_64_generic,
Expand Down

0 comments on commit e39120b

Please sign in to comment.