gnu: sbcl-postmodern: Update to 1.32.6.
[jackhill/guix/guix.git] / gnu / packages / parallel.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2020 Eric Bavier <bavier@posteo.net>
3 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2015, 2016, 2017, 2018, 2020, 2021 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, 2020 Ricardo Wurmus <rekado@elephly.net>
8 ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
9 ;;; Copyright © 2017, 2018 Rutger Helling <rhelling@mykolab.com>
10 ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
12 ;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
13 ;;; Copyright © 2020 Roel Janssen <roel@gnu.org>
14 ;;;
15 ;;; This file is part of GNU Guix.
16 ;;;
17 ;;; GNU Guix is free software; you can redistribute it and/or modify it
18 ;;; under the terms of the GNU General Public License as published by
19 ;;; the Free Software Foundation; either version 3 of the License, or (at
20 ;;; your option) any later version.
21 ;;;
22 ;;; GNU Guix is distributed in the hope that it will be useful, but
23 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 ;;; GNU General Public License for more details.
26 ;;;
27 ;;; You should have received a copy of the GNU General Public License
28 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29
30 (define-module (gnu packages parallel)
31 #:use-module (guix download)
32 #:use-module (guix git-download)
33 #:use-module (guix build-system gnu)
34 #:use-module (guix build-system python)
35 #:use-module ((guix licenses) #:prefix license:)
36 #:use-module ((guix utils) #:select (target-64bit?))
37 #:use-module (guix packages)
38 #:use-module (gnu packages)
39 #:use-module (gnu packages admin)
40 #:use-module (gnu packages autotools)
41 #:use-module (gnu packages base)
42 #:use-module (gnu packages freeipmi)
43 #:use-module (gnu packages linux)
44 #:use-module (gnu packages mpi)
45 #:use-module (gnu packages perl)
46 #:use-module (gnu packages pkg-config)
47 #:use-module (gnu packages python)
48 #:use-module (gnu packages python-science)
49 #:use-module (gnu packages python-xyz)
50 #:use-module (gnu packages readline)
51 #:use-module (gnu packages tcl)
52 #:use-module (gnu packages tls)
53 #:use-module (gnu packages web))
54
55 (define-public parallel
56 (package
57 (name "parallel")
58 (version "20201222")
59 (source
60 (origin
61 (method url-fetch)
62 (uri (string-append "mirror://gnu/parallel/parallel-"
63 version ".tar.bz2"))
64 (sha256
65 (base32 "13kxg2vmy20ciiv1gp96g33bmvma1nh5d66jdix1fqj6xjaizr5n"))))
66 (build-system gnu-build-system)
67 (arguments
68 `(#:phases
69 (modify-phases %standard-phases
70 (add-after 'unpack 'patch-bin-sh
71 (lambda _
72 (for-each
73 (lambda (file)
74 (substitute* file
75 ;; Patch hard coded '/bin/sh' in the line ending in:
76 ;; $Global::shell = $ENV{'PARALLEL_SHELL'} ||
77 ;; parent_shell($$) || $ENV{'SHELL'} || "/bin/sh";
78 (("/bin/sh\\\";\n$") (string-append (which "sh") "\";\n"))))
79 (list "src/parallel" "src/sem"))
80 #t))
81 (add-after 'install 'wrap-program
82 (lambda* (#:key inputs outputs #:allow-other-keys)
83 (let ((out (assoc-ref outputs "out")))
84 (wrap-program (string-append out "/bin/parallel")
85 `("PATH" ":" prefix
86 ,(map (lambda (input)
87 (string-append (assoc-ref inputs input) "/bin"))
88 '("perl"
89 "procps"))))
90 #t)))
91 (add-after 'wrap-program 'post-install-test
92 (lambda* (#:key outputs #:allow-other-keys)
93 (invoke (string-append
94 (assoc-ref outputs "out") "/bin/parallel")
95 "echo"
96 ":::" "1" "2" "3"))))))
97 (inputs
98 `(("perl" ,perl)
99 ("procps" ,procps)))
100 (home-page "https://www.gnu.org/software/parallel/")
101 (synopsis "Build and execute command lines in parallel")
102 (description
103 "GNU Parallel is a tool for executing shell jobs in parallel using one
104 or more computers. Jobs can consist of single commands or of scripts
105 and they are executed on lists of files, hosts, users or other items.")
106 (license license:gpl3+)))
107
108 (define-public slurm
109 (package
110 (name "slurm")
111 (version "20.11.2")
112 (source (origin
113 (method url-fetch)
114 (uri (string-append
115 "https://download.schedmd.com/slurm/slurm-"
116 version ".tar.bz2"))
117 (sha256
118 (base32
119 "15h2vs58apgdz02ijgr46090vjyaa81qcm76mm6fxlvkkfd4pyxp"))
120 (modules '((guix build utils)))
121 (snippet
122 '(begin
123 ;; According to
124 ;; <https://lists.gnu.org/archive/html/guix-devel/2016-02/msg00534.html>
125 ;; there are non-free bits under contribs/, though it's not
126 ;; clear which ones. libpmi is clearly free (it used to be
127 ;; under src/api/), so remove all of contribs/ except
128 ;; contribs/pmi/.
129 (substitute* "configure.ac"
130 (("^[[:space:]]+contribs/(.*)$" all directory)
131 (if (and (string-prefix? "pmi" directory)
132 (not (string-prefix? "pmi2" directory)))
133 all
134 "")))
135
136 (rename-file "contribs/pmi" "tmp-pmi")
137 (delete-file-recursively "contribs")
138 (mkdir "contribs")
139 (rename-file "tmp-pmi" "contribs/pmi")
140 #t))))
141 ;; FIXME: More optional inputs could be added,
142 ;; in particular mysql and gtk+.
143 (inputs `(("freeipmi" ,freeipmi)
144 ("hwloc" ,hwloc-2 "lib")
145 ("json-c" ,json-c)
146 ("linux-pam" , linux-pam)
147 ("munge" ,munge)
148 ("numactl" ,numactl)
149 ("readline" ,readline)))
150 (native-inputs
151 `(("autoconf" ,autoconf)
152 ("expect" ,expect)
153 ("perl" ,perl)
154 ("pkg-config" ,pkg-config)
155 ("python" ,python-wrapper)))
156 (build-system gnu-build-system)
157 (arguments
158 `(#:configure-flags
159 (list "--enable-pam" "--sysconfdir=/etc/slurm"
160 "--disable-static"
161 (string-append "--with-freeipmi=" (assoc-ref %build-inputs "freeipmi"))
162 (string-append "--with-hwloc=" (assoc-ref %build-inputs "hwloc"))
163 (string-append "--with-json=" (assoc-ref %build-inputs "json-c"))
164 (string-append "--with-munge=" (assoc-ref %build-inputs "munge"))
165
166 ;; 32-bit support is marked as deprecated and needs to be
167 ;; explicitly enabled.
168 ,@(if (target-64bit?) '() '("--enable-deprecated")))
169 #:phases
170 (modify-phases %standard-phases
171 (add-after 'unpack 'autoconf
172 (lambda _ (invoke "autoconf"))) ;configure.ac was patched
173 (add-after 'install 'install-libpmi
174 (lambda _
175 ;; Open MPI expects libpmi to be provided by Slurm so install it.
176 (invoke "make" "install" "-C" "contribs/pmi"))))))
177 (home-page "https://slurm.schedmd.com/")
178 (synopsis "Workload manager for cluster computing")
179 (description
180 "SLURM is a fault-tolerant and highly scalable cluster management and job
181 scheduling system for large and small clusters. It allocates access to
182 resources (computer nodes) to users for some duration of time, provides a
183 framework for starting, executing, and monitoring work (typically a parallel
184 job) on a set of allocated nodes, and arbitrates contention for resources
185 by managing a queue of pending work.")
186 (license (list license:bsd-2 ; src/common/log.[ch], src/common/uthash
187 license:expat ; slurm/pmi.h
188 license:isc ; src/common/strlcpy.c
189 license:lgpl2.1+ ; hilbert.[ch], src/common/slurm_time.h
190 license:zlib ; src/common/strnatcmp.c
191 license:gpl2+)))) ; the rest, often with OpenSSL exception
192
193 ;; The SLURM client/daemon protocol and file format changes from time to time
194 ;; in incompatible ways, as noted in
195 ;; <https://slurm.schedmd.com/troubleshoot.html#network>. Thus, keep older
196 ;; releases here. See also <https://issues.guix.gnu.org/44387>.
197
198 (define-public slurm-20.02
199 (package
200 (inherit slurm)
201 (version "20.02.6-1")
202 (source (origin
203 (inherit (package-source slurm))
204 (method url-fetch)
205 (uri (string-append
206 "https://download.schedmd.com/slurm/slurm-"
207 version ".tar.bz2"))
208 (sha256
209 (base32
210 "0qj4blfymrd2ry2qmb58l3jbr4jwygc3adcfw7my27rippcijlyc"))))))
211
212
213 (define-public slurm-19.05
214 (package
215 (inherit slurm)
216 (version "19.05.3-2")
217 (source (origin
218 (inherit (package-source slurm))
219 (method url-fetch)
220 (uri (string-append
221 "https://download.schedmd.com/slurm/slurm-"
222 version ".tar.bz2"))
223 (sha256
224 (base32
225 "0qj4blfymrd2ry2qmb58l3jbr4jwygc3adcfw7my27rippcijlyc"))))))
226
227 ;; Same as Debian 10
228 (define-public slurm-18.08
229 (package
230 (inherit slurm)
231 (version "18.08.5-2")
232 (source
233 (origin
234 (inherit (package-source slurm))
235 (uri (string-append
236 "https://download.schedmd.com/slurm/slurm-"
237 version ".tar.bz2"))
238 (sha256
239 (base32
240 "0xrj12nmkhvhzi7cyh4yvdm8qa51ji3j82mgpq7sx87g30f9spn4"))))))
241
242 (define-public slurm-drmaa
243 (package
244 (name "slurm-drmaa")
245 (version "1.1.1")
246 (source (origin
247 (method url-fetch)
248 (uri (string-append
249 "https://github.com/natefoo/slurm-drmaa/releases/download/"
250 version "/slurm-drmaa-" version ".tar.gz"))
251 (sha256
252 (base32
253 "19r4cm88pcpm3wli4cc61zq7354pg67cg866f3a430p15hm1knrn"))))
254 (build-system gnu-build-system)
255 (arguments `(#:tests? #f)) ; The tests require "bats".
256 (inputs
257 `(("slurm" ,slurm)))
258 (native-inputs
259 `(("which" ,which)))
260 (home-page "https://github.com/natefoo/slurm-drmaa")
261 (synopsis "Distributed resource management application API for SLURM")
262 (description
263 "PSNC DRMAA for Simple Linux Utility for Resource Management (SLURM) is
264 an implementation of Open Grid Forum DRMAA 1.0 (Distributed Resource
265 Management Application API) specification for submission and control of jobs
266 to SLURM. Using DRMAA, grid applications builders, portal developers and ISVs
267 can use the same high-level API to link their software with different
268 cluster/resource management systems.")
269 (license license:gpl3+)))
270
271 (define-public python-slurm-magic
272 (let ((commit "73dd1a2b85799f7dae4b3f1cd9027536eff0c4d7")
273 (revision "0"))
274 (package
275 (name "python-slurm-magic")
276 (version (git-version "0.0" revision commit))
277 (home-page "https://github.com/NERSC/slurm-magic")
278 (source (origin
279 (method git-fetch)
280 (uri (git-reference (url home-page)
281 (commit commit)))
282 (sha256
283 (base32
284 "19pp2vs0wm8mx0arz9n6lw9wgyv70w9wyi4y6b91qc5j3bz5igfs"))
285 (file-name (git-file-name name version))))
286 (build-system python-build-system)
287 (arguments
288 '(#:phases (modify-phases %standard-phases
289 (add-before 'build 'set-slurm-path
290 (lambda* (#:key inputs #:allow-other-keys)
291 ;; The '_execute' method tries to exec 'salloc'
292 ;; etc. from $PATH. Record the absolute file name
293 ;; instead.
294 (let ((slurm (assoc-ref inputs "slurm")))
295 (substitute* "slurm_magic.py"
296 (("name = (.*)$" _ value)
297 (string-append "name = \""
298 slurm "/bin/\" + "
299 value "\n")))
300 #t))))))
301 (inputs
302 `(("slurm" ,slurm)))
303 (propagated-inputs
304 `(("python-ipython" ,python-ipython)
305 ("python-pandas" ,python-pandas)))
306 (synopsis "Control the SLURM batch scheduler from Jupyter Notebook")
307 (description
308 "This package implements Jupyter/IPython
309 @uref{http://ipython.readthedocs.io/en/stable/interactive/magics.html, magic
310 commands} for interacting with the SLURM workload manager. SLURM magic simply
311 wraps command-line executables and the commands themselves should look like
312 their command-line counterparts. Commands are spawned via @code{subprocess}
313 and output captured in the notebook. Whatever arguments are accepted by a
314 SLURM command line executable are also accepted by the corresponding magic
315 command---e.g., @code{%salloc}, @code{%sbatch}, etc.")
316 (license license:bsd-3))))