diff --git a/Custom_Hooks/eb_hooks.py b/Custom_Hooks/eb_hooks.py index a00a87516117553344d515c9625fd1bdcaba0de4..2fccb52686fc166b9713ccfa6c0e4546f88322cc 100644 --- a/Custom_Hooks/eb_hooks.py +++ b/Custom_Hooks/eb_hooks.py @@ -68,6 +68,8 @@ TWEAKABLE_DEPENDENCIES = { 'glew': ('OpenGL', '2021b'), } +SIDECOMPILERS = ['AOCC', 'Clang'] + common_site_contact = 'Support <sc@fz-juelich.de>' # Also maintain a list of CUDA enabled compilers @@ -228,6 +230,8 @@ def parse_hook(ec, *args, **kwargs): if os.getenv('CI') is None: ec = tweak_dependencies(ec) + ec = tweak_moduleclass(ec) + # If we are parsing we are not searching, in this case if the easyconfig is # located in the search path, warn that it's dependencies will (most probably) # not be resolved @@ -278,6 +282,12 @@ def tweak_dependencies(ec): return ec +def tweak_moduleclass(ec): + if ec['name'] in SIDECOMPILERS: + ec['moduleclass'] = 'sidecompiler' + + return ec + def inject_site_contact_and_user_labels(ec): ec_dict = ec.asdict() # Check where installations are going to go and add appropriate site contact diff --git a/Custom_MNS/flexible_custom_hierarchical_mns.py b/Custom_MNS/flexible_custom_hierarchical_mns.py index 0259dc2fe67c5573768c9c050f337a8b4b6dbee3..a75d4f9a33e49c132075f00767a7da1f54bfc9b1 100644 --- a/Custom_MNS/flexible_custom_hierarchical_mns.py +++ b/Custom_MNS/flexible_custom_hierarchical_mns.py @@ -23,6 +23,7 @@ COMM_SETTINGS = 'comm_settings' MODULECLASS_COMPILER = 'compiler' MODULECLASS_MPI = 'mpi' +MODULECLASS_SIDECOMPILER = 'sidecompiler' GCCCORE = 'GCCcore' @@ -185,6 +186,8 @@ class FlexibleCustomHierarchicalMNS(HierarchicalMNS): # but we want the mpi module class to stand alone if ec['moduleclass'] == MODULECLASS_MPI: subdir = os.path.join(COMPILER, MODULECLASS_MPI, tc_comp_name, tc_comp_ver) + elif ec['moduleclass'] == MODULECLASS_SIDECOMPILER: + subdir = os.path.join(COMPILER, MODULECLASS_SIDECOMPILER, tc_comp_name, tc_comp_ver) else: subdir = os.path.join(COMPILER, tc_comp_name, tc_comp_ver) else: @@ -254,6 +257,9 @@ class FlexibleCustomHierarchicalMNS(HierarchicalMNS): # Always extend to capture the MPI implementations too (which are in a separate directory) if ec['name'] not in [GCCCORE]: paths.append(os.path.join(COMPILER, MODULECLASS_MPI, *comp_name_ver)) + # Extend the MOODULEPATH to include the side compilers available in GCCcore + else: + paths.append(os.path.join(COMPILER, MODULECLASS_SIDECOMPILER, *comp_name_ver)) elif modclass == MODULECLASS_MPI: if tc_comp_info is None: