Skip to content

host detection script is broken due to changes in archspec 0.1.3 #142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
boegel opened this issue Oct 28, 2021 · 7 comments · Fixed by #159
Open

host detection script is broken due to changes in archspec 0.1.3 #142

boegel opened this issue Oct 28, 2021 · 7 comments · Fixed by #159
Labels
bug Something isn't working

Comments

@boegel
Copy link
Contributor

boegel commented Oct 28, 2021

The archspec.cpu.host function was changed in archspec 0.1.3 (see archspec/archspec#53) to return the best matching generic CPU microarchitecture level if there's no exact match.

These levels are values like x86-64-v4, and have a 'generic' value for vendor, see https://github.com/archspec/archspec-json/pull/31/files.

This causes trouble where we expect to find an actual vendor string like GenuineIntel (which we map to intel) or AuthenticAMD (which we map to amd), for example in det_host_triple in init/eessi_software_subdir_for_host.py or in eessi_software_subdir_for_host.py.

@boegel boegel added the bug Something isn't working label Oct 28, 2021
@boegel
Copy link
Contributor Author

boegel commented Oct 28, 2021

The best way forward here is probably to add support in the archspec API to allow requesting to archspec.cpu.host to return a non-generic microarchitecture level?

@Senui
Copy link

Senui commented Oct 28, 2021

The generic value for vendor was already a thing in archspec 0.1.2: #112

Currently, a generic return value ends up in crashing the EESSI initialization script.

@alalazo
Copy link

alalazo commented Oct 28, 2021

If you just need the vendor, one option is to use:

info = raw_info_dictionary()

directly.

@boegel
Copy link
Contributor Author

boegel commented Oct 28, 2021

@Senui You're right, but that's a different issue I think (and much easier to fix in the EESSI init scripts)

@alalazo I think the issue is broader than just the vendor part. We'd still end up with something like x86_64/amd/x86_64_v4 then.
What we really want/need is opting out of the generic microarchitecture levels entirely, I think...

@alalazo
Copy link

alalazo commented Oct 28, 2021

Then you can:

info = raw_info_dictionary()
candidates = compatible_microarchitectures(info)

You'll get a list of compatible targets and you can discard the generic ones.

@boegel
Copy link
Contributor Author

boegel commented Dec 16, 2021

@alalazo We also want to get the best non-generic compatible target though, which means we'll need to duplicate basically the whole host function and customize it to totally ignore the generic ones.

Wouldn't it make sense to implement support in archspec for host(generic=False), so you can opt-in to totally ignore the generic targets?

boegel added a commit to boegel/software-layer that referenced this issue Dec 16, 2021
boegel added a commit to boegel/software-layer that referenced this issue Dec 16, 2021
boegel added a commit to boegel/software-layer that referenced this issue Dec 16, 2021
boegel added a commit to boegel/software-layer that referenced this issue Dec 16, 2021
Repository owner moved this from Todo software layer to Done in EESSI pilot 2021.12 Dec 16, 2021
@boegel
Copy link
Contributor Author

boegel commented Dec 17, 2021

Although this is fixed in #159, I'm going to re-open this, since I feel we should come up with a cleaner way...

@boegel boegel reopened this Dec 17, 2021
trz42 pushed a commit to trz42/software-layer that referenced this issue Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants