import hwloc-2.2.0-3.el8
This commit is contained in:
parent
20f16c9a2c
commit
25bd428e72
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
SOURCES/hwloc-1.11.9.tar.bz2
|
||||
SOURCES/hwloc-2.2.0.tar.bz2
|
||||
|
@ -1 +1,2 @@
|
||||
f403351c2ab08e4a1bef24f466a6e992feb8b0b8 SOURCES/hwloc-1.11.9.tar.bz2
|
||||
1b87ff3820b28e718dfdca626a1d27521ea613f6 SOURCES/hwloc-2.2.0.tar.bz2
|
||||
|
@ -1,74 +0,0 @@
|
||||
From: Prarit Bhargava <prarit@redhat.com>
|
||||
|
||||
Subject: linux: fix support for NUMA node0 being offline
|
||||
|
||||
commit 0114c2b0b3e39265e0829eebfff87ac9f4412fe9
|
||||
Author: Brice Goglin <Brice.Goglin@inria.fr>
|
||||
Date: Mon Apr 26 20:35:42 2021 +0200
|
||||
|
||||
linux: fix support for NUMA node0 being offline
|
||||
|
||||
Just like we didn't support offline CPU#0 until commit
|
||||
7bcc273efd50536961ba16d474efca4ae163229b, we need to
|
||||
support node0 being offline as well.
|
||||
It's not clear whether it's a new Linux feature or not,
|
||||
this was reported on a POWER LPAR VM.
|
||||
|
||||
The symptoms are different here because we got no NUMA
|
||||
nodes at all, hence the core hwloc added a default
|
||||
machine-wide node. But this node got marked disallowed
|
||||
by Linux cgroups. Hence load() failed with
|
||||
"Topology does not contain any NUMA node, aborting!"
|
||||
|
||||
We opportunistically assume node0 is online to avoid
|
||||
the overhead in the vast majority of cases. If node0
|
||||
is missing, we parse "online" to find the first node.
|
||||
|
||||
Thanks to Jirka Hladky for the report.
|
||||
|
||||
Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
|
||||
|
||||
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
|
||||
|
||||
diff -urNp hwloc-2.2.0.orig/hwloc/topology-linux.c hwloc-2.2.0/hwloc/topology-linux.c
|
||||
--- hwloc-2.2.0.orig/hwloc/topology-linux.c 2021-05-10 14:44:42.690559128 -0400
|
||||
+++ hwloc-2.2.0/hwloc/topology-linux.c 2021-05-10 14:44:57.858982883 -0400
|
||||
@@ -5342,6 +5342,9 @@ static const char *find_sysfs_cpu_path(i
|
||||
|
||||
static const char *find_sysfs_node_path(int root_fd)
|
||||
{
|
||||
+ unsigned first;
|
||||
+ int err;
|
||||
+
|
||||
if (!hwloc_access("/sys/bus/node/devices", R_OK|X_OK, root_fd)
|
||||
&& !hwloc_access("/sys/bus/node/devices/node0/cpumap", R_OK, root_fd))
|
||||
return "/sys/bus/node/devices";
|
||||
@@ -5350,6 +5353,28 @@ static const char *find_sysfs_node_path(
|
||||
&& !hwloc_access("/sys/devices/system/node/node0/cpumap", R_OK, root_fd))
|
||||
return "/sys/devices/system/node";
|
||||
|
||||
+ /* node0 might be offline, fallback to looking at the first online node.
|
||||
+ * online contains comma-separated ranges, just read the first number.
|
||||
+ */
|
||||
+ hwloc_debug("Failed to find sysfs node files using node0, looking at online nodes...\n");
|
||||
+ err = hwloc_read_path_as_uint("/sys/devices/system/node/online", &first, root_fd);
|
||||
+ if (err) {
|
||||
+ hwloc_debug("Failed to find read /sys/devices/system/node/online.\n");
|
||||
+ } else {
|
||||
+ char path[PATH_MAX];
|
||||
+ hwloc_debug("Found node#%u as first online node\n", first);
|
||||
+
|
||||
+ snprintf(path, sizeof(path), "/sys/bus/node/devices/node%u/cpumap", first);
|
||||
+ if (!hwloc_access("/sys/bus/node/devices", R_OK|X_OK, root_fd)
|
||||
+ && !hwloc_access(path, R_OK, root_fd))
|
||||
+ return "/sys/bus/node/devices";
|
||||
+
|
||||
+ snprintf(path, sizeof(path), "/sys/devices/system/node/node%u/cpumap", first);
|
||||
+ if (!hwloc_access("/sys/devices/system/node", R_OK|X_OK, root_fd)
|
||||
+ && !hwloc_access(path, R_OK, root_fd))
|
||||
+ return "/sys/devices/system/node";
|
||||
+ }
|
||||
+
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1,11 +1,12 @@
|
||||
Summary: Portable Hardware Locality - portable abstraction of hierarchical architectures
|
||||
Name: hwloc
|
||||
Version: 2.2.0
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
License: BSD
|
||||
URL: http://www.open-mpi.org/projects/hwloc/
|
||||
Source0: http://www.open-mpi.org/software/hwloc/v2.0/downloads/%{name}-%{version}.tar.bz2
|
||||
Patch0: 0001.patch
|
||||
Source1: http://www.open-mpi.org/software/hwloc/v1.11/downloads/%{name}-1.11.9.tar.bz2
|
||||
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
|
||||
BuildRequires: gcc
|
||||
@ -79,10 +80,31 @@ Requires: %{name}-plugins%{?_isa} = %{version}-%{release}
|
||||
- GL support
|
||||
- libxml support
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
%package -n compat-hwloc1
|
||||
Summary: Compat package for hwloc-1.11.9
|
||||
|
||||
%description -n compat-hwloc1
|
||||
This package contains a compat library for hwloc-1.11.9.
|
||||
|
||||
%prep
|
||||
%setup -q hwloc_src -b 1
|
||||
%build
|
||||
|
||||
# BUILD THE PACKAGE
|
||||
|
||||
# The ./configure script will support --runstatedir= when generated with
|
||||
# autoconf 2.70. Until then, tell it about /run using the export:
|
||||
export runstatedir=/run
|
||||
%configure --enable-plugins --disable-silent-rules
|
||||
# Remove rpaths
|
||||
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
|
||||
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
||||
make %{?_smp_mflags}
|
||||
|
||||
|
||||
# BUILD THE COMPAT LIBRARY
|
||||
|
||||
cd ../%{name}-1.11.9
|
||||
# The ./configure script will support --runstatedir= when generated with
|
||||
# autoconf 2.70. Until then, tell it about /run using the export:
|
||||
export runstatedir=/run
|
||||
@ -93,6 +115,9 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
|
||||
# INSTALL THE PACKAGE
|
||||
|
||||
make install DESTDIR=%{buildroot} INSTALL="%{__install} -p"
|
||||
|
||||
# We don't ship .la files.
|
||||
@ -118,8 +143,11 @@ mv %{buildroot}%{_datadir}/%{name}/hwloc-dump-hwdata.service %{buildroot}%{_unit
|
||||
rm %{buildroot}%{_datadir}/%{name}/hwloc-dump-hwdata.service
|
||||
%endif
|
||||
|
||||
%check
|
||||
LD_LIBRARY_PATH=$PWD/hwloc/.libs make check
|
||||
# INSTALL THE COMPAT LIBRARY
|
||||
|
||||
cd ../%{name}-1.11.9
|
||||
mkdir -p %{buildroot}%{_libdir}
|
||||
cp ./src/.libs/libhwloc.so.5 %{buildroot}%{_libdir}/
|
||||
|
||||
%ifarch %{ix86} x86_64
|
||||
%post
|
||||
@ -175,7 +203,13 @@ LD_LIBRARY_PATH=$PWD/hwloc/.libs make check
|
||||
%dir %{_libdir}/%{name}
|
||||
%{_libdir}/%{name}/hwloc*
|
||||
|
||||
%files -n compat-hwloc1
|
||||
%{_libdir}/libhwloc*so.5*
|
||||
|
||||
%changelog
|
||||
* Wed Jul 7 2021 Prarit Bhargava <prarit@redhat.com> - 2.2.0-3
|
||||
- Add compat-hwloc1 subpackage [1979150]
|
||||
|
||||
* Mon May 17 2021 Prarit Bhargava <prarit@redhat.com> - 2.2.0-2
|
||||
- Add support for node 0 offline
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user