Skip to content

CI issues for Archspec release 0.2.3 #483

Description

@ocaisa

Release 0.2.3 of archspec causes a failure in our CI:

Traceback (most recent call last):
  File "./eessi_software_subdir.py", line 7, in <module>
    from archspec.cpu.detect import compatible_microarchitectures, raw_info_dictionary
ImportError: cannot import name 'raw_info_dictionary' from 'archspec.cpu.detect' (/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/archspec/cpu/detect.py)

This is because raw_info_dictionary has been replaced with a better alternative in archspec. @alalazo suggested the replacement

from archspec.cpu import host


VENDOR_MAP = {
    'GenuineIntel': 'intel',
    'AuthenticAMD': 'amd',
}


def det_host_triple():
    """                                                                                                                                                                                                                                                                          
    Determine host triple: (<cpu_family>, <cpu_vendor>, <cpu_name>).                                                                                                                                                                                                             
    <cpu_vendor> may be None if there's no match in VENDOR_MAP.                                                                                                                                                                                                                  
    """
    host_cpu = host()
    host_vendor = VENDOR_MAP.get(host_cpu.vendor)
    host_cpu_family = host_cpu.family.name
    host_cpu_name = host_cpu.name
    return host_cpu_family, host_vendor, host_cpu_name

which should work with old and new archspec.

When looking into the replacement I noticed we have very overlapping code in https://github.com/EESSI/software-layer/blob/2023.06-software.eessi.io/init/eessi_software_subdir_for_host.py and https://github.com/EESSI/software-layer/blob/2023.06-software.eessi.io/eessi_software_subdir.py and I suspect that latter should be removed/replaced.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions