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