gnu: python-pandas: Fix build on 32-bit.
[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 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 ;;;
10 ;;; This file is part of GNU Guix.
11 ;;;
12 ;;; GNU Guix is free software; you can redistribute it and/or modify it
13 ;;; under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or (at
15 ;;; your option) any later version.
16 ;;;
17 ;;; GNU Guix is distributed in the hope that it will be useful, but
18 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
21 ;;;
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24
25 (define-module (gnu packages parallel)
26 #:use-module (guix build-system gnu)
27 #:use-module (guix download)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix packages)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages admin)
32 #:use-module (gnu packages autotools)
33 #:use-module (gnu packages base)
34 #:use-module (gnu packages freeipmi)
35 #:use-module (gnu packages linux)
36 #:use-module (gnu packages mpi)
37 #:use-module (gnu packages perl)
38 #:use-module (gnu packages pkg-config)
39 #:use-module (gnu packages python)
40 #:use-module (gnu packages readline)
41 #:use-module (gnu packages tcl)
42 #:use-module (gnu packages tls)
43 #:use-module (gnu packages web))
44
45 (define-public parallel
46 (package
47 (name "parallel")
48 (version "20170122")
49 (source
50 (origin
51 (method url-fetch)
52 (uri (string-append "mirror://gnu/parallel/parallel-"
53 version ".tar.bz2"))
54 (sha256
55 (base32
56 "19maf889vj1c4zakqwap58f44hgypyb5mzzwfsliir9gvvcq6zj1"))))
57 (build-system gnu-build-system)
58 (arguments
59 `(#:phases
60 (modify-phases %standard-phases
61 (add-after 'unpack 'patch-bin-sh
62 (lambda _
63 (for-each
64 (lambda (file)
65 (substitute* file
66 ;; Patch hard coded '/bin/sh' in the lin ending in:
67 ;; $Global::shell = $ENV{'PARALLEL_SHELL'} ||
68 ;; parent_shell($$) || $ENV{'SHELL'} || "/bin/sh";
69 (("/bin/sh\\\";\n$") (string-append (which "sh") "\";\n"))
70 ;; Patch call to 'ps' and 'perl' commands.
71 ((" ps ") (string-append " " (which "ps") " "))
72 ((" perl -") (string-append " " (which "perl") " -"))))
73 (list "src/parallel" "src/sem"))
74 #t))
75 (add-after 'install 'post-install-test
76 (lambda* (#:key outputs #:allow-other-keys)
77 (zero? (system* (string-append
78 (assoc-ref outputs "out") "/bin/parallel")
79 "echo"
80 ":::" "1" "2" "3")))))))
81 (inputs
82 `(("perl" ,perl)
83 ("procps" ,procps)))
84 (home-page "https://www.gnu.org/software/parallel/")
85 (synopsis "Build and execute command lines in parallel")
86 (description
87 "GNU Parallel is a tool for executing shell jobs in parallel using one
88 or more computers. Jobs can consist of single commands or of scripts
89 and they are executed on lists of files, hosts, users or other items.")
90 (license license:gpl3+)))
91
92 (define-public slurm
93 (package
94 (name "slurm")
95 (version "16.05.9.1")
96 (source (origin
97 (method url-fetch)
98 (uri (string-append
99 "https://github.com/SchedMD/slurm/archive/slurm-"
100 (string-join (string-split version #\.) "-") ".tar.gz"))
101 (file-name (string-append name "-" version ".tar.gz"))
102 (sha256
103 (base32
104 "1zx5y2lyjknnca4aw7cbawn00mjhsqzy3h35w7s757cykfjqr8gv"))
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)
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-before
140 'configure 'autogen
141 (lambda _ (zero? (system* "autoconf"))))))) ; configure.ac was patched
142 (home-page "http://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 license:gpl2+)))
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+)))