parallel.scm 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013, 2014 Eric Bavier <bavier@member.fsf.org>
  3. ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
  4. ;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
  5. ;;; Copyright © 2016 Pjotr Prins <pjotr.guix@thebird.nl>
  6. ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
  7. ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
  8. ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
  9. ;;;
  10. ;;; This file is part of GNU Guix.
  11. ;;;
  12. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  13. ;;; under the terms of the GNU General Public License as published by
  14. ;;; the Free Software Foundation; either version 3 of the License, or (at
  15. ;;; your option) any later version.
  16. ;;;
  17. ;;; GNU Guix is distributed in the hope that it will be useful, but
  18. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  19. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. ;;; GNU General Public License for more details.
  21. ;;;
  22. ;;; You should have received a copy of the GNU General Public License
  23. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  24. (define-module (gnu packages parallel)
  25. #:use-module (guix build-system gnu)
  26. #:use-module (guix download)
  27. #:use-module ((guix licenses) #:prefix license:)
  28. #:use-module (guix packages)
  29. #:use-module (gnu packages)
  30. #:use-module (gnu packages admin)
  31. #:use-module (gnu packages autotools)
  32. #:use-module (gnu packages base)
  33. #:use-module (gnu packages freeipmi)
  34. #:use-module (gnu packages linux)
  35. #:use-module (gnu packages mpi)
  36. #:use-module (gnu packages perl)
  37. #:use-module (gnu packages pkg-config)
  38. #:use-module (gnu packages python)
  39. #:use-module (gnu packages readline)
  40. #:use-module (gnu packages tcl)
  41. #:use-module (gnu packages tls)
  42. #:use-module (gnu packages web))
  43. (define-public parallel
  44. (package
  45. (name "parallel")
  46. (version "20170922")
  47. (source
  48. (origin
  49. (method url-fetch)
  50. (uri (string-append "mirror://gnu/parallel/parallel-"
  51. version ".tar.bz2"))
  52. (sha256
  53. (base32
  54. "0r8mdnmimdf4n6q5k0l8zdql83ka5plrb5qm3rcgkcfwmnk0p0k1"))))
  55. (build-system gnu-build-system)
  56. (arguments
  57. `(#:phases
  58. (modify-phases %standard-phases
  59. (add-after 'unpack 'patch-bin-sh
  60. (lambda _
  61. (for-each
  62. (lambda (file)
  63. (substitute* file
  64. ;; Patch hard coded '/bin/sh' in the lin ending in:
  65. ;; $Global::shell = $ENV{'PARALLEL_SHELL'} ||
  66. ;; parent_shell($$) || $ENV{'SHELL'} || "/bin/sh";
  67. (("/bin/sh\\\";\n$") (string-append (which "sh") "\";\n"))
  68. ;; Patch call to 'ps' and 'perl' commands.
  69. ((" ps ") (string-append " " (which "ps") " "))
  70. ((" perl -") (string-append " " (which "perl") " -"))))
  71. (list "src/parallel" "src/sem"))
  72. #t))
  73. (add-after 'install 'post-install-test
  74. (lambda* (#:key outputs #:allow-other-keys)
  75. (zero? (system* (string-append
  76. (assoc-ref outputs "out") "/bin/parallel")
  77. "echo"
  78. ":::" "1" "2" "3")))))))
  79. (inputs
  80. `(("perl" ,perl)
  81. ("procps" ,procps)))
  82. (home-page "https://www.gnu.org/software/parallel/")
  83. (synopsis "Build and execute command lines in parallel")
  84. (description
  85. "GNU Parallel is a tool for executing shell jobs in parallel using one
  86. or more computers. Jobs can consist of single commands or of scripts
  87. and they are executed on lists of files, hosts, users or other items.")
  88. (license license:gpl3+)))
  89. (define-public slurm
  90. (package
  91. (name "slurm")
  92. (version "16.05.9.1")
  93. (source (origin
  94. (method url-fetch)
  95. (uri (string-append
  96. "https://github.com/SchedMD/slurm/archive/slurm-"
  97. (string-join (string-split version #\.) "-") ".tar.gz"))
  98. (file-name (string-append name "-" version ".tar.gz"))
  99. (sha256
  100. (base32
  101. "1zx5y2lyjknnca4aw7cbawn00mjhsqzy3h35w7s757cykfjqr8gv"))
  102. (patches (search-patches
  103. "slurm-configure-remove-nonfree-contribs.patch"))
  104. (modules '((guix build utils)))
  105. (snippet
  106. '(begin
  107. (delete-file-recursively "contribs")
  108. #t))))
  109. ;; FIXME: More optional inputs could be added,
  110. ;; in particular mysql and gtk+.
  111. (inputs `(("expect" ,expect)
  112. ("freeipmi" ,freeipmi)
  113. ("hwloc" ,hwloc "lib")
  114. ("json-c" ,json-c)
  115. ("linux-pam" , linux-pam)
  116. ("munge" ,munge)
  117. ("numactl" ,numactl)
  118. ("openssl" ,openssl)
  119. ("perl" ,perl)
  120. ("python" ,python-wrapper)
  121. ("readline" ,readline)))
  122. (native-inputs
  123. `(("autoconf" ,autoconf)
  124. ("pkg-config" ,pkg-config)))
  125. (build-system gnu-build-system)
  126. (arguments
  127. `(#:configure-flags
  128. (list "--enable-pam"
  129. (string-append "--with-freeipmi=" (assoc-ref %build-inputs "freeipmi"))
  130. (string-append "--with-hwloc=" (assoc-ref %build-inputs "hwloc"))
  131. (string-append "--with-json=" (assoc-ref %build-inputs "json-c"))
  132. (string-append "--with-munge=" (assoc-ref %build-inputs "munge"))
  133. (string-append "--with-ssl=" (assoc-ref %build-inputs "openssl")))
  134. #:phases
  135. (modify-phases %standard-phases
  136. (add-after 'unpack 'autogen
  137. (lambda _ (zero? (system* "autoconf"))))))) ; configure.ac was patched
  138. (home-page "http://slurm.schedmd.com/")
  139. (synopsis "Workload manager for cluster computing")
  140. (description
  141. "SLURM is a fault-tolerant and highly scalable cluster management and job
  142. scheduling system for large and small clusters. It allocates access to
  143. resources (computer nodes) to users for some duration of time, provides a
  144. framework for starting, executing, and monitoring work (typically a parallel
  145. job) on a set of allocated nodes, and arbitrates contention for resources
  146. by managing a queue of pending work.")
  147. (license license:gpl2+)))
  148. (define-public slurm-drmaa
  149. (package
  150. (name "slurm-drmaa")
  151. (version "1.0.7")
  152. (source (origin
  153. (method url-fetch)
  154. (uri "http://apps.man.poznan.pl/trac/slurm-drmaa/downloads/9")
  155. (file-name (string-append name "-" version ".tar.gz"))
  156. (sha256
  157. (base32
  158. "0grw55hmny2mc4nc0y1arnvxd2k0dcdfn476kzs180fibjxgfw14"))))
  159. (build-system gnu-build-system)
  160. (inputs
  161. `(("slurm" ,slurm)))
  162. (native-inputs
  163. `(("which" ,which)))
  164. (home-page "http://apps.man.poznan.pl/trac/slurm-drmaa")
  165. (synopsis "Distributed resource management application API for SLURM")
  166. (description
  167. "PSNC DRMAA for Simple Linux Utility for Resource Management (SLURM) is
  168. an implementation of Open Grid Forum DRMAA 1.0 (Distributed Resource
  169. Management Application API) specification for submission and control of jobs
  170. to SLURM. Using DRMAA, grid applications builders, portal developers and ISVs
  171. can use the same high-level API to link their software with different
  172. cluster/resource management systems.")
  173. (license license:gpl3+)))