Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/config_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion reframe/core/systems.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
)

Expand Down
1 change: 1 addition & 0 deletions reframe/schemas/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
4 changes: 3 additions & 1 deletion reframe/utility/cpuinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import contextlib
import glob
import os
import platform
import re

import reframe.utility.osext as osext
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions unittests/resources/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions unittests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down