Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/doc/hwloc/examples/ |
Upload File : |
/* This example program shows how to retrieve Knights Landing * memory and cluster modes. * See "Custom string infos" in the documentation for details * about these attributes. * * Copyright © 2015-2016, 2015 Intel * Copyright © 2016 Inria. All rights reserved. * See COPYING in top-level directory. */ #include <stdio.h> #include <stdlib.h> #include "hwloc.h" int main(void) { hwloc_topology_t topology; hwloc_obj_t root; const char *cluster_mode; const char *memory_mode; hwloc_topology_init(&topology); hwloc_topology_load(topology); root = hwloc_get_root_obj(topology); cluster_mode = hwloc_obj_get_info_by_name(root, "ClusterMode"); memory_mode = hwloc_obj_get_info_by_name(root, "MemoryMode"); printf ("ClusterMode is '%s' MemoryMode is '%s'\n", cluster_mode ? cluster_mode : "NULL", memory_mode ? memory_mode : "NULL"); hwloc_topology_destroy(topology); return 0; }