From ca6e75c9f678ecf603354531cfec68ab4a121def Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Fri, 24 Jan 2020 09:19:05 -0500 Subject: 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. --- lib/spack/spack/test/llnl/util/cpu.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib') 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 -- cgit v1.2.3-60-g2f50