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