guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: hwloc: Add 2.0.0.


From: Ludovic Courtès
Subject: 01/01: gnu: hwloc: Add 2.0.0.
Date: Tue, 6 Feb 2018 11:34:45 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 71e789319cfe81731d61ec3c6a6dd2110baa7190
Author: Ludovic Courtès <address@hidden>
Date:   Tue Feb 6 17:33:14 2018 +0100

    gnu: hwloc: Add 2.0.0.
    
    * gnu/packages/mpi.scm (hwloc-2.0): New variable.
    * gnu/packages/patches/hwloc-tests-without-sysfs.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/mpi.scm                               | 23 +++++++++++-
 .../patches/hwloc-tests-without-sysfs.patch        | 42 ++++++++++++++++++++++
 3 files changed, 65 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 8aa09a5..ca400da 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -757,6 +757,7 @@ dist_patch_DATA =                                           
\
   %D%/packages/patches/higan-remove-march-native-flag.patch    \
   %D%/packages/patches/hubbub-sort-entities.patch              \
   %D%/packages/patches/hurd-fix-eth-multiplexer-dependency.patch        \
+  %D%/packages/patches/hwloc-tests-without-sysfs.patch         \
   %D%/packages/patches/hydra-disable-darcs-test.patch          \
   %D%/packages/patches/icecat-avoid-bundled-libraries.patch    \
   %D%/packages/patches/icecat-bug-1348660-pt5.patch            \
diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm
index d9a2094..442f7c5 100644
--- a/gnu/packages/mpi.scm
+++ b/gnu/packages/mpi.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014, 2015 Eric Bavier <address@hidden>
-;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <address@hidden>
+;;; Copyright © 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <address@hidden>
 ;;; Copyright © 2014 Ian Denhardt <address@hidden>
 ;;; Copyright © 2016 Andreas Enge <address@hidden>
 ;;; Copyright © 2017 Dave Love <address@hidden>
@@ -39,9 +39,12 @@
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages valgrind)
+  #:use-module (srfi srfi-1)
   #:use-module (ice-9 match))
 
 (define-public hwloc
+  ;; Note: For now we keep 1.x as the default because many packages have yet
+  ;; to migrate to 2.0.
   (package
     (name "hwloc")
     (version "1.11.8")
@@ -110,6 +113,24 @@ a powerful programming interface to gather information 
about the hardware,
 bind processes, and much more.")
     (license bsd-3)))
 
+(define-public hwloc-2.0
+  ;; Note: 2.0 isn't the default yet, see above.
+  (package
+    (inherit hwloc)
+    (version "2.0.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://www.open-mpi.org/software/hwloc/v";
+                                  (version-major+minor version)
+                                  "/downloads/hwloc-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "021765f9y6pxcxrvfpzzwaig16ypfbph5xjpkd29qkhzs9r6zrcr"))
+              (patches (search-patches "hwloc-tests-without-sysfs.patch"))))
+
+    ;; libnuma is no longer needed.
+    (inputs (alist-delete "numactl" (package-inputs hwloc)))))
+
 (define-public openmpi
   (package
     (name "openmpi")
diff --git a/gnu/packages/patches/hwloc-tests-without-sysfs.patch 
b/gnu/packages/patches/hwloc-tests-without-sysfs.patch
new file mode 100644
index 0000000..ea6ec41
--- /dev/null
+++ b/gnu/packages/patches/hwloc-tests-without-sysfs.patch
@@ -0,0 +1,42 @@
+Fix a test failure in the build environment, where /sys is missing.
+From 
<https://github.com/bgoglin/hwloc/commit/a2cc4f2e2bf4a8bbdd61b578a62e27e7482799cf.patch>.
+
+From a2cc4f2e2bf4a8bbdd61b578a62e27e7482799cf Mon Sep 17 00:00:00 2001
+From: Brice Goglin <address@hidden>
+Date: Tue, 6 Feb 2018 17:13:26 +0100
+Subject: [PATCH] linux: honor the filtering cores and packages when reading
+ topology from cpuinfo
+
+Caused a make check crash in lstopo --filter all:none in chroot without sysfs.
+
+Thanks to Ludovic Courtes for the report.
+
+Signed-off-by: Brice Goglin <address@hidden>
+---
+ hwloc/topology-linux.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/hwloc/topology-linux.c b/hwloc/topology-linux.c
+index 290da0d72..e1bbf94e1 100644
+--- a/hwloc/topology-linux.c
++++ b/hwloc/topology-linux.c
+@@ -4101,7 +4101,8 @@ look_cpuinfo(struct hwloc_topology *topology,
+     }
+   /* create package objects */
+   hwloc_debug("%u pkgs%s\n", numpkgs, missingpkg ? ", but some missing 
package" : "");
+-  if (!missingpkg && numpkgs>0) {
++  if (!missingpkg && numpkgs>0
++      && hwloc_filter_check_keep_object_type(topology, HWLOC_OBJ_PACKAGE)) {
+     for (i = 0; i < numpkgs; i++) {
+       struct hwloc_obj *obj = hwloc_alloc_setup_object(topology, 
HWLOC_OBJ_PACKAGE, Lpkg_to_Ppkg[i]);
+       int doneinfos = 0;
+@@ -4145,7 +4146,8 @@ look_cpuinfo(struct hwloc_topology *topology,
+     }
+   /* create Core objects */
+   hwloc_debug("%u cores%s\n", numcores, missingcore ? ", but some missing 
core" : "");
+-  if (!missingcore && numcores>0) {
++  if (!missingcore && numcores>0
++      && hwloc_filter_check_keep_object_type(topology, HWLOC_OBJ_CORE)) {
+     for (i = 0; i < numcores; i++) {
+       struct hwloc_obj *obj = hwloc_alloc_setup_object(topology, 
HWLOC_OBJ_CORE, Lcore_to_Pcore[i]);
+       obj->cpuset = hwloc_bitmap_alloc();



reply via email to

[Prev in Thread] Current Thread [Next in Thread]