projects/guix·blob python-team · refs

266 lines · 10.9 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2017 Dave Love <[email protected]>
3;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <[email protected]>
4;;; Copyright © 2019 Ricardo Wurmus <[email protected]>
5;;; Copyright © 2019, 2023, 2026 Ludovic Courtès <[email protected]>
6;;;
7;;; This file is part of GNU Guix.
8;;;
9;;; GNU Guix is free software; you can redistribute it and/or modify it
10;;; under the terms of the GNU General Public License as published by
11;;; the Free Software Foundation; either version 3 of the License, or (at
12;;; your option) any later version.
13;;;
14;;; GNU Guix is distributed in the hope that it will be useful, but
15;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;;; GNU General Public License for more details.
18;;;
19;;; You should have received a copy of the GNU General Public License
20;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22(define-module (gnu packages fabric-management)
23 #:use-module (guix gexp)
24 #:use-module (guix packages)
25 #:use-module (guix licenses)
26 #:use-module (guix download)
27 #:use-module (guix git-download)
28 #:use-module (guix utils)
29 #:use-module (guix build-system gnu)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages autotools)
32 #:use-module (gnu packages bison)
33 #:use-module (gnu packages compiler-tools)
34 #:use-module (gnu packages glib)
35 #:use-module (gnu packages graphviz)
36 #:use-module (gnu packages linux)
37 #:use-module (gnu packages perl)
38 #:use-module (gnu packages pkg-config)
39 #:use-module (gnu packages rocm)
40 #:use-module (gnu packages swig)
41 #:use-module (gnu packages tcl))
42
43;; Fixme: Done for the library, but needs support for running the daemon
44;; (shepherd definition).
45;; We should probably have a lib output, but that currently generates
46;; a cycle.
47(define-public opensm
48 (package
49 (name "opensm")
50 (version "3.3.24")
51 (source
52 (origin
53 (method url-fetch)
54 (uri
55 (string-append "https://github.com/linux-rdma/opensm/releases/download/"
56 version "/opensm-" version ".tar.gz"))
57 (sha256
58 (base32 "0q74sx8y23h7picdzb4g5r84wcvc9hr9vzsdawkl812b38vmwcx3"))))
59 (build-system gnu-build-system)
60 (native-inputs
61 (list bison
62 flex
63 ;; The 3.3.21 'release' tarball isn't properly bootstrapped.
64 autoconf
65 automake
66 libtool))
67 (inputs
68 (list rdma-core))
69 (arguments
70 (list
71 #:configure-flags #~'("--disable-static")
72 #:phases
73 #~(modify-phases %standard-phases
74 (add-after 'install 'install-doc
75 (lambda* (#:key outputs #:allow-other-keys)
76 (let* ((base (assoc-ref outputs "out"))
77 (doc (string-append base "/share/doc/"
78 #$(package-name this-package)
79 "-"
80 #$(package-version this-package))))
81 (for-each (lambda (file)
82 (install-file file doc))
83 (find-files "doc"))))))))
84 (home-page "https://www.openfabrics.org/")
85 (synopsis "OpenIB InfiniBand Subnet Manager and management utilities")
86 (description "\
87OpenSM is the OpenIB project's Subnet Manager for Infiniband networks.
88The subnet manager is run as a system daemon on one of the machines in
89the infiniband fabric to manage the fabric's routing state. This package
90also contains various tools for diagnosing and testing Infiniband networks
91that can be used from any machine and do not need to be run on a machine
92running the opensm daemon.")
93 (license (list gpl2 bsd-2))))
94
95(define-public infiniband-diags
96 (package
97 (name "infiniband-diags")
98 (version "2.0.0")
99 (source
100 (origin
101 (method url-fetch)
102 (uri (string-append "https://github.com/linux-rdma/infiniband-diags/releases"
103 "/download/" version
104 "/infiniband-diags-" version ".tar.gz"))
105 (sha256
106 (base32 "11dbdnsx5hcvg6jh4ipm5j9wg420avpxw1jbsaj3zf4kwc5hw9id"))))
107 (build-system gnu-build-system)
108 (inputs
109 (list rdma-core opensm glib))
110 (outputs '("out" "lib"))
111 (native-inputs
112 ;; FIXME: needs rst2man for man pages
113 (list perl pkg-config))
114 (arguments
115 (list #:configure-flags
116 #~(list (string-append "CPPFLAGS=-I"
117 #$(this-package-input "opensm")
118 "/include/infiniband")
119 (string-append "--with-perl-installdir=" #$output:lib
120 "/lib/perl5/vendor_perl")
121 "--disable-static")
122 #:phases
123 #~(modify-phases %standard-phases
124 (add-after 'install 'licence
125 (lambda* (#:key outputs #:allow-other-keys)
126 (let ((doc (string-append (assoc-ref outputs "lib")
127 "/share/doc")))
128 (mkdir-p doc)
129 (install-file "COPYING" doc))))
130 (add-after 'install 'move-perl
131 ;; Avoid perl in lib closure
132 (lambda* (#:key outputs #:allow-other-keys)
133 (let ((perlout (string-append (assoc-ref outputs "out")
134 "/lib"))
135 (perlin (string-append (assoc-ref outputs "lib")
136 "/lib/perl5")))
137 (mkdir-p perlout)
138 (rename-file perlin perlout)))))))
139 (home-page "https://github.com/linux-rdma/infiniband-diags")
140 (synopsis "Infiniband diagnostic tools")
141 (description "This is a set of command-line utilities to help configure,
142debug, and maintain Infiniband (IB) fabrics.
143
144In addition to the utilities, a sub-library, @file{libibnetdisc}, is provided
145to scan an entire IB fabric and return data structures representing it. The
146interface to this library is not guaranteed to be stable.")
147 (license (list gpl2 bsd-2)))) ; dual
148
149(define-public ibutils
150 (package
151 (name "ibutils")
152 (version "1.5.7-0.2.gbd7e502")
153 (source
154 (origin
155 (method url-fetch)
156 (uri (string-append "https://www.openfabrics.org/downloads/ibutils/ibutils-"
157 version ".tar.gz"))
158 (sha256
159 (base32 "00x7v6cf8l5y6g9xwh1sg738ch42fhv19msx0h0090nhr0bv98v7"))))
160 (build-system gnu-build-system)
161 (inputs (list graphviz
162 tcl
163 tk
164 infiniband-diags
165 rdma-core
166 opensm
167 perl))
168 (native-inputs (list swig-4.0))
169 (arguments
170 (list #:configure-flags
171 #~(list (string-append "--with-osm="
172 #$(this-package-input "opensm"))
173 (string-append "--with-tk-lib="
174 #$(this-package-input "tk") "/lib")
175 "--disable-static"
176
177 ;; Address this link error:
178 ;; ld: .libs/ibis.o:/ibis/src/ibis.c:55: multiple definition of `IbisObj'; .libs/ibis_wrap.o:/ibis/src/ibis_wrap.c:3007: first defined here
179 "CFLAGS=-O2 -g -fcommon")))
180 (synopsis "InfiniBand network utilities")
181 (description "These command-line utilities allow for diagnosing and
182testing InfiniBand networks.")
183 (home-page "https://www.openfabrics.org/downloads/ibutils/")
184 (license bsd-2)))
185
186(define-public ucx
187 (package
188 (name "ucx")
189 (version "1.20.0")
190 (source (origin
191 (method git-fetch)
192 (uri (git-reference
193 (url "https://github.com/openucx/ucx")
194 (commit (string-append "v" version))))
195 (file-name (git-file-name name version))
196 (patches (search-patches "ucx-tcp-iface-ioctl.patch"))
197 (sha256
198 (base32
199 "12w1mxacml1w8zvl1hpn786cs77y056b9hxv7q1kq482bgc2si0v"))
200 (snippet
201 ;; As seen in commit b0a275a5492125a13020cd095fe9934e0b5e7c6a.
202 #~(begin (use-modules (guix build utils))
203 (substitute* "src/ucs/time/time.h"
204 (("#include <limits.h>")
205 "#include <limits.h>\n#include <math.h>"))))))
206 (build-system gnu-build-system)
207 (arguments
208 (list
209 ;; These are some of the flags found in ;; 'contrib/configure-release'.
210 #:configure-flags #~(list
211 "--disable-static"
212
213 ;; XXX: Disable optimizations specific to the build
214 ;; machine (AVX, etc.) There's apparently no way to
215 ;; have them picked up at load time.
216 "--disable-optimizations"
217
218 "--disable-logging"
219 "--disable-debug"
220 "--disable-assertions"
221 "--disable-params-check"
222
223 "--enable-mt"
224 (string-append "--with-verbs="
225 #$(this-package-input "rdma-core"))
226
227 (string-append "--with-rdmacm="
228 #$(this-package-input "rdma-core"))
229
230 #$@(if (this-package-input "rocr-runtime")
231 #~((string-append "--with-rocm="
232 #$(this-package-input
233 "rocr-runtime")))
234 #~()))
235
236 ;; Be verbose so that compiler flags are displayed.
237 #:make-flags #~'("V=1")))
238 (native-inputs
239 (list autoconf automake libtool pkg-config))
240 (inputs
241 (list numactl rdma-core))
242 (synopsis "Optimized communication layer for message passing in HPC")
243 (description
244 "Unified Communication X (UCX) provides an optimized communication layer
245for message passing (MPI), portable global address space (PGAS) languages and
246run-time support libraries, as well as RPC and data-centric applications.
247
248UCX utilizes high-speed networks for inter-node communication, and shared
249memory mechanisms for efficient intra-node communication.")
250 (home-page "https://www.openucx.org/")
251 (license bsd-3)
252
253 ;; <ucm/bistro/bistro.h> lists only PowerPC64, AArch64, RISC-V
254 ;; and x86_64 as supported.
255 (supported-systems '("x86_64-linux" "aarch64-linux" "powerpc64le-linux"
256 "riscv64-linux"))))
257
258;; Note: ROCm support is kept separate to avoid a significant increase in
259;; closure size: <https://codeberg.org/guix/guix/issues/7225>.
260(define-public ucx-rocm
261 (package/inherit ucx
262 (name "ucx-rocm")
263 (inputs (modify-inputs inputs
264 (append rocr-runtime)))
265 (synopsis "Optimized communication layer for message passing in HPC (with
266ROCm support)")))