cray: fix parsing of module list (#23566)

The code for guessing cpu archtype based on craype modules names got confused,
at least on LLNL RZ prototype systems.  In particular a (L) or (D) at the end of a craype-x86-xxx or other
cpu architecture module was geting the logic confused.

With this patch, any white space + remaining characters in the moduel name are removed.

Signed-off-by: Howard Pritchard <howardp@lanl.gov>
This commit is contained in:
Howard Pritchard 2021-05-11 12:16:09 -06:00 committed by GitHub
parent 0368f8ae51
commit f055a48445
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,6 +169,7 @@ def target_names_from_modules(modules):
for mod in modules: for mod in modules:
if 'craype-' in mod: if 'craype-' in mod:
name = mod[7:] name = mod[7:]
name = name.split()[0]
_n = name.replace('-', '_') # test for mic-knl/mic_knl _n = name.replace('-', '_') # test for mic-knl/mic_knl
is_target_name = (name in archspec.cpu.TARGETS or is_target_name = (name in archspec.cpu.TARGETS or
_n in archspec.cpu.TARGETS) _n in archspec.cpu.TARGETS)