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> |
d4c95a23 | 10 | ;;; Copyright © 2018, 2019 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") | |
e26d628b | 51 | (version "20190522") |
e3aaefe7 EB |
52 | (source |
53 | (origin | |
54 | (method url-fetch) | |
55 | (uri (string-append "mirror://gnu/parallel/parallel-" | |
56 | version ".tar.bz2")) | |
57 | (sha256 | |
e26d628b | 58 | (base32 "0y3z9wybs3gak3zwgsby8r5gg6dwd3qlrkch0q4fn0i1j1jhmijv")))) |
e3aaefe7 | 59 | (build-system gnu-build-system) |
47bc991f BW |
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 | |
2c36baa5 | 68 | ;; Patch hard coded '/bin/sh' in the line ending in: |
47bc991f BW |
69 | ;; $Global::shell = $ENV{'PARALLEL_SHELL'} || |
70 | ;; parent_shell($$) || $ENV{'SHELL'} || "/bin/sh"; | |
4e7950fd | 71 | (("/bin/sh\\\";\n$") (string-append (which "sh") "\";\n")))) |
fccab993 EF |
72 | (list "src/parallel" "src/sem")) |
73 | #t)) | |
4e7950fd CL |
74 | (add-after 'install 'wrap-program |
75 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
76 | (let ((out (assoc-ref outputs "out"))) | |
77 | (wrap-program (string-append out "/bin/parallel") | |
78 | `("PATH" ":" prefix | |
79 | ,(map (lambda (input) | |
80 | (string-append (assoc-ref inputs input) "/bin")) | |
81 | '("perl" | |
82 | "procps")))) | |
83 | #t))) | |
84 | (add-after 'wrap-program 'post-install-test | |
47bc991f | 85 | (lambda* (#:key outputs #:allow-other-keys) |
28b0b21e TGR |
86 | (invoke (string-append |
87 | (assoc-ref outputs "out") "/bin/parallel") | |
88 | "echo" | |
89 | ":::" "1" "2" "3")))))) | |
47bc991f | 90 | (inputs |
5ca5ab8b | 91 | `(("perl" ,perl) |
47bc991f | 92 | ("procps" ,procps))) |
fccab993 | 93 | (home-page "https://www.gnu.org/software/parallel/") |
e3aaefe7 EB |
94 | (synopsis "Build and execute command lines in parallel") |
95 | (description | |
96 | "GNU Parallel is a tool for executing shell jobs in parallel using one | |
97 | or more computers. Jobs can consist of single commands or of scripts | |
98 | and they are executed on lists of files, hosts, users or other items.") | |
552f5c00 PP |
99 | (license license:gpl3+))) |
100 | ||
101 | (define-public slurm | |
102 | (package | |
103 | (name "slurm") | |
6e076b3d | 104 | (version "17.11.3") |
552f5c00 PP |
105 | (source (origin |
106 | (method url-fetch) | |
107 | (uri (string-append | |
ea1f073d LF |
108 | "https://download.schedmd.com/slurm/slurm-" |
109 | version ".tar.bz2")) | |
552f5c00 PP |
110 | (sha256 |
111 | (base32 | |
6e076b3d | 112 | "1x3i6z03d9m46fvj1cslrapm1drvgyqch9pn4xf23kvbz4gkhaps")) |
552f5c00 PP |
113 | (modules '((guix build utils))) |
114 | (snippet | |
115 | '(begin | |
4ff22ec3 TGR |
116 | (substitute* "configure.ac" |
117 | (("^[[:space:]]+contribs/.*$") "")) | |
552f5c00 PP |
118 | (delete-file-recursively "contribs") |
119 | #t)))) | |
120 | ;; FIXME: More optional inputs could be added, | |
121 | ;; in particular mysql and gtk+. | |
122 | (inputs `(("expect" ,expect) | |
123 | ("freeipmi" ,freeipmi) | |
798b7678 | 124 | ("hwloc" ,hwloc "lib") |
552f5c00 PP |
125 | ("json-c" ,json-c) |
126 | ("linux-pam" , linux-pam) | |
127 | ("munge" ,munge) | |
128 | ("numactl" ,numactl) | |
129 | ("openssl" ,openssl) | |
130 | ("perl" ,perl) | |
131 | ("python" ,python-wrapper) | |
132 | ("readline" ,readline))) | |
133 | (native-inputs | |
134 | `(("autoconf" ,autoconf) | |
135 | ("pkg-config" ,pkg-config))) | |
136 | (build-system gnu-build-system) | |
137 | (arguments | |
138 | `(#:configure-flags | |
e31ece97 | 139 | (list "--enable-pam" "--sysconfdir=/etc/slurm" |
552f5c00 PP |
140 | (string-append "--with-freeipmi=" (assoc-ref %build-inputs "freeipmi")) |
141 | (string-append "--with-hwloc=" (assoc-ref %build-inputs "hwloc")) | |
142 | (string-append "--with-json=" (assoc-ref %build-inputs "json-c")) | |
143 | (string-append "--with-munge=" (assoc-ref %build-inputs "munge")) | |
144 | (string-append "--with-ssl=" (assoc-ref %build-inputs "openssl"))) | |
145 | #:phases | |
146 | (modify-phases %standard-phases | |
4ff22ec3 TGR |
147 | (add-after 'unpack 'autoconf |
148 | (lambda _ (invoke "autoconf")))))) ; configure.ac was patched | |
91257587 | 149 | (home-page "https://slurm.schedmd.com/") |
552f5c00 PP |
150 | (synopsis "Workload manager for cluster computing") |
151 | (description | |
152 | "SLURM is a fault-tolerant and highly scalable cluster management and job | |
153 | scheduling system for large and small clusters. It allocates access to | |
154 | resources (computer nodes) to users for some duration of time, provides a | |
155 | framework for starting, executing, and monitoring work (typically a parallel | |
156 | job) on a set of allocated nodes, and arbitrates contention for resources | |
157 | by managing a queue of pending work.") | |
70260b33 TGR |
158 | (license (list license:bsd-2 ; src/common/log.[ch], src/common/uthash |
159 | license:expat ; slurm/pmi.h | |
160 | license:isc ; src/common/strlcpy.c | |
161 | license:lgpl2.1+ ; hilbert.[ch], src/common/slurm_time.h | |
162 | license:zlib ; src/common/strnatcmp.c | |
163 | license:gpl2+)))) ; the rest, often with OpenSSL exception | |
524eee02 RW |
164 | |
165 | (define-public slurm-drmaa | |
166 | (package | |
167 | (name "slurm-drmaa") | |
168 | (version "1.0.7") | |
169 | (source (origin | |
170 | (method url-fetch) | |
171 | (uri "http://apps.man.poznan.pl/trac/slurm-drmaa/downloads/9") | |
172 | (file-name (string-append name "-" version ".tar.gz")) | |
173 | (sha256 | |
174 | (base32 | |
175 | "0grw55hmny2mc4nc0y1arnvxd2k0dcdfn476kzs180fibjxgfw14")))) | |
176 | (build-system gnu-build-system) | |
177 | (inputs | |
178 | `(("slurm" ,slurm))) | |
179 | (native-inputs | |
180 | `(("which" ,which))) | |
181 | (home-page "http://apps.man.poznan.pl/trac/slurm-drmaa") | |
182 | (synopsis "Distributed resource management application API for SLURM") | |
183 | (description | |
184 | "PSNC DRMAA for Simple Linux Utility for Resource Management (SLURM) is | |
185 | an implementation of Open Grid Forum DRMAA 1.0 (Distributed Resource | |
186 | Management Application API) specification for submission and control of jobs | |
187 | to SLURM. Using DRMAA, grid applications builders, portal developers and ISVs | |
188 | can use the same high-level API to link their software with different | |
189 | cluster/resource management systems.") | |
190 | (license license:gpl3+))) |