fabric-management.scm 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2017 Dave Love <fx@gnu.org>
  3. ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
  4. ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
  5. ;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
  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. (define-module (gnu packages fabric-management)
  22. #:use-module (guix packages)
  23. #:use-module (guix licenses)
  24. #:use-module (guix download)
  25. #:use-module (guix git-download)
  26. #:use-module (guix utils)
  27. #:use-module (guix build-system gnu)
  28. #:use-module (gnu packages)
  29. #:use-module (gnu packages autotools)
  30. #:use-module (gnu packages bison)
  31. #:use-module (gnu packages flex)
  32. #:use-module (gnu packages glib)
  33. #:use-module (gnu packages graphviz)
  34. #:use-module (gnu packages linux)
  35. #:use-module (gnu packages perl)
  36. #:use-module (gnu packages pkg-config)
  37. #:use-module (gnu packages swig)
  38. #:use-module (gnu packages tcl))
  39. ;; Fixme: Done for the library, but needs support for running the daemon
  40. ;; (shepherd definition).
  41. ;; We should probably have a lib output, but that currently generates
  42. ;; a cycle.
  43. (define-public opensm
  44. (package
  45. (name "opensm")
  46. (version "3.3.22")
  47. (source
  48. (origin
  49. (method url-fetch)
  50. (uri
  51. (string-append "https://github.com/linux-rdma/opensm/releases/download/"
  52. version "/opensm-" version ".tar.gz"))
  53. (sha256
  54. (base32 "19scwwpwqhqsyq4hbr5cflcmypss828lalxxd36yby7mbimca38y"))))
  55. (build-system gnu-build-system)
  56. (native-inputs
  57. (list bison
  58. flex
  59. ;; The 3.3.21 'release' tarball isn't properly bootstrapped.
  60. autoconf
  61. automake
  62. libtool))
  63. (inputs
  64. (list rdma-core))
  65. (arguments
  66. `(#:configure-flags '("--disable-static")
  67. #:phases
  68. (modify-phases %standard-phases
  69. (add-after 'install 'install-doc
  70. (lambda* (#:key outputs #:allow-other-keys)
  71. (let* ((base (assoc-ref outputs "out"))
  72. (doc (string-append base "/share/doc/"
  73. ,name "-" ,version)))
  74. (for-each (lambda (file)
  75. (install-file file doc))
  76. (find-files "doc"))
  77. #t))))))
  78. (home-page "https://www.openfabrics.org/")
  79. (synopsis "OpenIB InfiniBand Subnet Manager and management utilities")
  80. (description "\
  81. OpenSM is the OpenIB project's Subnet Manager for Infiniband networks.
  82. The subnet manager is run as a system daemon on one of the machines in
  83. the infiniband fabric to manage the fabric's routing state. This package
  84. also contains various tools for diagnosing and testing Infiniband networks
  85. that can be used from any machine and do not need to be run on a machine
  86. running the opensm daemon.")
  87. (license (list gpl2 bsd-2))))
  88. (define-public infiniband-diags
  89. (package
  90. (name "infiniband-diags")
  91. (version "2.0.0")
  92. (source
  93. (origin
  94. (method url-fetch)
  95. (uri (string-append "https://github.com/linux-rdma/infiniband-diags/archive/"
  96. version ".tar.gz"))
  97. (file-name (string-append name "-" version ".tar.gz"))
  98. (sha256
  99. (base32 "1ns9sjwvxnklhi47d6k5x8kxdk1n7f5362y45xwxqmr7gwfvpmwa"))))
  100. (build-system gnu-build-system)
  101. (inputs
  102. (list rdma-core opensm glib))
  103. (outputs '("out" "lib"))
  104. (native-inputs
  105. ;; FIXME: needs rst2man for man pages
  106. (list autoconf automake libtool perl pkg-config))
  107. (arguments
  108. '(#:configure-flags
  109. (list (string-append "CPPFLAGS=-I" (assoc-ref %build-inputs "opensm")
  110. "/include/infiniband")
  111. (string-append "--with-perl-installdir=" (assoc-ref %outputs "lib")
  112. "/lib/perl5/vendor_perl")
  113. "--disable-static")
  114. #:phases
  115. (modify-phases %standard-phases
  116. (add-after 'install 'licence
  117. (lambda _
  118. (let ((doc (string-append (assoc-ref %outputs "lib") "/share/doc")))
  119. (mkdir-p doc)
  120. (install-file "COPYING" doc))))
  121. (add-after 'install-file 'move-perl
  122. ;; Avoid perl in lib closure
  123. (lambda _
  124. (let ((perlout (string-append (assoc-ref %outputs "out") "/lib"))
  125. (perlin (string-append (assoc-ref %outputs "lib")
  126. "/lib/perl5")))
  127. (mkdir-p perlout)
  128. (rename-file perlin perlout)
  129. #t))))))
  130. (home-page "https://github.com/linux-rdma/infiniband-diags")
  131. (synopsis "Infiniband diagnostic tools")
  132. (description "This is a set of command-line utilities to help configure,
  133. debug, and maintain Infiniband (IB) fabrics.
  134. In addition to the utilities, a sub-library, @file{libibnetdisc}, is provided
  135. to scan an entire IB fabric and return data structures representing it. The
  136. interface to this library is not guaranteed to be stable.")
  137. (license (list gpl2 bsd-2)))) ; dual
  138. (define-public ibutils
  139. (package
  140. (name "ibutils")
  141. (version "1.5.7-0.2.gbd7e502")
  142. (source
  143. (origin
  144. (method url-fetch)
  145. (uri (string-append "https://www.openfabrics.org/downloads/ibutils/ibutils-"
  146. version ".tar.gz"))
  147. (sha256
  148. (base32 "00x7v6cf8l5y6g9xwh1sg738ch42fhv19msx0h0090nhr0bv98v7"))))
  149. (build-system gnu-build-system)
  150. (inputs (list graphviz
  151. tcl
  152. tk
  153. infiniband-diags
  154. rdma-core
  155. opensm
  156. perl))
  157. (native-inputs (list swig))
  158. (arguments
  159. `(#:configure-flags
  160. (list (string-append "--with-osm=" (assoc-ref %build-inputs "opensm"))
  161. (string-append "--with-tk-lib=" (assoc-ref %build-inputs "tk") "/lib")
  162. "--disable-static")))
  163. (synopsis "InfiniBand network utilities")
  164. (description "These command-line utilities allow for diagnosing and
  165. testing InfiniBand networks.")
  166. (home-page "https://www.openfabrics.org/downloads/ibutils/")
  167. (license bsd-2)))
  168. (define-public ucx
  169. (package
  170. (name "ucx")
  171. (version "1.9.0")
  172. (source (origin
  173. (method git-fetch)
  174. (uri (git-reference
  175. (url "https://github.com/openucx/ucx")
  176. (commit (string-append "v" version))))
  177. (file-name (git-file-name name version))
  178. (patches (search-patches "ucx-tcp-iface-ioctl.patch"))
  179. (sha256
  180. (base32
  181. "0i0ji5ivzxjqh3ys1m517ghw3am7cw1hvf40ma7hsq3wznsyx5s1"))))
  182. (build-system gnu-build-system)
  183. (arguments
  184. '( ;; These are some of the flags found in 'contrib/configure-release'.
  185. #:configure-flags (list
  186. "--disable-static"
  187. ;; XXX: Disable optimizations specific to the build
  188. ;; machine (AVX, etc.) There's apparently no way to
  189. ;; have them picked up at load time.
  190. "--disable-optimizations"
  191. "--disable-logging"
  192. "--disable-debug"
  193. "--disable-assertions"
  194. "--disable-params-check"
  195. (string-append "--with-verbs="
  196. (assoc-ref %build-inputs
  197. "rdma-core"))
  198. (string-append "--with-rdmacm="
  199. (assoc-ref %build-inputs
  200. "rdma-core")))
  201. ;; Be verbose so that compiler flags are displayed.
  202. #:make-flags '("V=1")))
  203. (native-inputs
  204. (list autoconf automake libtool pkg-config))
  205. (inputs
  206. (list numactl rdma-core))
  207. (synopsis "Optimized communication layer for message passing in HPC")
  208. (description
  209. "Unified Communication X (UCX) provides an optimized communication layer
  210. for message passing (MPI), portable global address space (PGAS) languages and
  211. run-time support libraries, as well as RPC and data-centric applications.
  212. UCX utilizes high-speed networks for inter-node communication, and shared
  213. memory mechanisms for efficient intra-node communication.")
  214. (home-page "https://www.openucx.org/")
  215. (license bsd-3)
  216. ;; <ucm/bistro/bistro.h> lists only PowerPC64, AArch64, and x86_64 as
  217. ;; supported.
  218. (supported-systems '("x86_64-linux" "aarch64-linux"))))