diff --git a/.github/workflows/tests_archdetect.yml b/.github/workflows/tests_archdetect.yml index f5b42b3d55..860efb57d4 100644 --- a/.github/workflows/tests_archdetect.yml +++ b/.github/workflows/tests_archdetect.yml @@ -18,6 +18,7 @@ jobs: - x86_64/amd/zen3/Azure-CentOS7-7V73X - x86_64/amd/zen4/Azure-Alma8-9V33X - x86_64/amd/zen4/Shinx-RHEL8-9654 + - aarch64/a64fx/Deucalion-Rocky85 - aarch64/neoverse_n1/Azure-Ubuntu20-Altra - aarch64/neoverse_n1/AWS-awslinux-graviton2 - aarch64/neoverse_v1/AWS-awslinux-graviton3 diff --git a/init/arch_specs/eessi_arch_arm.spec b/init/arch_specs/eessi_arch_arm.spec index 8c1bc34d20..c0d74bd4ad 100755 --- a/init/arch_specs/eessi_arch_arm.spec +++ b/init/arch_specs/eessi_arch_arm.spec @@ -1,6 +1,9 @@ # ARM CPU architecture specifications (see https://gpages.juszkiewicz.com.pl/arm-socs-table/arm-socs.html for guidance) -# Software path in EESSI | Vendor ID | List of defining CPU features +# CPU implementers: 0x41 (ARM), 0x46 (Fujitsu) - also see https://github.com/hrw/arm-socs-table/blob/main/data/socs.yml + +# Software path in EESSI | 'Vendor ID' or 'CPU implementer' | List of defining CPU features +"aarch64/a64fx" "0x46" "asimdhp sve" # Fujitsu A64FX "aarch64/neoverse_n1" "ARM" "asimddp" # Ampere Altra -"aarch64/neoverse_n1" "" "asimddp" # AWS Graviton2 +"aarch64/neoverse_n1" "0x41" "asimddp" # AWS Graviton2 "aarch64/neoverse_v1" "ARM" "asimddp svei8mm" -"aarch64/neoverse_v1" "" "asimddp svei8mm" # AWS Graviton3 +"aarch64/neoverse_v1" "0x41" "asimddp svei8mm" # AWS Graviton3 diff --git a/init/eessi_archdetect.sh b/init/eessi_archdetect.sh index 2b1534ce62..4fd979cea5 100755 --- a/init/eessi_archdetect.sh +++ b/init/eessi_archdetect.sh @@ -111,16 +111,27 @@ cpupath(){ update_arch_specs "$base_dir/arch_specs/${spec_file}" # Identify the host CPU vendor - local cpu_vendor_tag="vendor[ _]id" - local cpu_vendor=$(get_cpuinfo "$cpu_vendor_tag") + local cpu_vendor=$(get_cpuinfo "vendor[ _]id") + if [ "${cpu_vendor}" == "" ]; then + cpu_vendor=$(get_cpuinfo "cpu[ _]implementer") + fi log "DEBUG" "cpupath: CPU vendor of host system: '$cpu_vendor'" # Identify the host CPU flags or features - local cpu_flag_tag='flags' # cpuinfo systems print different line identifiers, eg features, instead of flags - [ "${cpu_vendor}" == "ARM" ] && cpu_flag_tag='flags' - [ "${machine_type}" == "aarch64" ] && [ "${cpu_vendor}x" == "x" ] && cpu_flag_tag='features' - [ "${machine_type}" == "ppc64le" ] && cpu_flag_tag='cpu' + local cpu_flag_tag; + if [ "${cpu_vendor}" == "ARM" ]; then + # if CPU vendor field is ARM, then we should be able to determine CPU microarchitecture based on 'flags' field + cpu_flag_tag='flags' + # if 64-bit Arm CPU without "ARM" as vendor ID, we need to take into account 'features' field + elif [ "${machine_type}" == "aarch64" ]; then + cpu_flag_tag='features' + # on 64-bit POWER, we need to look at 'cpu' field + elif [ "${machine_type}" == "ppc64le" ]; then + cpu_flag_tag='cpu' + else + cpu_flag_tag='flags' + fi local cpu_flags=$(get_cpuinfo "$cpu_flag_tag") log "DEBUG" "cpupath: CPU flags of host system: '$cpu_flags'" diff --git a/tests/archdetect/aarch64/a64fx/Deucalion-Rocky85.all.output b/tests/archdetect/aarch64/a64fx/Deucalion-Rocky85.all.output new file mode 100644 index 0000000000..f6f97c2aaa --- /dev/null +++ b/tests/archdetect/aarch64/a64fx/Deucalion-Rocky85.all.output @@ -0,0 +1 @@ +aarch64/a64fx:aarch64/generic diff --git a/tests/archdetect/aarch64/a64fx/Deucalion-Rocky85.cpuinfo b/tests/archdetect/aarch64/a64fx/Deucalion-Rocky85.cpuinfo new file mode 100644 index 0000000000..2484dbe3e7 --- /dev/null +++ b/tests/archdetect/aarch64/a64fx/Deucalion-Rocky85.cpuinfo @@ -0,0 +1,8 @@ +processor : 0 +BogoMIPS : 200.00 +Features : fp asimd evtstrm sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm fcma dcpop sve +CPU implementer : 0x46 +CPU architecture: 8 +CPU variant : 0x1 +CPU part : 0x001 +CPU revision : 0 diff --git a/tests/archdetect/aarch64/a64fx/Deucalion-Rocky85.output b/tests/archdetect/aarch64/a64fx/Deucalion-Rocky85.output new file mode 100644 index 0000000000..13b6c575c1 --- /dev/null +++ b/tests/archdetect/aarch64/a64fx/Deucalion-Rocky85.output @@ -0,0 +1 @@ +aarch64/a64fx