;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014, 2015, 2018, 2019 Eric Bavier ;;; Copyright © 2014-2023 Ludovic Courtès ;;; Copyright © 2014 Ian Denhardt ;;; Copyright © 2016 Andreas Enge ;;; Copyright © 2017 Dave Love ;;; Copyright © 2017, 2022 Efraim Flashner ;;; Copyright © 2018–2022 Tobias Geerinckx-Rice ;;; Copyright © 2018 Paul Garlick ;;; Copyright © 2019, 2021 Ricardo Wurmus ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu packages mpi) #:use-module (guix gexp) #:use-module (guix packages) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix download) #:use-module (guix utils) #:use-module (guix deprecation) #:use-module (guix build-system gnu) #:use-module (guix build-system python) #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages compression) #:use-module (gnu packages fabric-management) #:use-module (gnu packages gcc) #:use-module (gnu packages java) #:use-module (gnu packages libevent) #:use-module (gnu packages linux) #:use-module (gnu packages pciutils) #:use-module (gnu packages xorg) #:use-module (gnu packages gtk) #:use-module (gnu packages xml) #:use-module (gnu packages perl) #:use-module (gnu packages ncurses) #:use-module (gnu packages parallel) #:use-module (gnu packages pkg-config) #:use-module (gnu packages valgrind) #:use-module (srfi srfi-1) #:use-module (ice-9 match)) (define-public hwloc-1 (package (name "hwloc") (version "1.11.13") (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 "1j69p8a1pjpbpwn4w7l4dfxmaxxqikchjzqw1ncw05zmcmvlnjd4")) (patches (search-patches "hwloc-1-test-btrfs.patch")))) (properties ;; Tell the 'generic-html' updater to monitor this URL for updates. `((release-monitoring-url . "https://www-lb.open-mpi.org/software/hwloc/current"))) (build-system gnu-build-system) (outputs '("out" ;'lstopo' & co., depends on Cairo, libx11, etc. "lib" ;small closure "doc" ;400+ section 3 man pages "debug")) (inputs (append (list libx11 cairo ncurses expat) (if (target-arm32?) '() (list numactl)))) (propagated-inputs ;; hwloc.pc lists it in 'Requires.private'. (list libpciaccess)) (native-inputs (list pkg-config)) (arguments `(#:configure-flags '("--localstatedir=/var") #:phases (modify-phases %standard-phases (add-before 'check 'skip-linux-libnuma-test (lambda _ ;; Arrange to skip 'tests/linux-libnuma', which fails on some ;; machines: . (substitute* "tests/linux-libnuma.c" (("numa_available\\(\\)") "-1")))) (add-after 'install 'refine-libnuma ;; Give -L arguments for libraries to avoid propagation (lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "lib")) (numa (assoc-ref inputs "numactl"))) (substitute* (map (lambda (f) (string-append out "/" f)) '("lib/pkgconfig/hwloc.pc" "lib/libhwloc.la")) (("-lnuma" lib) (string-append "-L" numa "/lib " lib)))))) (add-after 'install 'avoid