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.
This commit is contained in:
Seth R. Johnson
2020-01-24 09:19:05 -05:00
committed by Massimiliano Culpo
parent b0fce56d5b
commit ca6e75c9f6
2 changed files with 92 additions and 51 deletions

View File

@@ -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