Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 834486 - sys-cluster/torque-6.0.4-r2 - machine.cpp: error: struct hwloc_obj has no member named memory
Summary: sys-cluster/torque-6.0.4-r2 - machine.cpp: error: struct hwloc_obj has no mem...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Cluster Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-02 13:04 UTC by Toralf Förster
Modified: 2022-10-17 06:58 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,16.39 KB, text/plain)
2022-03-02 13:04 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,222.70 KB, text/plain)
2022-03-02 13:04 UTC, Toralf Förster
Details
environment (environment,107.15 KB, text/plain)
2022-03-02 13:04 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,17.73 KB, application/x-bzip)
2022-03-02 13:04 UTC, Toralf Förster
Details
logs.tar.bz2 (logs.tar.bz2,17.12 KB, application/x-bzip)
2022-03-02 13:04 UTC, Toralf Förster
Details
sys-cluster:torque-6.0.4-r2:20220302-115012.log.bz2 (sys-cluster:torque-6.0.4-r2:20220302-115012.log.bz2,12.71 KB, application/x-bzip)
2022-03-02 13:04 UTC, Toralf Förster
Details
temp.tar.bz2 (temp.tar.bz2,40.44 KB, application/x-bzip)
2022-03-02 13:04 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2022-03-02 13:04:02 UTC
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../../../src/include  -I../../../src/include `xml2-config --cflags`   -g -pipe -march=native -fno-diagnostics-color -c -o numa_chip.o numa_chip.cpp
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../../../src/include  -I../../../src/include `xml2-config --cflags`   -g -pipe -march=native -fno-diagnostics-color -c -o numa_core.o numa_core.cpp
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../../../src/include  -I../../../src/include `xml2-config --cflags`   -g -pipe -march=native -fno-diagnostics-color -c -o numa_pci_device.o numa_pci_device.cpp
machine.cpp: In function int get_machine_total_memory(hwloc_topology_t, hwloc_uint64_t*)’:
machine.cpp:94:26: error: struct hwloc_obj’ has no member named memory’
   94 |   *memory = machine_obj->memory.total_memory;
      |                          ^~~~~~

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_plasma_systemd-j4-20220228-020016

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-11.2.1 *
clang/llvm (if any):
/usr/lib/llvm/13
13.0.1
Python 3.9.10
Available Ruby profiles:
  [1]   ruby26 (with Rubygems)
  [2]   ruby27 (with Rubygems)
  [3]   ruby30 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.58.1 *
The following VMs are available for generation-2:
1)	OpenJDK 11.0.14_p9 [openjdk-11]
2)	OpenJDK 8.322_p06 [openjdk-8]
*)	Eclipse Temurin JDK 11.0.14_p9 [openjdk-bin-11]
4)	Eclipse Temurin JDK 8.322_p06 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-8 
  [2]   openjdk-11 
  [3]   openjdk-bin-8 
  [4]   openjdk-bin-11  system-vm

The Glorious Glasgow Haskell Compilation System, version 8.10.4
php cli:
  [1]   php7.4
  [2]   php8.0
  [3]   php8.1 *

  HEAD of ::gentoo
commit d867f5f4991e2478f545955bb14bbabb428df885
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Wed Mar 2 10:22:10 2022 +0000

    2022-03-02 10:22:08 UTC

emerge -qpvO sys-cluster/torque
[ebuild  N    ] sys-cluster/torque-6.0.4-r2  USE="autorun cgroups cpusets crypt munge server syslog -doc -nvidia -quickcommit -tk"
Comment 1 Toralf Förster gentoo-dev 2022-03-02 13:04:03 UTC
Created attachment 766141 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2022-03-02 13:04:05 UTC
Created attachment 766142 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2022-03-02 13:04:10 UTC
Created attachment 766143 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2022-03-02 13:04:11 UTC
Created attachment 766144 [details]
etc.portage.tar.bz2
Comment 5 Toralf Förster gentoo-dev 2022-03-02 13:04:15 UTC
Created attachment 766145 [details]
logs.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2022-03-02 13:04:17 UTC
Created attachment 766146 [details]
sys-cluster:torque-6.0.4-r2:20220302-115012.log.bz2
Comment 7 Toralf Förster gentoo-dev 2022-03-02 13:04:21 UTC
Created attachment 766147 [details]
temp.tar.bz2
Comment 8 Jocelyn Mayer 2022-10-17 06:58:01 UTC
The following patch seems to fix this issue.
The first part (removing undefined flags) maybe suspicious, though...

