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
This commit is contained in:
		| @@ -177,7 +177,10 @@ def _collect_and_consume_cray_manifest_files( | |||||||
| 
 | 
 | ||||||
|     for directory in manifest_dirs: |     for directory in manifest_dirs: | ||||||
|         for fname in os.listdir(directory): |         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: |     if not manifest_files: | ||||||
|         raise NoManifestFileError( |         raise NoManifestFileError( | ||||||
| @@ -185,6 +188,7 @@ def _collect_and_consume_cray_manifest_files( | |||||||
|             .format(cray_manifest.default_path)) |             .format(cray_manifest.default_path)) | ||||||
| 
 | 
 | ||||||
|     for path in manifest_files: |     for path in manifest_files: | ||||||
|  |         tty.debug("Reading manifest file: " + path) | ||||||
|         try: |         try: | ||||||
|             cray_manifest.read(path, not dry_run) |             cray_manifest.read(path, not dry_run) | ||||||
|         except (spack.compilers.UnknownCompilerError, spack.error.SpackError) as e: |         except (spack.compilers.UnknownCompilerError, spack.error.SpackError) as e: | ||||||
|   | |||||||
| @@ -20,6 +20,7 @@ | |||||||
| 
 | 
 | ||||||
| compiler_name_translation = { | compiler_name_translation = { | ||||||
|     'nvidia': 'nvhpc', |     'nvidia': 'nvhpc', | ||||||
|  |     'rocm': 'rocmcc', | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Peter Scheibel
					Peter Scheibel