2014-05-01 13:16:16 -04:00
|
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
2019-02-01 00:03:35 -05:00
|
|
|
|
;;; Copyright © 2014, 2015, 2018, 2019 Eric Bavier <bavier@member.fsf.org>
|
2024-04-04 10:05:30 -04:00
|
|
|
|
;;; Copyright © 2014-2024 Ludovic Courtès <ludo@gnu.org>
|
2014-10-18 22:03:42 -04:00
|
|
|
|
;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
|
2016-02-03 15:05:51 -05:00
|
|
|
|
;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
|
2017-07-23 17:00:21 -04:00
|
|
|
|
;;; Copyright © 2017 Dave Love <fx@gnu.org>
|
2022-07-12 14:33:27 -04:00
|
|
|
|
;;; Copyright © 2017, 2022 Efraim Flashner <efraim@flashner.co.il>
|
2022-06-04 20:00:01 -04:00
|
|
|
|
;;; Copyright © 2018–2022 Tobias Geerinckx-Rice <me@tobias.gr>
|
2018-11-12 11:00:33 -05:00
|
|
|
|
;;; Copyright © 2018 Paul Garlick <pgarlick@tourbillion-technology.com>
|
2021-12-02 09:28:13 -05:00
|
|
|
|
;;; Copyright © 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
|
2014-05-01 13:16:16 -04:00
|
|
|
|
;;;
|
|
|
|
|
;;; 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 <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
(define-module (gnu packages mpi)
|
2023-02-23 09:49:09 -05:00
|
|
|
|
#:use-module (guix gexp)
|
2014-05-01 13:16:16 -04:00
|
|
|
|
#:use-module (guix packages)
|
2020-02-17 13:53:16 -05:00
|
|
|
|
#:use-module ((guix licenses) #:prefix license:)
|
2014-05-01 13:16:16 -04:00
|
|
|
|
#:use-module (guix download)
|
2014-10-18 22:03:42 -04:00
|
|
|
|
#:use-module (guix utils)
|
2019-11-12 12:17:29 -05:00
|
|
|
|
#:use-module (guix deprecation)
|
2014-05-01 13:16:16 -04:00
|
|
|
|
#:use-module (guix build-system gnu)
|
2018-11-12 11:00:33 -05:00
|
|
|
|
#:use-module (guix build-system python)
|
2014-05-01 13:16:16 -04:00
|
|
|
|
#:use-module (gnu packages)
|
2020-02-17 12:19:55 -05:00
|
|
|
|
#:use-module (gnu packages base)
|
|
|
|
|
#:use-module (gnu packages compression)
|
2019-02-17 03:58:42 -05:00
|
|
|
|
#:use-module (gnu packages fabric-management)
|
2014-05-01 13:16:16 -04:00
|
|
|
|
#:use-module (gnu packages gcc)
|
2019-03-07 05:46:16 -05:00
|
|
|
|
#:use-module (gnu packages java)
|
2019-02-01 00:03:35 -05:00
|
|
|
|
#:use-module (gnu packages libevent)
|
2014-05-09 09:49:08 -04:00
|
|
|
|
#: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)
|
2015-06-15 03:24:14 -04:00
|
|
|
|
#:use-module (gnu packages perl)
|
2014-05-09 09:49:08 -04:00
|
|
|
|
#:use-module (gnu packages ncurses)
|
2019-02-07 09:24:01 -05:00
|
|
|
|
#:use-module (gnu packages parallel)
|
2014-05-09 09:49:08 -04:00
|
|
|
|
#:use-module (gnu packages pkg-config)
|
2017-11-07 13:26:34 -05:00
|
|
|
|
#:use-module (gnu packages valgrind)
|
2018-02-06 11:33:14 -05:00
|
|
|
|
#:use-module (srfi srfi-1)
|
2017-11-07 13:26:34 -05:00
|
|
|
|
#:use-module (ice-9 match))
|
2014-05-01 13:16:16 -04:00
|
|
|
|
|
2019-11-19 04:28:22 -05:00
|
|
|
|
(define-public hwloc-1
|
2014-05-09 09:49:08 -04:00
|
|
|
|
(package
|
|
|
|
|
(name "hwloc")
|
2022-04-11 09:00:54 -04:00
|
|
|
|
(version "1.11.13")
|
2014-05-09 09:49:08 -04:00
|
|
|
|
(source (origin
|
|
|
|
|
(method url-fetch)
|
2016-04-14 04:19:40 -04:00
|
|
|
|
(uri (string-append "https://www.open-mpi.org/software/hwloc/v"
|
2015-06-14 18:11:00 -04:00
|
|
|
|
(version-major+minor version)
|
|
|
|
|
"/downloads/hwloc-" version ".tar.bz2"))
|
2014-05-09 09:49:08 -04:00
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2022-04-11 09:00:54 -04:00
|
|
|
|
"1j69p8a1pjpbpwn4w7l4dfxmaxxqikchjzqw1ncw05zmcmvlnjd4"))
|
|
|
|
|
(patches (search-patches "hwloc-1-test-btrfs.patch"))))
|
2021-03-13 16:27:18 -05:00
|
|
|
|
|
|
|
|
|
(properties
|
|
|
|
|
;; Tell the 'generic-html' updater to monitor this URL for updates.
|
|
|
|
|
`((release-monitoring-url
|
|
|
|
|
. "https://www-lb.open-mpi.org/software/hwloc/current")))
|
|
|
|
|
|
2014-05-09 09:49:08 -04:00
|
|
|
|
(build-system gnu-build-system)
|
2017-06-30 11:55:41 -04:00
|
|
|
|
(outputs '("out" ;'lstopo' & co., depends on Cairo, libx11, etc.
|
|
|
|
|
"lib" ;small closure
|
2020-11-25 16:47:39 -05:00
|
|
|
|
"doc" ;400+ section 3 man pages
|
2017-06-30 11:55:41 -04:00
|
|
|
|
"debug"))
|
2014-05-09 09:49:08 -04:00
|
|
|
|
(inputs
|
2024-04-04 10:05:30 -04:00
|
|
|
|
(append (if (%current-target-system)
|
|
|
|
|
'() ;fewer dependencies when cross-compiling
|
|
|
|
|
(list libx11 cairo ncurses expat))
|
2022-04-11 09:07:02 -04:00
|
|
|
|
(if (target-arm32?) '() (list numactl))))
|
2015-08-23 18:28:36 -04:00
|
|
|
|
(propagated-inputs
|
|
|
|
|
;; hwloc.pc lists it in 'Requires.private'.
|
2021-12-13 11:18:24 -05:00
|
|
|
|
(list libpciaccess))
|
2014-05-09 09:49:08 -04:00
|
|
|
|
(native-inputs
|
2021-12-13 11:18:24 -05:00
|
|
|
|
(list pkg-config))
|
2015-06-17 05:17:10 -04:00
|
|
|
|
(arguments
|
2017-06-30 11:31:03 -04:00
|
|
|
|
`(#:configure-flags '("--localstatedir=/var")
|
|
|
|
|
#:phases
|
2015-06-17 05:17:10 -04:00
|
|
|
|
(modify-phases %standard-phases
|
2018-04-10 08:29:33 -04:00
|
|
|
|
(add-before 'check 'skip-linux-libnuma-test
|
|
|
|
|
(lambda _
|
|
|
|
|
;; Arrange to skip 'tests/linux-libnuma', which fails on some
|
|
|
|
|
;; machines: <https://github.com/open-mpi/hwloc/issues/213>.
|
|
|
|
|
(substitute* "tests/linux-libnuma.c"
|
|
|
|
|
(("numa_available\\(\\)")
|
2022-04-11 09:08:33 -04:00
|
|
|
|
"-1"))))
|
2017-06-30 11:55:41 -04:00
|
|
|
|
(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-circular-references
|
|
|
|
|
(lambda* (#:key outputs #:allow-other-keys)
|
|
|
|
|
(let ((lib (assoc-ref outputs "lib")))
|
|
|
|
|
;; Suppress the 'prefix=' and 'exec_prefix=' lines so that the
|
|
|
|
|
;; "lib" output doesn't refer to "out".
|
|
|
|
|
(substitute* (string-append lib "/lib/pkgconfig/hwloc.pc")
|
|
|
|
|
(("^.*prefix=.*$")
|
2022-04-11 09:08:33 -04:00
|
|
|
|
"")))))
|
2020-11-25 16:47:39 -05:00
|
|
|
|
(add-after 'install 'move-man3-pages
|
|
|
|
|
(lambda* (#:key outputs #:allow-other-keys)
|
|
|
|
|
;; Move section 3 man pages to the "doc" output.
|
|
|
|
|
(let ((out (assoc-ref outputs "out"))
|
|
|
|
|
(doc (assoc-ref outputs "doc")))
|
|
|
|
|
(copy-recursively (string-append out "/share/man/man3")
|
|
|
|
|
(string-append doc "/share/man/man3"))
|
2022-04-11 09:08:33 -04:00
|
|
|
|
(delete-file-recursively
|
|
|
|
|
(string-append out "/share/man/man3"))))))))
|
2016-04-14 04:19:40 -04:00
|
|
|
|
(home-page "https://www.open-mpi.org/projects/hwloc/")
|
2014-05-09 09:49:08 -04:00
|
|
|
|
(synopsis "Abstraction of hardware architectures")
|
|
|
|
|
(description
|
|
|
|
|
"hwloc provides a portable abstraction (across OS,
|
|
|
|
|
versions, architectures, ...) of the hierarchical topology of modern
|
|
|
|
|
architectures, including NUMA memory nodes, sockets, shared caches, cores and
|
|
|
|
|
simultaneous multithreading. It also gathers various attributes such as cache
|
|
|
|
|
and memory information. It primarily aims at helping high-performance
|
|
|
|
|
computing applications with gathering information about the 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 to gather information about the hardware,
|
|
|
|
|
bind processes, and much more.")
|
2020-02-17 13:53:16 -05:00
|
|
|
|
(license license:bsd-3)))
|
2014-05-09 09:49:08 -04:00
|
|
|
|
|
2019-11-12 12:17:29 -05:00
|
|
|
|
(define-public hwloc-2
|
2018-02-06 11:33:14 -05:00
|
|
|
|
(package
|
2019-11-19 04:28:22 -05:00
|
|
|
|
(inherit hwloc-1)
|
2023-10-16 03:08:43 -04:00
|
|
|
|
(version "2.9.3")
|
2018-02-06 11:33:14 -05:00
|
|
|
|
(source (origin
|
|
|
|
|
(method url-fetch)
|
2021-03-09 17:25:52 -05:00
|
|
|
|
(uri (string-append "https://download.open-mpi.org/release/hwloc/v"
|
2018-02-06 11:33:14 -05:00
|
|
|
|
(version-major+minor version)
|
2021-03-09 17:25:52 -05:00
|
|
|
|
"/hwloc-" version ".tar.bz2"))
|
2018-02-06 11:33:14 -05:00
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2023-10-16 03:08:43 -04:00
|
|
|
|
"1v0dzzgzp40slakdwdb8vy0hy4m2ff3gnzqpzi8k8vbgap764h2w"))))
|
2018-02-06 11:33:14 -05:00
|
|
|
|
|
|
|
|
|
;; libnuma is no longer needed.
|
2022-04-11 09:05:32 -04:00
|
|
|
|
(inputs (modify-inputs (package-inputs hwloc-1)
|
|
|
|
|
(delete "numactl")))
|
2018-04-10 08:29:33 -04:00
|
|
|
|
(arguments
|
2019-11-19 05:31:41 -05:00
|
|
|
|
(substitute-keyword-arguments (package-arguments hwloc-1)
|
2018-04-10 08:29:33 -04:00
|
|
|
|
((#:phases phases)
|
|
|
|
|
`(modify-phases ,phases
|
|
|
|
|
(replace 'skip-linux-libnuma-test
|
|
|
|
|
(lambda _
|
|
|
|
|
;; Arrange to skip 'tests/hwloc/linux-libnuma', which fails on
|
|
|
|
|
;; some machines: <https://github.com/open-mpi/hwloc/issues/213>.
|
|
|
|
|
(substitute* "tests/hwloc/linux-libnuma.c"
|
|
|
|
|
(("numa_available\\(\\)")
|
2022-04-11 09:08:33 -04:00
|
|
|
|
"-1"))))
|
2023-02-13 16:01:12 -05:00
|
|
|
|
(add-before 'check 'skip-tests-that-require-/sys
|
2023-01-10 04:02:56 -05:00
|
|
|
|
(lambda _
|
|
|
|
|
;; 'test-gather-topology.sh' requires /sys as of 2.9.0; skip it.
|
2023-04-03 05:46:19 -04:00
|
|
|
|
(setenv "HWLOC_TEST_GATHER_TOPOLOGY" "0")))
|
2020-03-31 05:06:30 -04:00
|
|
|
|
(add-before 'check 'skip-test-that-fails-on-qemu
|
|
|
|
|
(lambda _
|
|
|
|
|
;; Skip test that fails on emulated hardware due to QEMU bug:
|
|
|
|
|
;; <https://bugs.gnu.org/40342>.
|
|
|
|
|
(substitute* "tests/hwloc/hwloc_get_last_cpu_location.c"
|
|
|
|
|
(("hwloc_topology_init" all)
|
2022-04-11 09:08:33 -04:00
|
|
|
|
(string-append "exit (77);\n" all)))))))))))
|
2018-02-06 11:33:14 -05:00
|
|
|
|
|
2019-11-19 04:28:22 -05:00
|
|
|
|
(define-public hwloc
|
|
|
|
|
;; The latest stable series of hwloc.
|
|
|
|
|
hwloc-2)
|
|
|
|
|
|
2014-05-01 13:16:16 -04:00
|
|
|
|
(define-public openmpi
|
|
|
|
|
(package
|
|
|
|
|
(name "openmpi")
|
2023-10-16 03:12:23 -04:00
|
|
|
|
(version "4.1.6")
|
2014-05-01 13:16:16 -04:00
|
|
|
|
(source
|
|
|
|
|
(origin
|
2023-02-23 09:49:09 -05:00
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append "https://www.open-mpi.org/software/ompi/v"
|
|
|
|
|
(version-major+minor version)
|
|
|
|
|
"/downloads/openmpi-" version ".tar.bz2"))
|
|
|
|
|
(sha256
|
2023-10-16 03:12:23 -04:00
|
|
|
|
(base32 "05g4245v0pdqcyjmgn50519ry5v5q8ig26iinmiynvaihm29jh7p"))
|
2023-02-23 09:49:09 -05:00
|
|
|
|
(patches (search-patches "openmpi-mtl-priorities.patch"))))
|
2021-03-18 10:17:48 -04:00
|
|
|
|
|
|
|
|
|
(properties
|
|
|
|
|
;; Tell the 'generic-html' updater to monitor this URL for updates.
|
|
|
|
|
`((release-monitoring-url
|
|
|
|
|
. "https://www.open-mpi.org/software/ompi/current")))
|
|
|
|
|
|
2014-05-01 13:16:16 -04:00
|
|
|
|
(build-system gnu-build-system)
|
2014-05-12 17:43:04 -04:00
|
|
|
|
(inputs
|
2022-04-11 09:30:55 -04:00
|
|
|
|
(let ((if-supported
|
|
|
|
|
(lambda (package)
|
|
|
|
|
(if (and (not (%current-target-system))
|
|
|
|
|
(member (%current-system)
|
|
|
|
|
(package-supported-systems package)))
|
|
|
|
|
(list package)
|
|
|
|
|
'()))))
|
|
|
|
|
(append (list `(,hwloc-2 "lib")
|
|
|
|
|
gfortran
|
|
|
|
|
libfabric
|
|
|
|
|
libevent
|
|
|
|
|
opensm)
|
|
|
|
|
(if-supported psm)
|
|
|
|
|
(if-supported psm2)
|
|
|
|
|
(if-supported ucx)
|
2022-07-12 14:33:27 -04:00
|
|
|
|
(if-supported valgrind)
|
2022-04-11 09:30:55 -04:00
|
|
|
|
(list rdma-core
|
|
|
|
|
slurm)))) ;for PMI support (launching via "srun")
|
2014-05-12 17:43:04 -04:00
|
|
|
|
(native-inputs
|
2021-12-13 11:18:24 -05:00
|
|
|
|
(list pkg-config perl))
|
2017-10-02 16:54:43 -04:00
|
|
|
|
(outputs '("out" "debug"))
|
2014-05-01 13:16:16 -04:00
|
|
|
|
(arguments
|
2023-02-23 09:49:09 -05:00
|
|
|
|
(list
|
|
|
|
|
#:configure-flags #~`("--enable-mpi-ext=affinity" ;cr doesn't work
|
|
|
|
|
"--with-sge"
|
2022-07-12 14:33:27 -04:00
|
|
|
|
|
2023-02-23 09:49:09 -05:00
|
|
|
|
#$@(if (package? (this-package-input "valgrind"))
|
|
|
|
|
#~("--enable-memchecker"
|
|
|
|
|
"--with-valgrind")
|
|
|
|
|
#~("--without-valgrind"))
|
2022-07-12 14:33:27 -04:00
|
|
|
|
|
2023-02-23 09:49:09 -05:00
|
|
|
|
"--with-hwloc=external"
|
|
|
|
|
"--with-libevent"
|
2019-02-17 03:58:42 -05:00
|
|
|
|
|
2023-02-23 09:49:09 -05:00
|
|
|
|
;; Help 'orterun' and 'mpirun' find their tools
|
|
|
|
|
;; under $prefix by default.
|
|
|
|
|
"--enable-mpirun-prefix-by-default"
|
2020-09-24 09:08:15 -04:00
|
|
|
|
|
2023-02-23 09:49:09 -05:00
|
|
|
|
;; InfiniBand support
|
|
|
|
|
"--enable-openib-control-hdr-padding"
|
|
|
|
|
"--enable-openib-dynamic-sl"
|
|
|
|
|
"--enable-openib-udcm"
|
|
|
|
|
"--enable-openib-rdmacm"
|
|
|
|
|
"--enable-openib-rdmacm-ibaddr"
|
2019-02-17 03:58:42 -05:00
|
|
|
|
|
2023-09-07 09:06:03 -04:00
|
|
|
|
;; Enable support for the 'Process Management
|
|
|
|
|
;; Interface for Exascale' (PMIx) used e.g. by
|
|
|
|
|
;; Slurm for the management communication and
|
|
|
|
|
;; coordination of MPI processes.
|
|
|
|
|
"--with-pmix=internal"
|
|
|
|
|
|
2023-02-23 09:49:09 -05:00
|
|
|
|
;; Enable support for SLURM's Process Manager
|
|
|
|
|
;; Interface (PMI).
|
|
|
|
|
,(string-append "--with-pmi="
|
|
|
|
|
#$(this-package-input "slurm")))
|
|
|
|
|
#:phases #~(modify-phases %standard-phases
|
|
|
|
|
;; opensm is needed for InfiniBand support.
|
|
|
|
|
(add-after 'unpack 'find-opensm-headers
|
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
|
(setenv "C_INCLUDE_PATH"
|
|
|
|
|
(search-input-directory inputs
|
|
|
|
|
"/include/infiniband"))
|
|
|
|
|
(setenv "CPLUS_INCLUDE_PATH"
|
|
|
|
|
(search-input-directory inputs
|
|
|
|
|
"/include/infiniband"))))
|
|
|
|
|
(add-before 'build 'remove-absolute
|
|
|
|
|
(lambda _
|
|
|
|
|
;; Remove compiler absolute file names (OPAL_FC_ABSOLUTE
|
|
|
|
|
;; etc.) to reduce the closure size. See
|
|
|
|
|
;; <https://lists.gnu.org/archive/html/guix-devel/2017-07/msg00388.html>
|
|
|
|
|
;; and
|
|
|
|
|
;; <https://www.mail-archive.com/users@lists.open-mpi.org//msg31397.html>.
|
|
|
|
|
(substitute* '("orte/tools/orte-info/param.c"
|
|
|
|
|
"oshmem/tools/oshmem_info/param.c"
|
|
|
|
|
"ompi/tools/ompi_info/param.c")
|
|
|
|
|
(("_ABSOLUTE") ""))
|
|
|
|
|
;; Avoid valgrind (which pulls in gdb etc.).
|
|
|
|
|
(substitute*
|
|
|
|
|
'("./ompi/mca/io/romio321/src/io_romio321_component.c")
|
|
|
|
|
(("MCA_io_romio321_COMPLETE_CONFIGURE_FLAGS")
|
|
|
|
|
"\"[elided to reduce closure]\""))))
|
|
|
|
|
(add-before 'build 'scrub-timestamps ;reproducibility
|
|
|
|
|
(lambda _
|
|
|
|
|
(substitute* '("ompi/tools/ompi_info/param.c"
|
|
|
|
|
"orte/tools/orte-info/param.c"
|
|
|
|
|
"oshmem/tools/oshmem_info/param.c")
|
|
|
|
|
((".*(Built|Configured) on.*") ""))))
|
|
|
|
|
(add-after 'install 'remove-logs ;reproducibility
|
|
|
|
|
(lambda* (#:key outputs #:allow-other-keys)
|
|
|
|
|
(let ((out (assoc-ref outputs "out")))
|
|
|
|
|
(for-each delete-file (find-files out "config.log"))))))))
|
2020-01-18 16:14:45 -05:00
|
|
|
|
(home-page "https://www.open-mpi.org")
|
2017-07-23 17:30:40 -04:00
|
|
|
|
(synopsis "MPI-3 implementation")
|
2014-05-01 13:16:16 -04:00
|
|
|
|
(description
|
2017-07-23 17:30:40 -04:00
|
|
|
|
"The Open MPI Project is an MPI-3 implementation that is developed and
|
2014-05-08 15:48:59 -04:00
|
|
|
|
maintained by a consortium of academic, research, and industry partners. Open
|
|
|
|
|
MPI is therefore able to combine the expertise, technologies, and resources
|
|
|
|
|
from all across the High Performance Computing community in order to build the
|
|
|
|
|
best MPI library available. Open MPI offers advantages for system and
|
|
|
|
|
software vendors, application developers and computer science researchers.")
|
2014-05-01 13:16:16 -04:00
|
|
|
|
;; See file://LICENSE
|
2020-02-17 13:53:16 -05:00
|
|
|
|
(license license:bsd-2)))
|
2017-07-27 10:52:34 -04:00
|
|
|
|
|
2021-12-02 09:28:13 -05:00
|
|
|
|
(define-public openmpi-c++
|
|
|
|
|
(package/inherit openmpi
|
|
|
|
|
(name "openmpi-c++")
|
|
|
|
|
(outputs '("out"))
|
|
|
|
|
(arguments
|
|
|
|
|
(substitute-keyword-arguments (package-arguments openmpi)
|
|
|
|
|
((#:configure-flags flags)
|
2023-02-27 04:34:09 -05:00
|
|
|
|
#~(cons "--enable-mpi-cxx" #$flags))))
|
2021-12-02 09:28:13 -05:00
|
|
|
|
(synopsis "C++ bindings for MPI")))
|
|
|
|
|
|
2019-03-07 05:46:16 -05:00
|
|
|
|
;; TODO: javadoc files contain timestamps.
|
|
|
|
|
(define-public java-openmpi
|
gnu: Use PACKAGE/INHERIT in more places.
* gnu/packages/algebra.scm (fftwf, fftw-openmpi),
gnu/packages/audio.scm (ztoolkit-rsvg),
gnu/packages/bioinformatics.scm (python2-dendropy),
gnu/packages/boost.scm (boost-with-python2),
gnu/packages/check.scm (python2-mock, python2-pytest-mock),
gnu/packages/cups.scm (hplip-minimal),
gnu/packages/freedesktop.scm (libinput-minimal),
gnu/packages/gettext.scm (gnu-gettext),
gnu/packages/glib.scm (python2-pygobject),
gnu/packages/gnome.scm (gdl-minimal, libsoup-minimal, python2-pyatspi),
gnu/packages/groff.scm (groff-minimal),
gnu/packages/jami.scm (ffmpeg-jami),
gnu/packages/libcanberra.scm (libcanberra/gtk+-2),
gnu/packages/lirc.scm (python2-lirc),
gnu/packages/llvm.scm (clang-runtime-3.5),
gnu/packages/mpi.scm (java-openmpi, openmpi-thread-multiple),
gnu/packages/node.scm (libnode),
gnu/packages/onc-rpc.scm (libtirpc/hurd),
gnu/packages/python-compression.scm (bitshuffle-for-snappy),
gnu/packages/python-crypto.scm (python2-pycrypto, python2-cryptography)
(python2-cryptography, python2-m2crypto),
gnu/packages/python-web.scm (python2-html2text, python2-tornado)
(python2-terminado, python2-ndg-httpsclient, python2-websocket-client)
(python2-rauth, python2-url, python2-s3transfer),
gnu/packages/python-xyz.scm (python2-psutil, python2-serpent)
(python2-humanfriendly, python2-empy, python2-parse-type, python2-polib)
(python2-jsonschema, python2-pystache, python2-cython, python2-numpydoc)
(python2-ipyparallel, python2-traitlets, python2-dbus)
(python2-beautifulsoup4, python2-pep517, python2-flake8, python2-llfuse)
(python2-tlsh, python-file, python2-notebook, python-jupyter-console-minimal)
(python2-contextlib2, python2-promise, python2-anyjson, python2-amqp)
(python2-kombu, python2-billiard, python2-celery, python2-whoosh)
(python2-jellyfish, python-rope, ptpython-2, python2-binaryornot)
(python2-setproctitle, python2-argcomplete, python2-xopen, python2-isort)
(python2-radon, python2-rfc6555, python2-activepapers, python2-send2trash)
(python2-cloudpickle, python2-reparser),
gnu/packages/python.scm (python2-called-python),
gnu/packages/qt.scm (python2-sip, python-pyqt-without-qtwebkit, python2-pyqt)
(python-qscintilla, python-pyqt+qscintilla),
gnu/packages/scanner.scm (sane-backends),
gnu/packages/sdl.scm (guile3.0-sdl2),
gnu/packages/selinux.scm (checkpolicy, libselinux, libsemanage, secilc)
(python-sepolgen, policycoreutils),
gnu/packages/serialization.scm (lua5.1-libmpack, lua5.2-libmpack),
gnu/packages/simulation.scm (fenics),
gnu/packages/statistics.scm (python2-statsmodels),
gnu/packages/texinfo.scm (info-reader),
gnu/packages/wxwidgets.scm (wxwidgets-gtk2, wxwidgets-gtk2-3.1),
gnu/packages/xml.scm (xmlsec-nss),
gnu/packages/xorg.scm (uim-gtk, uim-qt),
guix/build-system/python.scm (package-with-explicit-python)
(strip-python2-variant): Use PACKAGE/INHERIT.
2021-03-17 03:42:12 -04:00
|
|
|
|
(package/inherit openmpi
|
2019-03-07 05:46:16 -05:00
|
|
|
|
(name "java-openmpi")
|
|
|
|
|
(inputs
|
|
|
|
|
`(("openmpi" ,openmpi)
|
|
|
|
|
,@(package-inputs openmpi)))
|
|
|
|
|
(native-inputs
|
|
|
|
|
`(("jdk" ,openjdk11 "jdk")
|
|
|
|
|
("zip" ,(@ (gnu packages compression) zip))
|
|
|
|
|
,@(package-native-inputs openmpi)))
|
|
|
|
|
(outputs '("out"))
|
|
|
|
|
(arguments
|
2023-02-27 04:34:09 -05:00
|
|
|
|
(cons*
|
|
|
|
|
#:modules '((guix build gnu-build-system)
|
2019-03-07 05:46:16 -05:00
|
|
|
|
((guix build ant-build-system) #:prefix ant:)
|
|
|
|
|
(guix build utils))
|
2023-02-27 04:34:09 -05:00
|
|
|
|
#:imported-modules `((guix build ant-build-system)
|
2019-03-07 05:46:16 -05:00
|
|
|
|
,@%gnu-build-system-modules)
|
2023-02-27 04:34:09 -05:00
|
|
|
|
(substitute-keyword-arguments (package-arguments openmpi)
|
|
|
|
|
((#:configure-flags flags)
|
|
|
|
|
#~(cons "--enable-mpi-java" #$flags))
|
|
|
|
|
((#:make-flags flags ''())
|
|
|
|
|
#~(append '("-C" "ompi/mpi/java")
|
|
|
|
|
#$flags))
|
|
|
|
|
((#:phases phases)
|
|
|
|
|
#~(modify-phases #$phases
|
|
|
|
|
;; We could provide the location of the JDK in the configure
|
|
|
|
|
;; flags, but since the configure flags are embedded in the
|
|
|
|
|
;; info binaries that would leave a reference to the JDK in
|
|
|
|
|
;; the "out" output. To avoid this we set JAVA_HOME.
|
|
|
|
|
(add-after 'unpack 'set-JAVA_HOME
|
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
|
(setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
|
|
|
|
|
#t))
|
|
|
|
|
(add-after 'unpack 'link-with-existing-mpi-libraries
|
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
|
(substitute* "ompi/mpi/java/c/Makefile.in"
|
|
|
|
|
(("\\$\\(top_builddir\\)/ompi/lib@OMPI_LIBMPI_NAME@.la")
|
|
|
|
|
(search-input-file inputs "/lib/libmpi.la")))))
|
|
|
|
|
(add-after 'install 'strip-jar-timestamps
|
|
|
|
|
(assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
|
2019-03-07 05:46:16 -05:00
|
|
|
|
(synopsis "Java bindings for MPI")))
|
|
|
|
|
|
2017-07-27 10:52:34 -04:00
|
|
|
|
(define-public openmpi-thread-multiple
|
gnu: Use PACKAGE/INHERIT in more places.
* gnu/packages/algebra.scm (fftwf, fftw-openmpi),
gnu/packages/audio.scm (ztoolkit-rsvg),
gnu/packages/bioinformatics.scm (python2-dendropy),
gnu/packages/boost.scm (boost-with-python2),
gnu/packages/check.scm (python2-mock, python2-pytest-mock),
gnu/packages/cups.scm (hplip-minimal),
gnu/packages/freedesktop.scm (libinput-minimal),
gnu/packages/gettext.scm (gnu-gettext),
gnu/packages/glib.scm (python2-pygobject),
gnu/packages/gnome.scm (gdl-minimal, libsoup-minimal, python2-pyatspi),
gnu/packages/groff.scm (groff-minimal),
gnu/packages/jami.scm (ffmpeg-jami),
gnu/packages/libcanberra.scm (libcanberra/gtk+-2),
gnu/packages/lirc.scm (python2-lirc),
gnu/packages/llvm.scm (clang-runtime-3.5),
gnu/packages/mpi.scm (java-openmpi, openmpi-thread-multiple),
gnu/packages/node.scm (libnode),
gnu/packages/onc-rpc.scm (libtirpc/hurd),
gnu/packages/python-compression.scm (bitshuffle-for-snappy),
gnu/packages/python-crypto.scm (python2-pycrypto, python2-cryptography)
(python2-cryptography, python2-m2crypto),
gnu/packages/python-web.scm (python2-html2text, python2-tornado)
(python2-terminado, python2-ndg-httpsclient, python2-websocket-client)
(python2-rauth, python2-url, python2-s3transfer),
gnu/packages/python-xyz.scm (python2-psutil, python2-serpent)
(python2-humanfriendly, python2-empy, python2-parse-type, python2-polib)
(python2-jsonschema, python2-pystache, python2-cython, python2-numpydoc)
(python2-ipyparallel, python2-traitlets, python2-dbus)
(python2-beautifulsoup4, python2-pep517, python2-flake8, python2-llfuse)
(python2-tlsh, python-file, python2-notebook, python-jupyter-console-minimal)
(python2-contextlib2, python2-promise, python2-anyjson, python2-amqp)
(python2-kombu, python2-billiard, python2-celery, python2-whoosh)
(python2-jellyfish, python-rope, ptpython-2, python2-binaryornot)
(python2-setproctitle, python2-argcomplete, python2-xopen, python2-isort)
(python2-radon, python2-rfc6555, python2-activepapers, python2-send2trash)
(python2-cloudpickle, python2-reparser),
gnu/packages/python.scm (python2-called-python),
gnu/packages/qt.scm (python2-sip, python-pyqt-without-qtwebkit, python2-pyqt)
(python-qscintilla, python-pyqt+qscintilla),
gnu/packages/scanner.scm (sane-backends),
gnu/packages/sdl.scm (guile3.0-sdl2),
gnu/packages/selinux.scm (checkpolicy, libselinux, libsemanage, secilc)
(python-sepolgen, policycoreutils),
gnu/packages/serialization.scm (lua5.1-libmpack, lua5.2-libmpack),
gnu/packages/simulation.scm (fenics),
gnu/packages/statistics.scm (python2-statsmodels),
gnu/packages/texinfo.scm (info-reader),
gnu/packages/wxwidgets.scm (wxwidgets-gtk2, wxwidgets-gtk2-3.1),
gnu/packages/xml.scm (xmlsec-nss),
gnu/packages/xorg.scm (uim-gtk, uim-qt),
guix/build-system/python.scm (package-with-explicit-python)
(strip-python2-variant): Use PACKAGE/INHERIT.
2021-03-17 03:42:12 -04:00
|
|
|
|
(package/inherit openmpi
|
2017-07-27 10:52:34 -04:00
|
|
|
|
(name "openmpi-thread-multiple")
|
|
|
|
|
(arguments
|
|
|
|
|
(substitute-keyword-arguments (package-arguments openmpi)
|
|
|
|
|
((#:configure-flags flags)
|
2023-02-27 04:34:09 -05:00
|
|
|
|
#~(cons "--enable-mpi-thread-multiple" #$flags))))
|
2022-10-31 20:08:32 -04:00
|
|
|
|
(description "This version of Open@tie{}MPI has an implementation of
|
2017-07-27 10:52:34 -04:00
|
|
|
|
@code{MPI_Init_thread} that provides @code{MPI_THREAD_MULTIPLE}. This won't
|
|
|
|
|
work correctly with all transports (such as @code{openib}), and the
|
|
|
|
|
performance is generally worse than the vanilla @code{openmpi} package, which
|
|
|
|
|
only provides @code{MPI_THREAD_FUNNELED}.")))
|
2018-08-16 16:47:41 -04:00
|
|
|
|
|
|
|
|
|
;;; Build phase to be used for packages that execute MPI code.
|
|
|
|
|
(define-public %openmpi-setup
|
|
|
|
|
'(lambda _
|
|
|
|
|
;; By default, running the test suite would fail because 'ssh' could not
|
|
|
|
|
;; be found in $PATH. Define this variable to placate Open MPI without
|
|
|
|
|
;; adding a dependency on OpenSSH (the agent isn't used anyway.)
|
|
|
|
|
(setenv "OMPI_MCA_plm_rsh_agent" (which "false"))
|
|
|
|
|
;; Allow oversubscription in case there are less physical cores available
|
|
|
|
|
;; in the build environment than the package wants while testing.
|
2019-02-01 00:03:35 -05:00
|
|
|
|
(setenv "OMPI_MCA_rmaps_base_mapping_policy" "core:OVERSUBSCRIBE")
|
2019-11-16 11:19:17 -05:00
|
|
|
|
|
|
|
|
|
;; UCX sometimes outputs uninteresting warnings such as:
|
|
|
|
|
;;
|
|
|
|
|
;; mpool.c:38 UCX WARN object 0x7ffff44fffc0 was not returned to mpool ucp_am_bufs
|
|
|
|
|
;;
|
|
|
|
|
;; These in turn leads to failures of test suites that capture and
|
|
|
|
|
;; compare stdout, such as that of 'hdf5-parallel-openmpi'. Thus, tell
|
|
|
|
|
;; UCX to not emit those warnings.
|
|
|
|
|
(setenv "UCX_LOG_LEVEL" "error")
|
2023-01-10 04:02:56 -05:00
|
|
|
|
|
|
|
|
|
;; Starting from 2.9.0, hwloc fails when /sys is unavailable:
|
|
|
|
|
;;
|
|
|
|
|
;; [hwloc/linux] failed to find sysfs cpu topology directory, aborting linux discovery.
|
|
|
|
|
;;
|
|
|
|
|
;; This in turn breaks Open MPI users. To work around it, define a fake
|
|
|
|
|
;; topology with 4 cores. That silently disables CPU binding, though
|
|
|
|
|
;; 'get_cpubind' will report there's no binding.
|
|
|
|
|
(setenv "HWLOC_SYNTHETIC" "4")
|
2018-08-16 16:47:41 -04:00
|
|
|
|
#t))
|
2018-11-12 11:00:33 -05:00
|
|
|
|
|
|
|
|
|
(define-public python-mpi4py
|
|
|
|
|
(package
|
|
|
|
|
(name "python-mpi4py")
|
2023-05-23 10:17:26 -04:00
|
|
|
|
(version "3.1.4")
|
2018-11-12 11:00:33 -05:00
|
|
|
|
(source
|
2019-11-08 17:10:24 -05:00
|
|
|
|
(origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (pypi-uri "mpi4py" version))
|
|
|
|
|
(sha256
|
2023-05-23 10:17:26 -04:00
|
|
|
|
(base32 "101lz7bnm9l17nrkbg6497kxscyh53aah7qd2b820ck2php8z18p"))))
|
2018-11-12 11:00:33 -05:00
|
|
|
|
(build-system python-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:phases
|
|
|
|
|
(modify-phases %standard-phases
|
|
|
|
|
(add-after 'build 'mpi-setup
|
|
|
|
|
,%openmpi-setup)
|
|
|
|
|
(add-before 'check 'pre-check
|
|
|
|
|
(lambda _
|
|
|
|
|
;; Skip BaseTestSpawn class (causes error 'ompi_dpm_dyn_init()
|
|
|
|
|
;; failed --> Returned "Unreachable"' in chroot environment).
|
|
|
|
|
(substitute* "test/test_spawn.py"
|
|
|
|
|
(("unittest.skipMPI\\('openmpi\\(<3.0.0\\)'\\)")
|
|
|
|
|
"unittest.skipMPI('openmpi')"))
|
|
|
|
|
#t)))))
|
|
|
|
|
(inputs
|
2021-12-13 11:18:24 -05:00
|
|
|
|
(list openmpi))
|
2023-05-28 17:02:27 -04:00
|
|
|
|
(properties
|
|
|
|
|
'((updater-extra-inputs . ("openmpi"))))
|
2023-05-18 11:56:34 -04:00
|
|
|
|
(home-page "https://github.com/mpi4py/mpi4py")
|
2018-11-12 11:00:33 -05:00
|
|
|
|
(synopsis "Python bindings for the Message Passing Interface standard")
|
|
|
|
|
(description "MPI for Python (mpi4py) provides bindings of the Message
|
|
|
|
|
Passing Interface (MPI) standard for the Python programming language, allowing
|
|
|
|
|
any Python program to exploit multiple processors.
|
|
|
|
|
|
|
|
|
|
mpi4py is constructed on top of the MPI-1/MPI-2 specification and provides an
|
|
|
|
|
object oriented interface which closely follows MPI-2 C++ bindings. It
|
|
|
|
|
supports point-to-point and collective communications of any picklable Python
|
|
|
|
|
object as well as optimized communications of Python objects (such as NumPy
|
|
|
|
|
arrays) that expose a buffer interface.")
|
2020-02-17 13:53:16 -05:00
|
|
|
|
(license license:bsd-3)))
|
2020-02-17 12:19:55 -05:00
|
|
|
|
|
|
|
|
|
(define-public mpich
|
|
|
|
|
(package
|
|
|
|
|
(name "mpich")
|
|
|
|
|
(version "3.3.2")
|
|
|
|
|
(source (origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append "http://www.mpich.org/static/downloads/"
|
|
|
|
|
version "/mpich-" version ".tar.gz"))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
|
|
|
|
"1farz5zfx4cd0c3a0wb9pgfypzw0xxql1j1294z1sxslga1ziyjb"))))
|
|
|
|
|
(build-system gnu-build-system)
|
|
|
|
|
(inputs
|
2022-01-17 10:17:15 -05:00
|
|
|
|
`(,zlib
|
|
|
|
|
(,hwloc-2 "lib")
|
|
|
|
|
,slurm
|
2020-02-17 12:19:55 -05:00
|
|
|
|
,@(if (and (not (%current-target-system))
|
|
|
|
|
(member (%current-system) (package-supported-systems ucx)))
|
2022-01-17 10:17:15 -05:00
|
|
|
|
(list ucx)
|
2020-02-17 12:19:55 -05:00
|
|
|
|
'())))
|
|
|
|
|
(native-inputs
|
2021-12-13 11:18:24 -05:00
|
|
|
|
(list perl which gfortran))
|
2020-02-17 12:19:55 -05:00
|
|
|
|
(outputs '("out" "debug"))
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:configure-flags
|
|
|
|
|
(list "--disable-silent-rules" ;let's see what's happening
|
|
|
|
|
"--enable-debuginfo"
|
2020-11-02 03:11:32 -05:00
|
|
|
|
|
|
|
|
|
;; Default to "ch4", as will be the case in 3.4. It also works
|
|
|
|
|
;; around issues when running test suites of packages that use
|
|
|
|
|
;; MPICH: <https://issues.guix.gnu.org/39588#15>.
|
|
|
|
|
"--with-device=ch4:ucx" ; --with-device=ch4:ofi segfaults in tests
|
|
|
|
|
|
2020-02-17 12:19:55 -05:00
|
|
|
|
(string-append "--with-hwloc-prefix="
|
|
|
|
|
(assoc-ref %build-inputs "hwloc"))
|
|
|
|
|
|
|
|
|
|
,@(if (assoc "ucx" (package-inputs this-package))
|
|
|
|
|
`((string-append "--with-ucx="
|
|
|
|
|
(assoc-ref %build-inputs "ucx")))
|
|
|
|
|
'()))
|
|
|
|
|
|
|
|
|
|
#:phases (modify-phases %standard-phases
|
|
|
|
|
(add-after 'unpack 'patch-sources
|
|
|
|
|
(lambda _
|
|
|
|
|
(substitute* "./maint/gen_subcfg_m4"
|
|
|
|
|
(("/usr/bin/env") (which "env")))
|
|
|
|
|
(substitute* "src/glue/romio/all_romio_symbols"
|
|
|
|
|
(("/usr/bin/env") (which "env")))
|
|
|
|
|
(substitute* (find-files "." "buildiface")
|
|
|
|
|
(("/usr/bin/env") (which "env")))
|
|
|
|
|
(substitute* "maint/extracterrmsgs"
|
|
|
|
|
(("/usr/bin/env") (which "env")))
|
|
|
|
|
(substitute* (find-files "." "f77tof90")
|
|
|
|
|
(("/usr/bin/env") (which "env")))
|
|
|
|
|
(substitute* (find-files "." "\\.sh$")
|
2022-01-17 10:17:15 -05:00
|
|
|
|
(("/bin/sh") (which "sh")))))
|
2020-02-17 12:19:55 -05:00
|
|
|
|
(add-before 'configure 'fix-makefile
|
|
|
|
|
(lambda _
|
|
|
|
|
;; Remove "@hwloclib@" from 'pmpi_convenience_libs'.
|
|
|
|
|
;; This fixes "No rule to make target '-lhwloc', needed
|
|
|
|
|
;; by 'lib/libmpi.la'".
|
|
|
|
|
(substitute* "Makefile.in"
|
|
|
|
|
(("^pmpi_convenience_libs = (.*) @hwloclib@ (.*)$" _
|
|
|
|
|
before after)
|
|
|
|
|
(string-append "pmpi_convenience_libs = "
|
2022-01-17 10:17:15 -05:00
|
|
|
|
before " " after)))))
|
2022-01-17 10:03:57 -05:00
|
|
|
|
(add-before 'configure 'define-gfortran-wrapper
|
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
|
;; 'configure' checks whether the Fortran compiler
|
|
|
|
|
;; allows argument type mismatch. Since gfortran >= 10
|
|
|
|
|
;; does not, provide a wrapper that passes
|
|
|
|
|
;; '-fallow-argument-mismatch' to get the desired
|
|
|
|
|
;; behavior.
|
|
|
|
|
(mkdir-p ".gfortran-wrapper/bin")
|
|
|
|
|
(call-with-output-file ".gfortran-wrapper/bin/gfortran"
|
|
|
|
|
(lambda (port)
|
|
|
|
|
(display (string-append "#!" (which "sh") "\n")
|
|
|
|
|
port)
|
|
|
|
|
(display
|
|
|
|
|
(string-append "exec \"" (which "gfortran")
|
|
|
|
|
"\" -fallow-argument-mismatch"
|
|
|
|
|
" \"$@\"\n")
|
|
|
|
|
port)
|
|
|
|
|
(chmod port #o755)))
|
|
|
|
|
|
|
|
|
|
(setenv "PATH"
|
|
|
|
|
(string-append (getcwd) "/"
|
|
|
|
|
".gfortran-wrapper/bin:"
|
|
|
|
|
(getenv "PATH"))))))))
|
2020-02-17 12:19:55 -05:00
|
|
|
|
(home-page "https://www.mpich.org/")
|
|
|
|
|
(synopsis "Implementation of the Message Passing Interface (MPI)")
|
|
|
|
|
(description
|
|
|
|
|
"MPICH is a high-performance and portable implementation of the Message
|
|
|
|
|
Passing Interface (MPI) standard (MPI-1, MPI-2 and MPI-3). MPICH provides an
|
|
|
|
|
MPI implementation that efficiently supports different computation and
|
|
|
|
|
communication platforms including commodity clusters, high-speed networks (10
|
|
|
|
|
Gigabit Ethernet, InfiniBand, Myrinet, Quadrics), and proprietary high-end
|
|
|
|
|
computing systems (Blue Gene, Cray). It enables research in MPI through a
|
|
|
|
|
modular framework for other derived implementations.")
|
2020-02-17 13:53:16 -05:00
|
|
|
|
(license license:bsd-2)))
|