From 3629fa61c3ee446f4e3775e2b8e554012a50da0e Mon Sep 17 00:00:00 2001 From: Jack Morrison Date: Sat, 3 Feb 2024 22:14:03 -0800 Subject: [PATCH 1/2] Add CPU vendor and model name to topology files via Archspec --- reframe/schemas/config.json | 2 ++ reframe/utility/cpuinfo.py | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/reframe/schemas/config.json b/reframe/schemas/config.json index 32ebe56e40..f487212829 100644 --- a/reframe/schemas/config.json +++ b/reframe/schemas/config.json @@ -218,6 +218,8 @@ "type": "object", "properties": { "arch": {"type": "string"}, + "vendor": {"type": "string"}, + "model": {"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 e97271c692..64912c5afd 100644 --- a/reframe/utility/cpuinfo.py +++ b/reframe/utility/cpuinfo.py @@ -281,7 +281,10 @@ def _sysctl_topo(): def cpuinfo(): ret = { - 'arch': archspec.cpu.host().name + 'arch': archspec.cpu.host().name, + 'vendor': archspec.cpu.host().vendor, + 'model': + archspec.cpu.detect.raw_info_dictionary().get("model name", "N/A") } # Try first to get information from the filesystem From ec5ead529e8d29e938dfbd5971f2be391a1bb509 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Tue, 13 Feb 2024 23:01:20 +0100 Subject: [PATCH 2/2] Minor style fixes --- reframe/utility/cpuinfo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reframe/utility/cpuinfo.py b/reframe/utility/cpuinfo.py index 64912c5afd..4c1fedd1ea 100644 --- a/reframe/utility/cpuinfo.py +++ b/reframe/utility/cpuinfo.py @@ -283,8 +283,8 @@ def cpuinfo(): ret = { 'arch': archspec.cpu.host().name, 'vendor': archspec.cpu.host().vendor, - 'model': - archspec.cpu.detect.raw_info_dictionary().get("model name", "N/A") + 'model': archspec.cpu.detect.raw_info_dictionary().get('model name', + 'N/A') } # Try first to get information from the filesystem