|
67 | 67 | LOCAL_ARCH_SUFFIX = os.getenv('VSC_ARCH_SUFFIX')
|
68 | 68 | LOCAL_ARCH_FULL = f'{LOCAL_ARCH}{LOCAL_ARCH_SUFFIX}'
|
69 | 69 |
|
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'] |
73 | 81 |
|
74 | 82 | SUBDIR_MODULES_BWRAP = '.modules_bwrap'
|
75 | 83 | SUFFIX_MODULES_PATH = 'collection'
|
@@ -118,14 +126,18 @@ def get_tc_versions():
|
118 | 126 | update_build_option('hooks', None)
|
119 | 127 |
|
120 | 128 | 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']: |
124 | 132 | 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})) |
126 | 134 | except EasyBuildError:
|
127 | 135 | # skip if no easyconfig found for toolchain-version
|
128 | 136 | pass
|
| 137 | + tc_versions[tcgen] = { |
| 138 | + 'toolchains': tcgen_versions, |
| 139 | + 'subdir': tcgen_spec['subdir'], |
| 140 | + } |
129 | 141 |
|
130 | 142 | update_build_option('hooks', hooks)
|
131 | 143 | return tc_versions
|
|
0 commit comments