diff --git a/Custom_Hooks/eb_hooks.py b/Custom_Hooks/eb_hooks.py index 57130bb1393af4497f66feeb8aaf19c25d85f62f..c4445b756d209854547343aa93296c97e9d42731 100644 --- a/Custom_Hooks/eb_hooks.py +++ b/Custom_Hooks/eb_hooks.py @@ -72,14 +72,14 @@ VETOED_INSTALLATIONS = { TWEAKABLE_DEPENDENCIES = { 'UCX': 'default', - 'CUDA': '11.5', - 'Mesa': ('OpenGL', '2021b'), - 'libglvnd': ('OpenGL', '2021b'), - 'libxc': '5.1.7', - 'glu': ('OpenGL', '2021b'), - 'glew': ('OpenGL', '2021b'), - 'Boost': '1.78.0', - 'Boost.Python': '1.78.0', + #'CUDA': '11.5', + 'Mesa': ('OpenGL', '2022a'), + 'libglvnd': ('OpenGL', '2022a'), + #'libxc': '5.1.7', + 'glu': ('OpenGL', '2022a'), + 'glew': ('OpenGL', '2022a'), + #'Boost': '1.78.0', + #'Boost.Python': '1.78.0', } SIDECOMPILERS = ['AOCC', 'Clang'] @@ -233,6 +233,12 @@ def parse_hook(ec, *args, **kwargs): # Process UCX options ec = inject_ucx_tweaks(ec) + # Process Perl module + ec = inject_perl_tweaks(ec) + + # Process Python module + ec = inject_python_tweaks(ec) + # Change module name if applicable ec = inject_modaltsoftname(ec) @@ -484,6 +490,48 @@ def inject_compiler_tweaks(ec): return ec +def inject_perl_tweaks(ec): + # Perl require to load Perl-JSC-extra + ec_dict = ec.asdict() + if ec.name in 'Perl' and install_path().lower().startswith('/p/software'): + key = "modluafooter" + value = ''' +if mode()=="load" then + try_load("Perl-JSC-extra") +end + ''' + if key in ec_dict: + if not value in ec_dict[key]: + ec[key] = "\n".join([ec[key], value]) + else: + ec[key] = value + ec.log.info( + "[parse hook] Injecting Perl-JSC-extra loading") + + return ec + + +def inject_python_tweaks(ec): + # Python require to load Python-JSC-extra + ec_dict = ec.asdict() + if ec.name in 'Python' and install_path().lower().startswith('/p/software'): + key = "modluafooter" + value = ''' +if mode()=="load" then + try_load("Python-JSC-extra") +end + ''' + if key in ec_dict: + if not value in ec_dict[key]: + ec[key] = "\n".join([ec[key], value]) + else: + ec[key] = value + ec.log.info( + "[parse hook] Injecting Python-JSC-extra loading") + + return ec + + def pre_ready_hook(self, *args, **kwargs): "When we are building something, do some checks for bad behaviour" ec = self.cfg