diff --git a/docs/config_reference.rst b/docs/config_reference.rst index 6de312ea9b..2632e76833 100644 --- a/docs/config_reference.rst +++ b/docs/config_reference.rst @@ -1923,6 +1923,15 @@ A *processor info object* in ReFrame's configuration is used to hold information .. versionadded:: 4.6 +.. attribute:: systems.partitions.processor.platform + + :required: No + :default: ``None`` + + The hardware platform for this processor (e.g., ``x86_64``, ``arm64`` etc.) + + .. versionadded:: 4.6 + .. attribute:: systems.partitions.processor.num_cpus :required: No diff --git a/reframe/core/systems.py b/reframe/core/systems.py index f876a02539..49dd38167d 100644 --- a/reframe/core/systems.py +++ b/reframe/core/systems.py @@ -56,7 +56,7 @@ class ProcessorInfo(_ReadOnlyInfo, jsonext.JSONSerializable): __slots__ = () _known_attrs = ( - 'arch', 'model', 'num_cpus', 'num_cpus_per_core', + 'arch', 'model', 'platform', 'num_cpus', 'num_cpus_per_core', 'num_cpus_per_socket', 'num_sockets', 'topology' ) diff --git a/reframe/schemas/config.json b/reframe/schemas/config.json index 01f3b9e7ef..4eadc997da 100644 --- a/reframe/schemas/config.json +++ b/reframe/schemas/config.json @@ -220,6 +220,7 @@ "arch": {"type": "string"}, "vendor": {"type": "string"}, "model": {"type": "string"}, + "platform": {"type": "string"}, "num_cpus": {"type": "number"}, "num_cpus_per_core": {"type": "number"}, "num_cpus_per_socket": {"type": "number"}, diff --git a/reframe/utility/cpuinfo.py b/reframe/utility/cpuinfo.py index 4cf799e6f0..4f1e149d5e 100644 --- a/reframe/utility/cpuinfo.py +++ b/reframe/utility/cpuinfo.py @@ -7,6 +7,7 @@ import contextlib import glob import os +import platform import re import reframe.utility.osext as osext @@ -284,7 +285,8 @@ def cpuinfo(): 'arch': archspec.cpu.host().name, 'vendor': archspec.cpu.host().vendor, 'model': archspec.cpu.detect.raw_info_dictionary().get('model name', - 'N/A') + 'N/A'), + 'platform': platform.machine() } # Try first to get information from the filesystem diff --git a/unittests/resources/config/settings.py b/unittests/resources/config/settings.py index 72f19e45a7..39f63b5e28 100644 --- a/unittests/resources/config/settings.py +++ b/unittests/resources/config/settings.py @@ -76,6 +76,7 @@ def hostname(): 'processor': { 'arch': 'skylake', 'model': 'Intel Skylake', + 'platform': 'x86_64', 'num_cpus': 8, 'num_cpus_per_core': 2, 'num_cpus_per_socket': 8, diff --git a/unittests/test_config.py b/unittests/test_config.py index 6a89043b47..27c6f4e67f 100644 --- a/unittests/test_config.py +++ b/unittests/test_config.py @@ -466,6 +466,7 @@ def test_system_create(site_config): assert partition.processor.topology is not None assert partition.processor.arch == 'skylake' assert partition.processor.model == 'Intel Skylake' + assert partition.processor.platform == 'x86_64' assert partition.processor.num_cpus == 8 assert partition.processor.num_cpus_per_core == 2 assert partition.processor.num_cpus_per_socket == 8