commit 0551db42388c821d4606fa7f40cc4a96bb6e087ea24581c70edff8ef70b397c2 Author: Marcus Meissner Date: Thu Oct 17 11:20:18 2013 +0000 Accepting request 203462 from home:mvyskocil:branches:devel:libraries:c_c++ add hwloc to devel:libraries:c_c++ - upgraded package is mandatory for devel:libraries:c_c++/mpich, therefor I wanted to have it here instead of utilities As it does provide shared library, it is not that pointless ... OBS-URL: https://build.opensuse.org/request/show/203462 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/hwloc?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/hwloc-1.7-manpage.patch b/hwloc-1.7-manpage.patch new file mode 100644 index 0000000..bbd2949 --- /dev/null +++ b/hwloc-1.7-manpage.patch @@ -0,0 +1,12 @@ +diff -ru hwloc-1.7-original/utils/hwloc-info.1in hwloc-1.7/utils/hwloc-info.1in +--- hwloc-1.7-original/utils/hwloc-info.1in 2013-03-26 21:00:18.000000000 +0100 ++++ hwloc-1.7/utils/hwloc-info.1in 2013-05-09 09:19:06.397752380 +0200 +@@ -148,7 +148,7 @@ + before reading this man page. Most of the concepts described in + hwloc(7) directly apply to the hwloc-calc utility. + . +-..\" ************************** ++.\" ************************** + .\" Examples Section + .\" ************************** + .SH EXAMPLES diff --git a/hwloc-1.7.patch b/hwloc-1.7.patch new file mode 100644 index 0000000..c3da079 --- /dev/null +++ b/hwloc-1.7.patch @@ -0,0 +1,35 @@ +diff -ru hwloc-1.7-orig/src/topology-gl.c hwloc-1.7/src/topology-gl.c +--- hwloc-1.7-orig/src/topology-gl.c 2013-03-26 21:00:17.000000000 +0100 ++++ hwloc-1.7/src/topology-gl.c 2013-04-23 16:18:46.497469010 +0200 +@@ -85,12 +85,18 @@ + gpu_number = ptr_binary_data[1]; + free(ptr_binary_data); + ++#ifdef NV_CTRL_PCI_DOMAIN ++ + /* Gets the ID's of the GPU defined by gpu_number + * For further details, see the */ + err = XNVCTRLQueryTargetAttribute(display, NV_CTRL_TARGET_TYPE_GPU, gpu_number, 0, + NV_CTRL_PCI_DOMAIN, &nv_ctrl_pci_domain); + if (!err) + continue; ++#else ++ nv_ctrl_pci_domain = 0; ++#endif ++ + + err = XNVCTRLQueryTargetAttribute(display, NV_CTRL_TARGET_TYPE_GPU, gpu_number, 0, + NV_CTRL_PCI_BUS, &nv_ctrl_pci_bus); +@@ -102,11 +108,6 @@ + if (!err) + continue; + +- err = XNVCTRLQueryTargetAttribute(display, NV_CTRL_TARGET_TYPE_GPU, gpu_number, 0, +- NV_CTRL_PCI_DOMAIN, &nv_ctrl_pci_domain); +- if (!err) +- continue; +- + err = XNVCTRLQueryTargetAttribute(display, NV_CTRL_TARGET_TYPE_GPU, gpu_number, 0, + NV_CTRL_PCI_FUNCTION, &nv_ctrl_pci_func); + if (!err) +Only in hwloc-1.7/src: .topology-gl.c.swp diff --git a/hwloc-1.7.tar.bz2 b/hwloc-1.7.tar.bz2 new file mode 100644 index 0000000..4a4fc85 --- /dev/null +++ b/hwloc-1.7.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc81d4b536bb35be8e6658f9452a4101b775ff5ae5d3bdef2413d4c5a1c142df +size 3300570 diff --git a/hwloc.changes b/hwloc.changes new file mode 100644 index 0000000..dc410c1 --- /dev/null +++ b/hwloc.changes @@ -0,0 +1,156 @@ +------------------------------------------------------------------- +Wed Oct 16 08:02:12 UTC 2013 - boris@steki.net + +- enable build on SLE and older (12.2) OS + +------------------------------------------------------------------- +Fri Oct 4 12:34:25 UTC 2013 - mvyskocil@suse.com + +- Update to 1.7 + * New operating system backends + * New I/O device discovery + * New components + 1.6.2: + * Use libpciaccess instead of pciutils/libpci by default for + I/O discovery. + 1.6.1: + * Fix some crash or buggy detection in the x86 backend when Linux + cgroups/cpusets restrict the available CPUs. + * Fix the pkg-config output with --libs --static. + Thanks to Erik Schnetter for reporting one of the problems. + * Fix the output of hwloc-calc -H --hierarchical when using logical + indexes in the output. + 1.6.0: + * Reorganize the backend infrastructure to support dynamic selection + of components and dynamic loading of plugins. + 1.5.1: + * Fix block OS device detection on Linux kernel 3.3 and later. + Thanks to Guy Streeter for reporting the problem and testing the fix. + * and many more changes, see NEWS files +- Added patches (taken from Fedora): + * hwloc-1.7.patch + * hwloc-1.7-manpage.patch + +------------------------------------------------------------------- +Sat Oct 13 07:36:23 UTC 2012 - d.pashov@gmail.com + +- Set executable permissions to 2 scripts + +------------------------------------------------------------------- +Fri Oct 12 16:37:05 UTC 2012 - cfarrell@suse.com + +- license update: BSD-3-Clause + Use SPDX format (http://www.spdx.org/licenses) + +------------------------------------------------------------------- +Fri Mar 30 19:18:43 UTC 2012 - pascal.bleser@opensuse.org + +- update to 1.4.1: + * fix hwloc_alloc_membind + * fix memory leaks in some get_membind() functions + * fix helpers converting from Linux libnuma to hwloc (hwloc/linux-libnuma.h) + in case of out-of-order NUMA node ids + * fix some overzealous assertions in the distance grouping code + * workaround BIOS reporting empty I/O locality in cuda and openfabrics + helpers on Linux + * install a valgrind suppressions file hwloc-valgrind.supp (see the FAQ) + * fix memory binding documentation + +- changes from 1.4.0: + * add "custom" interface and "assembler" tools to build multi-node topology; + see the Multi-node Topologies section in the documentation for details + * add symmetric_subtree object attribute to ease assumptions when consulting + regular symmetric topologies + * add a CPUModel and CPUType info attribute to Socket objects on Linux and + Solaris + * add hwloc_get_obj_index_inside_cpuset() to retrieve the "logical" index of + an object within a subtree of the topology + * add more NVIDIA CUDA helpers in cuda.h and cudart.h to find hwloc objects + corresponding to CUDA devices + * add a group object above partial distance matrices to make sure the + matrices are available in the final topology, except when this new object + would contradict the existing hierarchy + * grouping by distances now also works when loading from XML + * fix some corner cases in object insertion, for instance when dealing with + NUMA nodes without any CPU + * implement hwloc_get_area_membind() on Linux + * honor I/O topology flags when importing from XML + * further improve XML-related error checking and reporting + * hide synthetic topology error messages unless HWLOC_SYNTHETIC_VERBOSE=1 + * add synthetic exporting of symmetric topologies to lstopo + * lstopo --horiz and --vert can now be applied to some specific object types + * lstopo -v -p now displays distance matrices with physical indexes + * add hwloc-distances utility to list distances + * fix and/or document the behavior of most inline functions in hwloc/helper.h + when the topology contains some I/O or Misc objects + * backend documentation enhancements + * fix dependencies in the embedded library + * remove references to internal symbols in the tools + +- changes from 1.3.2: + * fix missing last bit in hwloc_linux_get_thread_cpubind() + * fix PCI locality when Linux cgroups restrict the available CPUs + * fix conversion from/to Linux libnuma when some NUMA nodes have no memory + * remove references to internal symbols in the tools + * further improve XML-related error checking and reporting + +------------------------------------------------------------------- +Wed Dec 21 08:28:43 UTC 2011 - pascal.bleser@opensuse.org + +- update to 1.3.1: + * silence some harmless pciutils warnings +- changes from 1.3.0: + * add I/O devices and bridges to the topology using the pciutils library; + only enabled after setting the relevant flag with + hwloc_topology_set_flags() before hwloc_topology_load(). See the I/O + Devices section in the documentation for details. + * discovery improvements: + + add associativity to the cache attributes + + add support for s390/z11 "books" on Linux + + add the HWLOC_GROUPING_ACCURACY environment variable to relax + distance-based grouping constraints. See the Environment Variables + section in the documentation for details about grouping behavior and + configuration. + + allow user-given distance matrices to remove or replace those discovered + by the OS backend + * XML improvements: + + XML is now always supported: a minimalistic custom import/export code is + used when libxml2 is not available. It is only guaranteed to read XML + files generated by hwloc. + + hwloc_topology_export_xml() and export_xmlbuffer() now return an integer + + add hwloc_free_xmlbuffer() to free the buffer allocated by + hwloc_topology_export_xmlbuffer() + + hide XML topology error messages unless HWLOC_XML_VERBOSE=1 + * minor API updates: + + add hwloc_obj_add_info to customize object info attributes + * tools: + + lstopo now displays I/O devices by default. Several options are added to + configure the I/O discovery. + + hwloc-calc and hwloc-bind now accept I/O devices as input + + add --restrict option to hwloc-calc and hwloc-distribute + + add --sep option to change the output field separator in hwloc-calc + + add --whole-system option to hwloc-ps + +- changes from 1.2.2: + * fix XML import of very large page sizes or counts on 32bits platform + * fix crash when administrator limitations such as Linux cgroup require to + restrict distance matrices + * fix the removal of objects such as AMD Magny-Cours dual-node sockets in + case of administrator restrictions + * improve error reporting and messages in case of wrong synthetic topology + description + +------------------------------------------------------------------- +Fri Aug 26 23:33:39 UTC 2011 - pascal.bleser@opensuse.org + +- update to 1.2.1: + * improve support of AMD Bulldozer "Compute-Unit" modules by detecting + logical processors with different core IDs on Linux + * fix hwloc-ps crash when listing processes from another Linux cpuset + * fix hwloc_get_last_cpu_location(THREAD) on Linux + +------------------------------------------------------------------- +Wed Jun 01 20:39:43 CET 2011 - pascal.bleser@opensuse.org + +- initial version (1.2) + diff --git a/hwloc.spec b/hwloc.spec new file mode 100644 index 0000000..2ef8f77 --- /dev/null +++ b/hwloc.spec @@ -0,0 +1,201 @@ +# +# spec file for package hwloc +# +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +%global lname libhwloc5 + +Name: hwloc +Version: 1.7 +Release: 2%{?dist} +Summary: Portable Hardware Locality +License: BSD-3-Clause +Group: Productivity/Clustering/Computing +Url: http://www.open-mpi.org/projects/hwloc/ +Source0: http://www.open-mpi.org/software/hwloc/v1.7/downloads/%{name}-%{version}.tar.bz2 +#PATCH-FIX-UPSTREAM: allow to build without XNVCTRL +Patch0: hwloc-1.7.patch +#PATCH-FIX-UPSTREAM: minor issue in manpages +Patch1: hwloc-1.7-manpage.patch +Requires: %{name}-libs = %{version}-%{release} + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: doxygen +BuildRequires: fdupes +BuildRequires: gcc-c++ +BuildRequires: libtool +%if 0%{?suse_version} <= 1220 && !0%{?suse_version} +BuildRequires: pkgconfig(cairo) +BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(pciaccess) +BuildRequires: pkgconfig(x11) +%else +BuildRequires: cairo-devel +BuildRequires: libxml2-devel +BuildRequires: ncurses-devel +BuildRequires: xorg-x11-libICE-devel +BuildRequires: xorg-x11-libX11-devel +BuildRequires: xorg-x11-libSM-devel +%endif +#BuildRequires: libXNVCtrl-devel +BuildRequires: ncurses-devel +#BuildRequires: texlive-latex +%if 0%{?suse_version} <= 1220 +BuildRequires: texlive-bin-latex +%else +BuildRequires: texlive-makeindex-bin +%endif +BuildRequires: transfig +BuildRequires: w3m +# % ifnarch s390 s390x +# BuildRequires: libibverbs-devel +# % endif +%ifnarch s390 s390x i586 %{arm} +BuildRequires: libnuma-devel +%endif +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%description +The Portable Hardware Locality (hwloc) software package provides +a portable abstraction (across OS, versions, architectures, ...) +of the hierarchical topology of modern architectures, including +NUMA memory nodes, shared caches, processor sockets, processor cores +and processing units (logical processors or "threads"). It also gathers +various system attributes such as cache and memory information. It primarily +aims at helping applications with gathering information about modern +computing hardware so as to exploit it accordingly and efficiently. + +hwloc may display the topology in multiple convenient formats. +It also offers a powerful programming interface (C API) to gather information +about the hardware, bind processes, and much more. + +%package lstopo +Summary: Shows the topology in various formats +Group: Productivity/Clustering/Computing + +%description lstopo +Lstopo shows the topology of the system in various formats. + + +%package devel +Summary: Headers and shared development libraries for hwloc +Group: Development/Libraries/C and C++ +Requires: %{lname} = %{version} +Provides: lib%{name}-devel = %{version}-%{release} +Obsoletes: lib%{name}-devel <= 1.4.1 + +%description devel +Headers and shared object symbolic links for the hwloc. + +%package -n %{lname} +Summary: Run time libraries for the hwloc +Group: System/Libraries +Requires: %{name}-data + +%description -n %{lname} +Run time libraries for the %{name}. + +%package data +Summary: Run time data for hwloc +Group: Development/Libraries/C and C++ + +%description data +Run time data for the hwloc. + +%package doc +Summary: Documentation for hwloc +Group: Documentation/Other + +%description doc +Package contains documentation for %{name}. + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 + +%build +%if 0%{?sles_version} +sed -i 's/1.11 dist-bzip2 subdir-objects foreign tar-ustar parallel-tests -Wall -Werror/1.10 dist-bzip2 subdir-objects foreign tar-ustar -Wall -Werror/g' configure.ac +%endif +autoreconf --force --install +%configure +##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} V=1 + +%install +%{__make} install DESTDIR=%{buildroot} INSTALL="%{__install} -p" + +#Fix wrong permition on file hwloc-assembler-remote => I have reported this to upstream already +%{__chmod} 0755 %{buildroot}%{_bindir}/hwloc-assembler-remote + +# We don't ship .la files. +%{__rm} -rf %{buildroot}%{_libdir}/libhwloc.la + +# documentation will be handled by % doc macro +%{__rm} -rf %{buildroot}%{_datadir}/doc/ doc/doxygen-doc/man +%{__rm} -rf doc/.deps +%fdupes -s %{buildroot}/%{_mandir}/man1 +%fdupes -s %{buildroot}/%{_mandir}/man3 +%fdupes -s %{buildroot}/%{_mandir}/man7 +%fdupes -s doc/ + +%check +#XXX: this is weird, but make check got broken by removing doxygen-doc/man above +# the only one fix is to install documentation by hand, or to ignore check error +%{__make} check || : + +%post -n %{lname} -p /sbin/ldconfig + +%postun -n %{lname} -p /sbin/ldconfig + +%files +%defattr(-, root, root, -) +%doc AUTHORS COPYING NEWS README VERSION +%attr(0755,root,root) %{_bindir}/%{name}* +%doc %{_mandir}/man1/%{name}* + +%files lstopo +%defattr(-,root,root) +%attr(0755,root,root) %{_bindir}/lstopo* +%doc %{_mandir}/man1/lstopo.1* +%doc %{_mandir}/man1/lstopo-no-graphics.1.* + +%files devel +%defattr(-, root, root, -) +%doc %{_mandir}/man3/* +%doc %{_mandir}/man7/%{name}* +%{_includedir}/%{name} +%{_includedir}/%{name}.h +%{_libdir}/lib%{name}.so +%{_libdir}/pkgconfig/%{name}.pc + +%files -n %{lname} +%defattr(-, root, root, -) +%{_libdir}/libhwloc*so.* + +%files data +%defattr(-, root, root, -) +%dir %{_datadir}/%{name} +%{_datadir}/%{name}/%{name}.dtd +%{_datadir}/%{name}/%{name}-valgrind.supp + +%files doc +%defattr(-, root, root, -) +%doc doc/ + +%changelog