diff --git a/lib/spack/spack/cmd/external.py b/lib/spack/spack/cmd/external.py index d859ad9d7a..6c794a70f2 100644 --- a/lib/spack/spack/cmd/external.py +++ b/lib/spack/spack/cmd/external.py @@ -79,6 +79,12 @@ def setup_parser(subparser): read_cray_manifest.add_argument( "--directory", default=None, help="specify a directory storing a group of manifest files" ) + read_cray_manifest.add_argument( + "--ignore-default-dir", + action="store_true", + default=False, + help="ignore the default directory of manifest files", + ) read_cray_manifest.add_argument( "--dry-run", action="store_true", @@ -177,11 +183,16 @@ def external_read_cray_manifest(args): manifest_directory=args.directory, dry_run=args.dry_run, fail_on_error=args.fail_on_error, + ignore_default_dir=args.ignore_default_dir, ) def _collect_and_consume_cray_manifest_files( - manifest_file=None, manifest_directory=None, dry_run=False, fail_on_error=False + manifest_file=None, + manifest_directory=None, + dry_run=False, + fail_on_error=False, + ignore_default_dir=False, ): manifest_files = [] if manifest_file: @@ -191,7 +202,7 @@ def _collect_and_consume_cray_manifest_files( if manifest_directory: manifest_dirs.append(manifest_directory) - if os.path.isdir(cray_manifest.default_path): + if not ignore_default_dir and os.path.isdir(cray_manifest.default_path): tty.debug( "Cray manifest path {0} exists: collecting all files to read.".format( cray_manifest.default_path diff --git a/lib/spack/spack/cray_manifest.py b/lib/spack/spack/cray_manifest.py index 4fdbc095e5..13a7fc43f0 100644 --- a/lib/spack/spack/cray_manifest.py +++ b/lib/spack/spack/cray_manifest.py @@ -48,7 +48,8 @@ def translated_compiler_name(manifest_compiler_name): def compiler_from_entry(entry): compiler_name = translated_compiler_name(entry["name"]) paths = entry["executables"] - version = entry["version"] + # to instantiate a compiler class we may need a concrete version: + version = "={}".format(entry["version"]) arch = entry["arch"] operating_system = arch["os"] target = arch["target"] diff --git a/lib/spack/spack/platforms/cray.py b/lib/spack/spack/platforms/cray.py index 3d88285f70..10294676ec 100644 --- a/lib/spack/spack/platforms/cray.py +++ b/lib/spack/spack/platforms/cray.py @@ -37,7 +37,9 @@ def slingshot_network(): - return os.path.exists("/opt/cray/pe") and os.path.exists("/lib64/libcxi.so") + return os.path.exists("/opt/cray/pe") and ( + os.path.exists("/lib64/libcxi.so") or os.path.exists("/usr/lib64/libcxi.so") + ) def _target_name_from_craype_target_name(name): diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index 1644cffe6f..b06d468aad 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -1060,7 +1060,7 @@ _spack_external_list() { } _spack_external_read_cray_manifest() { - SPACK_COMPREPLY="-h --help --file --directory --dry-run --fail-on-error" + SPACK_COMPREPLY="-h --help --file --directory --ignore-default-dir --dry-run --fail-on-error" } _spack_fetch() {