summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSeth R. Johnson <johnsonsr@ornl.gov>2020-01-24 09:19:05 -0500
committerMassimiliano Culpo <massimiliano.culpo@gmail.com>2020-01-24 15:19:05 +0100
commitca6e75c9f678ecf603354531cfec68ab4a121def (patch)
treec6a52eac37b1cf762d7dacd5a2cdf8ff467044b0 /lib
parentb0fce56d5b491a9888ad55ed7251892f128af1ac (diff)
downloadspack-ca6e75c9f678ecf603354531cfec68ab4a121def.tar.gz
spack-ca6e75c9f678ecf603354531cfec68ab4a121def.tar.bz2
spack-ca6e75c9f678ecf603354531cfec68ab4a121def.tar.xz
spack-ca6e75c9f678ecf603354531cfec68ab4a121def.zip
Use Spack target architecture to determine OpenBLAS target (#14380)
Openblas target is now determined automatically upon inspection of `TargetList.txt`. If the spack target is a generic architecture family (like x86_64 or aarch64) the DYNAMIC_ARCH setting is used instead of targeting a specific microarchitecture.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/test/llnl/util/cpu.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/spack/spack/test/llnl/util/cpu.py b/lib/spack/spack/test/llnl/util/cpu.py
index bcefcc04f0..300ee3c284 100644
--- a/lib/spack/spack/test/llnl/util/cpu.py
+++ b/lib/spack/spack/test/llnl/util/cpu.py
@@ -278,3 +278,14 @@ def test_version_components(version, expected_number, expected_suffix):
number, suffix = llnl.util.cpu.version_components(version)
assert number == expected_number
assert suffix == expected_suffix
+
+
+def test_invalid_family():
+ targets = llnl.util.cpu.targets
+ multi_parents = Microarchitecture(
+ name='chimera', parents=[targets['pentium4'], targets['power7']],
+ vendor='Imagination', features=[], compilers={}, generation=0
+ )
+ with pytest.raises(AssertionError,
+ matches='a target is expected to belong'):
+ multi_parents.family