-
Notifications
You must be signed in to change notification settings - Fork 25
Move supported toplevel toolchains from eb_hooks.py into a separate JSON for easier define-once-and-reuse #312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,31 +67,32 @@ | |
|
|
||
| STACK_REPROD_SUBDIR = 'reprod' | ||
|
|
||
| EESSI_SUPPORTED_TOP_LEVEL_TOOLCHAINS = { | ||
| '2023.06': [ | ||
| {'name': 'foss', 'version': '2022b'}, | ||
| {'name': 'foss', 'version': '2023a'}, | ||
| {'name': 'foss', 'version': '2023b'}, | ||
| ], | ||
| '2025.06': [ | ||
| {'name': 'foss', 'version': '2024a'}, | ||
| {'name': 'foss', 'version': '2025a'}, | ||
| {'name': 'foss', 'version': '2025b'}, | ||
| ], | ||
| '2026.06': [ | ||
| {'name': 'foss', 'version': '2026.1'}, | ||
| {'name': 'lfoss', 'version': '2026.1'}, | ||
| ], | ||
| } | ||
| if EASYBUILD_VERSION >= '5.2.0': | ||
| EESSI_SUPPORTED_TOP_LEVEL_TOOLCHAINS['2025.06'].append( | ||
| {'name': 'lfoss', 'version': '2025b'} | ||
| ) | ||
|
|
||
| if EASYBUILD_VERSION >= '5.3.1': | ||
| EESSI_SUPPORTED_TOP_LEVEL_TOOLCHAINS['2025.06'].append( | ||
| {'name': 'rompi', 'version': '2025a'} | ||
| ) | ||
| def load_supported_top_level_toolchains(): | ||
| """ | ||
| Load the supported top-level toolchains per EESSI version from eessi_supported_toolchains.json, | ||
| which is located next to this hooks file (both in the software-layer-scripts repository, and when installed | ||
| in <EESSI prefix>/init/easybuild). Toolchains that require a more recent EasyBuild version than the one | ||
| being used (as specified via 'min_easybuild_version') are left out. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe add |
||
| """ | ||
| toolchains_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'eessi_supported_toolchains.json') | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about specifying the location via an environment variable? Inferring the location from the location of |
||
| try: | ||
| with open(toolchains_file) as fh: | ||
| toolchains = json.load(fh) | ||
| except (OSError, ValueError) as err: | ||
| raise EasyBuildError(f"Failed to load supported toolchains from {toolchains_file} " | ||
| f"(it is expected to be located next to the EasyBuild hooks file): {err}") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe the text in parantheses is a little speculative as you also show this for |
||
|
|
||
| return { | ||
| eessi_version: [ | ||
| {'name': tc['name'], 'version': tc['version']} for tc in tcs | ||
| if EASYBUILD_VERSION >= tc.get('min_easybuild_version', '0') | ||
| ] | ||
| for eessi_version, tcs in toolchains.items() | ||
| } | ||
|
|
||
|
|
||
| EESSI_SUPPORTED_TOP_LEVEL_TOOLCHAINS = load_supported_top_level_toolchains() | ||
|
|
||
| # Supported compute capabilities by CUDA toolkit version | ||
| # Obtained by installing all CUDAs from 12.0.0 to 13.3.0, then using: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "2023.06": [ | ||
| {"name": "foss", "version": "2022b"}, | ||
| {"name": "foss", "version": "2023a"}, | ||
| {"name": "foss", "version": "2023b"} | ||
| ], | ||
| "2025.06": [ | ||
| {"name": "foss", "version": "2024a"}, | ||
| {"name": "foss", "version": "2025a"}, | ||
| {"name": "foss", "version": "2025b"}, | ||
| {"name": "lfoss", "version": "2025b", "min_easybuild_version": "5.2.0"}, | ||
| {"name": "rompi", "version": "2025a", "min_easybuild_version": "5.3.1"} | ||
| ], | ||
| "2026.06": [ | ||
| {"name": "foss", "version": "2026.1"}, | ||
| {"name": "lfoss", "version": "2026.1"} | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -225,6 +225,7 @@ fi | |
| # Copy over EasyBuild hooks file used for installations | ||
| hook_files=( | ||
| eb_hooks.py | ||
| eessi_supported_toolchains.json | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does it belong here?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe it could be here, but then the name |
||
| ) | ||
| copy_files_by_list ${TOPDIR} ${INSTALL_PREFIX}/init/easybuild "${hook_files[@]}" | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Essentially the same as the check for eb_hooks.py? If so could we use another matrix variable for the files to be checked?