--- torque-6a0b37f85c7d644e9217cbab1542792d646f59a6/src/resmom/mom_main.c      2022-03-13 16:17:07.570759335 +0100
+++ torque-6a0b37f85c7d644e9217cbab1542792d646f59a6/src/resmom/mom_main.c      2022-03-13 16:55:25.287022431 +0100
@@ -4711,7 +4711,7 @@ int cg_initialize_hwloc_topology()
   read_all_devices();
 
   unsigned long flags = HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM;
-  flags |= HWLOC_TOPOLOGY_FLAG_IO_DEVICES;
+  //flags |= HWLOC_TOPOLOGY_FLAG_IO_DEVICES;
 
   #ifdef NVIDIA_GPUS
   /* Include IO devices (i.e. PCI devices) when loading topology information.
@@ -4719,7 +4719,7 @@ int cg_initialize_hwloc_topology()
    * HWLOC_TOPOLOGY_FLAG_IO_DEVICES was introduced in hwloc 1.3. If NVIDIA_GPUS is defined
    * --enable-nvidia-gpus was used, which requires hwloc 1.9 or later.
    */
-  flags |= HWLOC_TOPOLOGY_FLAG_IO_DEVICES;
+  //flags |= HWLOC_TOPOLOGY_FLAG_IO_DEVICES;
   #endif
 
   if ((hwloc_topology_set_flags(topology, flags) != 0))
