Repository navigation
Remove checking for installations we know don't exist #31
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -142,42 +142,55 @@ def get_software_information_by_filename(file_metadata, original_path=None, tool | |
|
|
||
| # 3) Substitute each architecture and test module file existence in spider cache | ||
| for arch in architecture_group: | ||
| substituted_modulefile = modulefile.replace(detected_arch, arch) | ||
| substituted_spider_cache = spider_cache.replace(detected_arch, arch) | ||
| # os.path.exists is very expensive for CVMFS so we just look for the file in the spider cache (if we can) | ||
| if os.path.exists(substituted_spider_cache): | ||
| found = subprocess.run(["grep", "-q", substituted_modulefile, substituted_spider_cache]).returncode == 0 | ||
| else: | ||
| found = os.path.exists(substituted_modulefile) | ||
| if found: | ||
| base_version_dict["cpu_arch"].append(arch) | ||
| # If we have an accelerator module let's check which architectures are supported | ||
| if detected_accel_arch: | ||
| base_version_dict["gpu_arch"][arch] = [] | ||
| if detected_accel_arch in ROCM_ARCHITECTURES: | ||
| accel_architectures = ROCM_ARCHITECTURES | ||
| else: | ||
| accel_architectures = NVIDIA_ARCHITECTURES | ||
| for accel_arch in accel_architectures: | ||
| accel_substituted_modulefile = substituted_modulefile.replace(detected_accel_arch, accel_arch) | ||
| found = subprocess.run(["grep", "-q", accel_substituted_modulefile, substituted_spider_cache]).returncode == 0 | ||
| if found: | ||
| # Let's not include the "accel/" part of the accel_arch | ||
| base_version_dict["gpu_arch"][arch].append(accel_arch.replace("accel/", "", 1)) | ||
| # We check the arch under two conditions | ||
| # - the version attached is included CPU_ARCHITECTURE_OVERRIDES | ||
| # (which won't be the case for weird dev.eessi.io versions) | ||
| # - it doesn't appear in the overrides for that EESSI version | ||
| if arch not in CPU_ARCHITECTURE_OVERRIDES.get(path_eessi_version, {}): | ||
| substituted_modulefile = modulefile.replace(detected_arch, arch) | ||
| substituted_spider_cache = spider_cache.replace(detected_arch, arch) | ||
| # os.path.exists is very expensive for CVMFS so we just look for the file in the spider cache (if we can) | ||
| if os.path.exists(substituted_spider_cache): | ||
| found = subprocess.run(["grep", "-q", substituted_modulefile, substituted_spider_cache]).returncode == 0 | ||
| else: | ||
| found = os.path.exists(substituted_modulefile) | ||
| if found: | ||
| base_version_dict["cpu_arch"].append(arch) | ||
| # If we have an accelerator module let's check which architectures are supported | ||
| # (no accelerators for a64fx) | ||
| if detected_accel_arch and arch != 'aarch64/a64fx': | ||
| base_version_dict["gpu_arch"][arch] = [] | ||
| if detected_accel_arch in ROCM_ARCHITECTURES: | ||
| accel_architectures = ROCM_ARCHITECTURES | ||
| else: | ||
| # Let's not be too noisy here, we know we don't have some CUDA archs in 2023.06 | ||
| if not ( | ||
| accel_substituted_modulefile.startswith('/cvmfs/software.eessi.io/versions/2023.06') | ||
| and accel_arch in ["accel/nvidia/cc100", "accel/nvidia/cc120"] | ||
| ): | ||
| print( | ||
| f"No module {accel_substituted_modulefile}... " | ||
| f"not adding software for architecture {arch}/{accel_arch}" | ||
| ) | ||
| continue | ||
| else: | ||
| print(f"No module {substituted_modulefile}...not adding software for architecture {arch}") | ||
| continue | ||
| accel_architectures = NVIDIA_ARCHITECTURES | ||
| for accel_arch in accel_architectures: | ||
| accel_substituted_modulefile = substituted_modulefile.replace(detected_accel_arch, accel_arch) | ||
| found = subprocess.run(["grep", "-q", accel_substituted_modulefile, substituted_spider_cache]).returncode == 0 | ||
| if found: | ||
| # Let's not include the "accel/" part of the accel_arch | ||
| base_version_dict["gpu_arch"][arch].append(accel_arch.replace("accel/", "", 1)) | ||
| else: | ||
| # Let's not be too noisy here, we know we don't have some CUDA archs in 2023.06/2025.06 | ||
| if not ( | ||
| # Condition A: Original 2023.06 constraints | ||
| (path_eessi_version in ('2023.06') and accel_arch in ["accel/nvidia/cc100", "accel/nvidia/cc120"]) | ||
| # Condition B: No cc75 in 2023.06 or 2025.06 | ||
| or (path_eessi_version in ('2023.06', '2025.06') and accel_arch == "accel/nvidia/cc75") | ||
| ): | ||
| print( | ||
| f"No accelerator module {accel_substituted_modulefile}... " | ||
| f"not adding software for architecture {arch}/{accel_arch}" | ||
| ) | ||
| continue | ||
| else: | ||
| if not (detected_accel_arch and arch == 'aarch64/a64fx'): | ||
| print(f"No module {substituted_modulefile}...not adding software for architecture {arch}") | ||
| continue | ||
|
|
||
| # There should be _at least_ one CPU architecture (the original one) or there is a major problem | ||
| if len(base_version_dict["cpu_arch"]) == 0: | ||
| raise RuntimeError(f"List of CPU archs for {modulefile} is 0, that can't be right!") | ||
|
|
||
| # Now we can cycle throught the possibilities | ||
| # - software application itself | ||
|
|
@@ -438,7 +451,8 @@ def main(): | |
| is_dev_version = "-00" in eessi_version | ||
|
|
||
| if eessi_version in CPU_ARCHITECTURE_OVERRIDES: | ||
| base_json_metadata["architectures_map"][eessi_version] = CPU_ARCHITECTURE_OVERRIDES[eessi_version] | ||
| # CPU_ARCHITECTURE_OVERRIDES is a nested dict so we need a deepcopy | ||
| base_json_metadata["architectures_map"][eessi_version] = copy.deepcopy(CPU_ARCHITECTURE_OVERRIDES[eessi_version]) | ||
|
Member
Author
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. The lack of a |
||
| elif is_dev_version: | ||
| print(f"Not sanity checking EESSI version {eessi_version}, as it looks like a dev.eessi.io version") | ||
| base_json_metadata["architectures_map"][eessi_version] = {} | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This will at least error if you get zero CPU archs, that should not happen