summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Scheibel <scheibel1@llnl.gov>2022-06-16 13:16:48 -0700
committerMassimiliano Culpo <massimiliano.culpo@gmail.com>2022-07-20 08:10:41 +0200
commit60d9e125943e86cba28ea78e88b1b360807b3c7c (patch)
tree920e717c3fb8aa3ad6d6b220b11c600298653b8b
parentc4e492202d8875036d9f14a214c5c2e61c3e16dd (diff)
downloadspack-60d9e125943e86cba28ea78e88b1b360807b3c7c.tar.gz
spack-60d9e125943e86cba28ea78e88b1b360807b3c7c.tar.bz2
spack-60d9e125943e86cba28ea78e88b1b360807b3c7c.tar.xz
spack-60d9e125943e86cba28ea78e88b1b360807b3c7c.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.py6
-rw-r--r--lib/spack/spack/cray_manifest.py1
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/spack/spack/cmd/external.py b/lib/spack/spack/cmd/external.py
index 8b9c845c3e..11f5092626 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',
}