--- torque-6a0b37f85c7d644e9217cbab1542792d646f59a6/src/lib/Libutils/numa_socket.cpp    2017-08-30 00:25:11.000000000 +0200
+++ torque-6a0b37f85c7d644e9217cbab1542792d646f59a6/src/lib/Libutils/numa_socket.cpp    2022-03-13 16:41:23.702248881 +0100
@@ -116,10 +116,10 @@ int Socket::initializeAMDSocket(hwloc_ob
   hwloc_obj_t prev = NULL;
 
   this->id = socket_obj->logical_index;
-  this->memory = socket_obj->memory.total_memory / 1024;
+  this->memory = socket_obj->total_memory / 1024;
   this->available_memory = this->memory;
-  this->socket_cpuset = socket_obj->allowed_cpuset; 
-  this->socket_nodeset = socket_obj->allowed_nodeset;
+  this->socket_cpuset = hwloc_topology_get_allowed_cpuset(topology);
+  this->socket_nodeset = hwloc_topology_get_allowed_nodeset(topology);
   hwloc_bitmap_list_snprintf(this->socket_cpuset_string, MAX_CPUSET_SIZE, this->socket_cpuset);
   hwloc_bitmap_list_snprintf(this->socket_nodeset_string, MAX_NODESET_SIZE, this->socket_nodeset);
 
@@ -156,10 +156,10 @@ int Socket::initializeIntelSocket(hwloc_
   hwloc_obj_t prev = NULL;
 
   this->id = socket_obj->logical_index;
-  this->memory = socket_obj->memory.total_memory / 1024;
+  this->memory = socket_obj->total_memory / 1024;
   this->available_memory = this->memory;
-  this->socket_cpuset = socket_obj->allowed_cpuset; 
-  this->socket_nodeset = socket_obj->allowed_nodeset;
+  this->socket_cpuset = hwloc_topology_get_allowed_cpuset(topology);
+  this->socket_nodeset = hwloc_topology_get_allowed_nodeset(topology);
   hwloc_bitmap_list_snprintf(this->socket_cpuset_string, MAX_CPUSET_SIZE, this->socket_cpuset);
   hwloc_bitmap_list_snprintf(this->socket_nodeset_string, MAX_NODESET_SIZE, this->socket_nodeset);
 
--- torque-6a0b37f85c7d644e9217cbab1542792d646f59a6/src/lib/Libutils/machine.cpp
        2017-08-30 00:25:11.000000000 +0200
+++ torque-6a0b37f85c7d644e9217cbab1542792d646f59a6/src/lib/Libutils/machine.cpp
        2022-03-13 16:35:24.885646865 +0100
@@ -91,7 +91,7 @@ int get_machine_total_memory(hwloc_topol
     return(PBSE_SYSTEM);
     }
 
-  *memory = machine_obj->memory.total_memory;
+  *memory = machine_obj->total_memory;
 
   return(PBSE_NONE);
   }
@@ -296,7 +296,7 @@ int Machine::initializeMachine(hwloc_top
     }
   
   /* We have the machine object. Fill in what we know */
-  totalMemory = obj->memory.total_memory / 1024;
+  totalMemory = obj->total_memory / 1024;
   machine_cpuset = hwloc_topology_get_allowed_cpuset(topology);
   machine_nodeset = hwloc_topology_get_allowed_nodeset(topology);
   /* initialize the machines cpuset and nodeset strings */
--- torque-6a0b37f85c7d644e9217cbab1542792d646f59a6/src/lib/Libutils/numa_chip.cpp      2022-03-13 16:33:17.938018692 +0100
+++ torque-6a0b37f85c7d644e9217cbab1542792d646f59a6/src/lib/Libutils/numa_chip.cpp      2022-03-13 16:39:17.387628829 +0100
@@ -612,10 +612,10 @@ int Chip::initializeChip(hwloc_obj_t chi
 
   this->id = chip_obj->logical_index;
   // Store the memory in kb
-  this->memory = chip_obj->memory.local_memory / 1024;
+  this->memory = chip_obj->attr->numanode.local_memory / 1024;
   this->available_memory = this->memory;
-  this->chip_cpuset = chip_obj->allowed_cpuset;
-  this->chip_nodeset = chip_obj->allowed_nodeset;
+  this->chip_cpuset = hwloc_topology_get_allowed_cpuset(topology);
+  this->chip_nodeset = hwloc_topology_get_allowed_nodeset(topology);
   hwloc_bitmap_list_snprintf(this->chip_cpuset_string, MAX_CPUSET_SIZE, this->chip_cpuset);
   hwloc_bitmap_list_snprintf(this->chip_nodeset_string, MAX_CPUSET_SIZE, this->chip_nodeset);
   this->totalCores = hwloc_get_nbobjs_inside_cpuset_by_type(topology, this->chip_cpuset, HWLOC_OBJ_CORE);
--- torque-6a0b37f85c7d644e9217cbab1542792d646f59a6/src/lib/Libutils/numa_core.cpp      2017-08-30 00:25:11.000000000 +0200
+++ torque-6a0b37f85c7d644e9217cbab1542792d646f59a6/src/lib/Libutils/numa_core.cpp      2022-03-13 16:39:43.810967724 +0100
@@ -38,8 +38,8 @@ int Core::initializeCore(hwloc_obj_t cor
   {
   /* We now need to find all of the processing units associated with this core */
   this->id = core_obj->logical_index;
-  this->core_cpuset = core_obj->allowed_cpuset;
-  this->core_nodeset = core_obj->allowed_nodeset;
+  this->core_cpuset = hwloc_topology_get_allowed_cpuset(topology);
+  this->core_nodeset = hwloc_topology_get_allowed_nodeset(topology);
   hwloc_bitmap_list_snprintf(this->core_cpuset_string, MAX_CPUSET_SIZE, this->core_cpuset);
   hwloc_bitmap_list_snprintf(this->core_nodeset_string, MAX_NODESET_SIZE, this->core_nodeset);
   translate_range_string_to_vector(this->core_cpuset_string, this->indices);