Skip to content

Commit a53a93e

Browse files
committed
manually define subdir per toolchain generation
1 parent d58e677 commit a53a93e

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

src/build_tools/hooks_hydra.py

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,17 @@
6767
LOCAL_ARCH_SUFFIX = os.getenv('VSC_ARCH_SUFFIX')
6868
LOCAL_ARCH_FULL = f'{LOCAL_ARCH}{LOCAL_ARCH_SUFFIX}'
6969

70-
VALID_TCGENS = ['2024a', '25.1']
71-
VALID_MODULES_SUBDIRS = VALID_TCGENS + ['system']
72-
VALID_TCS = ['foss', 'intel', 'gomkl', 'gimkl', 'gimpi', 'nvidia-compilers', 'NVHPC']
70+
VALID_TOOLCHAINS = {
71+
'2024a': {
72+
'toolchains': ['foss', 'intel', 'gomkl', 'gimkl', 'gimpi'],
73+
'subdir': '2024a',
74+
},
75+
'25.1': {
76+
'toolchains': ['nvidia-compilers', 'NVHPC'],
77+
'subdir': '2024a',
78+
},
79+
}
80+
VALID_MODULES_SUBDIRS = ['system', '2024a']
7381

7482
SUBDIR_MODULES_BWRAP = '.modules_bwrap'
7583
SUFFIX_MODULES_PATH = 'collection'
@@ -118,14 +126,18 @@ def get_tc_versions():
118126
update_build_option('hooks', None)
119127

120128
tc_versions = {}
121-
for toolcgen in VALID_TCGENS:
122-
tc_versions[toolcgen] = []
123-
for toolc in VALID_TCS:
129+
for tcgen, tcgen_spec in VALID_TOOLCHAINS.items():
130+
tcgen_versions = []
131+
for tc_name in tcgen_spec['toolchains']:
124132
try:
125-
tc_versions[toolcgen].extend(get_toolchain_hierarchy({'name': toolc, 'version': toolcgen}))
133+
tcgen_versions.extend(get_toolchain_hierarchy({'name': tc_name, 'version': tcgen}))
126134
except EasyBuildError:
127135
# skip if no easyconfig found for toolchain-version
128136
pass
137+
tc_versions[tcgen] = {
138+
'toolchains': tcgen_versions,
139+
'subdir': tcgen_spec['subdir'],
140+
}
129141

130142
update_build_option('hooks', hooks)
131143
return tc_versions

0 commit comments

Comments
 (0)