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