fabric-management.scm 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  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. `(("bison" ,bison)
  58. ("flex" ,flex)
  59. ;; The 3.3.21 'release' tarball isn't properly bootstrapped.
  60. ("autoconf" ,autoconf)
  61. ("automake" ,automake)
  62. ("libtool" ,libtool)))
  63. (inputs
  64. `(("rdma-core" ,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. `(("rdma-core" ,rdma-core)
  103. ("opensm" ,opensm)
  104. ("glib" ,glib)))
  105. (outputs '("out" "lib"))
  106. (native-inputs
  107. ;; FIXME: needs rst2man for man pages
  108. `(("autoconf" ,autoconf)
  109. ("automake" ,automake)
  110. ("libtool" ,libtool)
  111. ("perl" ,perl)
  112. ("pkg-config" ,pkg-config)))
  113. (arguments
  114. '(#:configure-flags
  115. (list (string-append "CPPFLAGS=-I" (assoc-ref %build-inputs "opensm")
  116. "/include/infiniband")
  117. (string-append "--with-perl-installdir=" (assoc-ref %outputs "lib")
  118. "/lib/perl5/vendor_perl")
  119. "--disable-static")
  120. #:phases
  121. (modify-phases %standard-phases
  122. (add-after 'install 'licence
  123. (lambda _
  124. (let ((doc (string-append (assoc-ref %outputs "lib") "/share/doc")))
  125. (mkdir-p doc)
  126. (install-file "COPYING" doc))))
  127. (add-after 'install-file 'move-perl
  128. ;; Avoid perl in lib closure
  129. (lambda _
  130. (let ((perlout (string-append (assoc-ref %outputs "out") "/lib"))
  131. (perlin (string-append (assoc-ref %outputs "lib")
  132. "/lib/perl5")))
  133. (mkdir-p perlout)
  134. (rename-file perlin perlout)
  135. #t))))))
  136. (home-page "https://github.com/linux-rdma/infiniband-diags")
  137. (synopsis "Infiniband diagnostic tools")
  138. (description "This is a set of command-line utilities to help configure,
  139. debug, and maintain Infiniband (IB) fabrics.
  140. In addition to the utilities, a sub-library, @file{libibnetdisc}, is provided
  141. to scan an entire IB fabric and return data structures representing it. The
  142. interface to this library is not guaranteed to be stable.")
  143. (license (list gpl2 bsd-2)))) ; dual
  144. (define-public ibutils
  145. (package
  146. (name "ibutils")
  147. (version "1.5.7-0.2.gbd7e502")
  148. (source
  149. (origin
  150. (method url-fetch)
  151. (uri (string-append "https://www.openfabrics.org/downloads/ibutils/ibutils-"
  152. version ".tar.gz"))
  153. (sha256
  154. (base32 "00x7v6cf8l5y6g9xwh1sg738ch42fhv19msx0h0090nhr0bv98v7"))))
  155. (build-system gnu-build-system)
  156. (inputs `(("graphviz" ,graphviz)
  157. ("tcl" ,tcl)
  158. ("tk" ,tk)
  159. ("infiniband-diags" ,infiniband-diags)
  160. ("rdma-core" ,rdma-core)
  161. ("opensm" ,opensm)
  162. ("perl" ,perl)))
  163. (native-inputs `(("swig" ,swig)))
  164. (arguments
  165. `(#:configure-flags
  166. (list (string-append "--with-osm=" (assoc-ref %build-inputs "opensm"))
  167. (string-append "--with-tk-lib=" (assoc-ref %build-inputs "tk") "/lib")
  168. "--disable-static")))
  169. (synopsis "InfiniBand network utilities")
  170. (description "These command-line utilities allow for diagnosing and
  171. testing InfiniBand networks.")
  172. (home-page "https://www.openfabrics.org/downloads/ibutils/")
  173. (license bsd-2)))
  174. (define-public ucx
  175. (package
  176. (name "ucx")
  177. (version "1.9.0")
  178. (source (origin
  179. (method git-fetch)
  180. (uri (git-reference
  181. (url "https://github.com/openucx/ucx")
  182. (commit (string-append "v" version))))
  183. (file-name (git-file-name name version))
  184. (patches (search-patches "ucx-tcp-iface-ioctl.patch"))
  185. (sha256
  186. (base32
  187. "0i0ji5ivzxjqh3ys1m517ghw3am7cw1hvf40ma7hsq3wznsyx5s1"))))
  188. (build-system gnu-build-system)
  189. (arguments
  190. '( ;; These are some of the flags found in 'contrib/configure-release'.
  191. #:configure-flags (list
  192. "--disable-static"
  193. ;; XXX: Disable optimizations specific to the build
  194. ;; machine (AVX, etc.) There's apparently no way to
  195. ;; have them picked up at load time.
  196. "--disable-optimizations"
  197. "--disable-logging"
  198. "--disable-debug"
  199. "--disable-assertions"
  200. "--disable-params-check"
  201. (string-append "--with-verbs="
  202. (assoc-ref %build-inputs
  203. "rdma-core"))
  204. (string-append "--with-rdmacm="
  205. (assoc-ref %build-inputs
  206. "rdma-core")))
  207. ;; Be verbose so that compiler flags are displayed.
  208. #:make-flags '("V=1")))
  209. (native-inputs
  210. `(("autoconf" ,autoconf)
  211. ("automake" ,automake)
  212. ("libtool" ,libtool)
  213. ("pkg-config" ,pkg-config)))
  214. (inputs
  215. `(("numactl" ,numactl)
  216. ("rdma-core" ,rdma-core)))
  217. (synopsis "Optimized communication layer for message passing in HPC")
  218. (description
  219. "Unified Communication X (UCX) provides an optimized communication layer
  220. for message passing (MPI), portable global address space (PGAS) languages and
  221. run-time support libraries, as well as RPC and data-centric applications.
  222. UCX utilizes high-speed networks for inter-node communication, and shared
  223. memory mechanisms for efficient intra-node communication.")
  224. (home-page "https://www.openucx.org/")
  225. (license bsd-3)
  226. ;; <ucm/bistro/bistro.h> lists only PowerPC64, AArch64, and x86_64 as
  227. ;; supported.
  228. (supported-systems '("x86_64-linux" "aarch64-linux"))))