Skip to content
Snippets Groups Projects
Commit 21f21453 authored by Damian Alvarez's avatar Damian Alvarez
Browse files

Merge branch 'sidecompilers' into '2022'

To support installing AOCC and Clang as side compilers

See merge request hps-public/easybuild-repository!1043
parents 9c1d7f10 4c7f4bc7
Branches
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment