doc: Update htmlxref.cnf.
[guix.git] / gnu / packages / parallel.scm
blob8b6487855370996e094a57476e8f6ff0dfcda61d
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, 2018 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, 2018 Rutger Helling <rhelling@mykolab.com>
10 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
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/>.
28 (define-module (gnu packages parallel)
29   #:use-module (guix build-system gnu)
30   #:use-module (guix download)
31   #:use-module ((guix licenses) #:prefix license:)
32   #:use-module (guix packages)
33   #:use-module (gnu packages)
34   #:use-module (gnu packages admin)
35   #:use-module (gnu packages autotools)
36   #:use-module (gnu packages base)
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))
48 (define-public parallel
49   (package
50     (name "parallel")
51     (version "20190422")
52     (source
53      (origin
54       (method url-fetch)
55       (uri (string-append "mirror://gnu/parallel/parallel-"
56                           version ".tar.bz2"))
57       (sha256
58        (base32 "0xdl5fnh1vpjp3zpmqsrbbgjixazlhl4d9awk42nz4snzynysjxl"))))
59     (build-system gnu-build-system)
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 line 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               (list "src/parallel" "src/sem"))
73              #t))
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
85            (lambda* (#:key outputs #:allow-other-keys)
86              (invoke (string-append
87                       (assoc-ref outputs "out") "/bin/parallel")
88                      "echo"
89                      ":::" "1" "2" "3"))))))
90     (inputs
91      `(("perl" ,perl)
92        ("procps" ,procps)))
93     (home-page "https://www.gnu.org/software/parallel/")
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.")
99     (license license:gpl3+)))
101 (define-public slurm
102   (package
103    (name "slurm")
104    (version "17.11.3")
105    (source (origin
106             (method url-fetch)
107             (uri (string-append
108                   "https://download.schedmd.com/slurm/slurm-"
109                   version ".tar.bz2"))
110             (sha256
111              (base32
112               "1x3i6z03d9m46fvj1cslrapm1drvgyqch9pn4xf23kvbz4gkhaps"))
113             (modules '((guix build utils)))
114             (snippet
115              '(begin
116                 (substitute* "configure.ac"
117                   (("^[[:space:]]+contribs/.*$") ""))
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)
124              ("hwloc" ,hwloc "lib")
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
139       (list "--enable-pam" "--sysconfdir=/etc/slurm"
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
147         (add-after 'unpack 'autoconf
148           (lambda _ (invoke "autoconf")))))) ; configure.ac was patched
149    (home-page "https://slurm.schedmd.com/")
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.")
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
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+)))