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> |
830383cb | 4 | ;;; Copyright © 2015, 2016, 2017 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> |
9c3c2caa | 9 | ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com> |
4ff22ec3 | 10 | ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> |
e3aaefe7 EB |
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) | |
e3aaefe7 | 28 | #:use-module (guix build-system gnu) |
552f5c00 PP |
29 | #:use-module (guix download) |
30 | #:use-module ((guix licenses) #:prefix license:) | |
31 | #:use-module (guix packages) | |
e3aaefe7 | 32 | #:use-module (gnu packages) |
552f5c00 PP |
33 | #:use-module (gnu packages admin) |
34 | #:use-module (gnu packages autotools) | |
524eee02 | 35 | #:use-module (gnu packages base) |
552f5c00 PP |
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)) | |
e3aaefe7 EB |
46 | |
47 | (define-public parallel | |
48 | (package | |
49 | (name "parallel") | |
66776562 | 50 | (version "20171222") |
e3aaefe7 EB |
51 | (source |
52 | (origin | |
53 | (method url-fetch) | |
54 | (uri (string-append "mirror://gnu/parallel/parallel-" | |
55 | version ".tar.bz2")) | |
56 | (sha256 | |
57 | (base32 | |
66776562 | 58 | "1p3r6dlhy49q3y468kf65nqdp0knqw41vwga9rprrvi04kywgj4v")))) |
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 | |
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") " -")))) | |
fccab993 EF |
75 | (list "src/parallel" "src/sem")) |
76 | #t)) | |
47bc991f BW |
77 | (add-after 'install 'post-install-test |
78 | (lambda* (#:key outputs #:allow-other-keys) | |
79 | (zero? (system* (string-append | |
80 | (assoc-ref outputs "out") "/bin/parallel") | |
81 | "echo" | |
82 | ":::" "1" "2" "3"))))))) | |
83 | (inputs | |
84 | `(("perl" ,perl) | |
85 | ("procps" ,procps))) | |
fccab993 | 86 | (home-page "https://www.gnu.org/software/parallel/") |
e3aaefe7 EB |
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.") | |
552f5c00 PP |
92 | (license license:gpl3+))) |
93 | ||
94 | (define-public slurm | |
95 | (package | |
96 | (name "slurm") | |
4ff22ec3 | 97 | (version "17.11.2") |
552f5c00 PP |
98 | (source (origin |
99 | (method url-fetch) | |
100 | (uri (string-append | |
ea1f073d LF |
101 | "https://download.schedmd.com/slurm/slurm-" |
102 | version ".tar.bz2")) | |
552f5c00 PP |
103 | (sha256 |
104 | (base32 | |
4ff22ec3 | 105 | "18yakb8kmhb16n0cv3zhjv8ahvsk9p0max8mmr2flb2c65fawks6")) |
552f5c00 PP |
106 | (modules '((guix build utils))) |
107 | (snippet | |
108 | '(begin | |
4ff22ec3 TGR |
109 | (substitute* "configure.ac" |
110 | (("^[[:space:]]+contribs/.*$") "")) | |
552f5c00 PP |
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) | |
798b7678 | 117 | ("hwloc" ,hwloc "lib") |
552f5c00 PP |
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 | |
4ff22ec3 TGR |
140 | (add-after 'unpack 'autoconf |
141 | (lambda _ (invoke "autoconf")))))) ; configure.ac was patched | |
91257587 | 142 | (home-page "https://slurm.schedmd.com/") |
552f5c00 PP |
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 license:gpl2+))) | |
524eee02 RW |
152 | |
153 | (define-public slurm-drmaa | |
154 | (package | |
155 | (name "slurm-drmaa") | |
156 | (version "1.0.7") | |
157 | (source (origin | |
158 | (method url-fetch) | |
159 | (uri "http://apps.man.poznan.pl/trac/slurm-drmaa/downloads/9") | |
160 | (file-name (string-append name "-" version ".tar.gz")) | |
161 | (sha256 | |
162 | (base32 | |
163 | "0grw55hmny2mc4nc0y1arnvxd2k0dcdfn476kzs180fibjxgfw14")))) | |
164 | (build-system gnu-build-system) | |
165 | (inputs | |
166 | `(("slurm" ,slurm))) | |
167 | (native-inputs | |
168 | `(("which" ,which))) | |
169 | (home-page "http://apps.man.poznan.pl/trac/slurm-drmaa") | |
170 | (synopsis "Distributed resource management application API for SLURM") | |
171 | (description | |
172 | "PSNC DRMAA for Simple Linux Utility for Resource Management (SLURM) is | |
173 | an implementation of Open Grid Forum DRMAA 1.0 (Distributed Resource | |
174 | Management Application API) specification for submission and control of jobs | |
175 | to SLURM. Using DRMAA, grid applications builders, portal developers and ISVs | |
176 | can use the same high-level API to link their software with different | |
177 | cluster/resource management systems.") | |
178 | (license license:gpl3+))) |