diff options
author | Peter Scheibel <scheibel1@llnl.gov> | 2022-06-16 13:16:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-16 15:16:48 -0500 |
commit | 392b5483122dd706ab4d3ab16ea0dc9b0c213bbe (patch) | |
tree | 908bc243be8fdce7ae32e99627f1d5f56bab454e | |
parent | 8c3b82c140a111ad37a92c47992ec704f6df65ff (diff) | |
download | spack-392b5483122dd706ab4d3ab16ea0dc9b0c213bbe.tar.gz spack-392b5483122dd706ab4d3ab16ea0dc9b0c213bbe.tar.bz2 spack-392b5483122dd706ab4d3ab16ea0dc9b0c213bbe.tar.xz spack-392b5483122dd706ab4d3ab16ea0dc9b0c213bbe.zip |
Manifest parsing: avoid irrelevant files (#31144)
* Manifest directory may not contain manifest files: exclude non-manifest files
* Manifest files use different name for rocmcc: add translation for it
-rw-r--r-- | lib/spack/spack/cmd/external.py | 6 | ||||
-rw-r--r-- | lib/spack/spack/cray_manifest.py | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/spack/spack/cmd/external.py b/lib/spack/spack/cmd/external.py index a307b5e1ef..98091530f1 100644 --- a/lib/spack/spack/cmd/external.py +++ b/lib/spack/spack/cmd/external.py @@ -177,7 +177,10 @@ def _collect_and_consume_cray_manifest_files( for directory in manifest_dirs: for fname in os.listdir(directory): - manifest_files.append(os.path.join(directory, fname)) + if fname.endswith('.json'): + fpath = os.path.join(directory, fname) + tty.debug("Adding manifest file: {0}".format(fpath)) + manifest_files.append(os.path.join(directory, fpath)) if not manifest_files: raise NoManifestFileError( @@ -185,6 +188,7 @@ def _collect_and_consume_cray_manifest_files( .format(cray_manifest.default_path)) for path in manifest_files: + tty.debug("Reading manifest file: " + path) try: cray_manifest.read(path, not dry_run) except (spack.compilers.UnknownCompilerError, spack.error.SpackError) as e: diff --git a/lib/spack/spack/cray_manifest.py b/lib/spack/spack/cray_manifest.py index b78888d258..eba29ed9dd 100644 --- a/lib/spack/spack/cray_manifest.py +++ b/lib/spack/spack/cray_manifest.py @@ -20,6 +20,7 @@ default_path = '/opt/cray/pe/cpe-descriptive-manifest/' compiler_name_translation = { 'nvidia': 'nvhpc', + 'rocm': 'rocmcc', } |