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 ;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
14 ;;; This file is part of GNU Guix.
16 ;;; GNU Guix is free software; you can redistribute it and/or modify it
17 ;;; under the terms of the GNU General Public License as published by
18 ;;; the Free Software Foundation; either version 3 of the License, or (at
19 ;;; your option) any later version.
21 ;;; GNU Guix is distributed in the hope that it will be useful, but
22 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ;;; GNU General Public License for more details.
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29 (define-module (gnu packages parallel)
30 #:use-module (guix download)
31 #:use-module (guix git-download)
32 #:use-module (guix build-system gnu)
33 #:use-module (guix build-system python)
34 #:use-module ((guix licenses) #:prefix license:)
35 #:use-module (guix packages)
36 #:use-module (gnu packages)
37 #:use-module (gnu packages admin)
38 #:use-module (gnu packages autotools)
39 #:use-module (gnu packages base)
40 #:use-module (gnu packages freeipmi)
41 #:use-module (gnu packages linux)
42 #:use-module (gnu packages mpi)
43 #:use-module (gnu packages perl)
44 #:use-module (gnu packages pkg-config)
45 #:use-module (gnu packages python)
46 #:use-module (gnu packages python-xyz)
47 #:use-module (gnu packages readline)
48 #:use-module (gnu packages tcl)
49 #:use-module (gnu packages tls)
50 #:use-module (gnu packages web))
52 (define-public parallel
59 (uri (string-append "mirror://gnu/parallel/parallel-"
62 (base32 "0y3z9wybs3gak3zwgsby8r5gg6dwd3qlrkch0q4fn0i1j1jhmijv"))))
63 (build-system gnu-build-system)
66 (modify-phases %standard-phases
67 (add-after 'unpack 'patch-bin-sh
72 ;; Patch hard coded '/bin/sh' in the line ending in:
73 ;; $Global::shell = $ENV{'PARALLEL_SHELL'} ||
74 ;; parent_shell($$) || $ENV{'SHELL'} || "/bin/sh";
75 (("/bin/sh\\\";\n$") (string-append (which "sh") "\";\n"))))
76 (list "src/parallel" "src/sem"))
78 (add-after 'install 'wrap-program
79 (lambda* (#:key inputs outputs #:allow-other-keys)
80 (let ((out (assoc-ref outputs "out")))
81 (wrap-program (string-append out "/bin/parallel")
84 (string-append (assoc-ref inputs input) "/bin"))
88 (add-after 'wrap-program 'post-install-test
89 (lambda* (#:key outputs #:allow-other-keys)
90 (invoke (string-append
91 (assoc-ref outputs "out") "/bin/parallel")
93 ":::" "1" "2" "3"))))))
97 (home-page "https://www.gnu.org/software/parallel/")
98 (synopsis "Build and execute command lines in parallel")
100 "GNU Parallel is a tool for executing shell jobs in parallel using one
101 or more computers. Jobs can consist of single commands or of scripts
102 and they are executed on lists of files, hosts, users or other items.")
103 (license license:gpl3+)))
112 "https://download.schedmd.com/slurm/slurm-"
116 "1x3i6z03d9m46fvj1cslrapm1drvgyqch9pn4xf23kvbz4gkhaps"))
117 (modules '((guix build utils)))
120 (substitute* "configure.ac"
121 (("^[[:space:]]+contribs/.*$") ""))
122 (delete-file-recursively "contribs")
124 ;; FIXME: More optional inputs could be added,
125 ;; in particular mysql and gtk+.
126 (inputs `(("expect" ,expect)
127 ("freeipmi" ,freeipmi)
128 ("hwloc" ,hwloc "lib")
130 ("linux-pam" , linux-pam)
135 ("python" ,python-wrapper)
136 ("readline" ,readline)))
138 `(("autoconf" ,autoconf)
139 ("pkg-config" ,pkg-config)))
140 (build-system gnu-build-system)
143 (list "--enable-pam" "--sysconfdir=/etc/slurm"
144 (string-append "--with-freeipmi=" (assoc-ref %build-inputs "freeipmi"))
145 (string-append "--with-hwloc=" (assoc-ref %build-inputs "hwloc"))
146 (string-append "--with-json=" (assoc-ref %build-inputs "json-c"))
147 (string-append "--with-munge=" (assoc-ref %build-inputs "munge"))
148 (string-append "--with-ssl=" (assoc-ref %build-inputs "openssl")))
150 (modify-phases %standard-phases
151 (add-after 'unpack 'autoconf
152 (lambda _ (invoke "autoconf")))))) ; configure.ac was patched
153 (home-page "https://slurm.schedmd.com/")
154 (synopsis "Workload manager for cluster computing")
156 "SLURM is a fault-tolerant and highly scalable cluster management and job
157 scheduling system for large and small clusters. It allocates access to
158 resources (computer nodes) to users for some duration of time, provides a
159 framework for starting, executing, and monitoring work (typically a parallel
160 job) on a set of allocated nodes, and arbitrates contention for resources
161 by managing a queue of pending work.")
162 (license (list license:bsd-2 ; src/common/log.[ch], src/common/uthash
163 license:expat ; slurm/pmi.h
164 license:isc ; src/common/strlcpy.c
165 license:lgpl2.1+ ; hilbert.[ch], src/common/slurm_time.h
166 license:zlib ; src/common/strnatcmp.c
167 license:gpl2+)))) ; the rest, often with OpenSSL exception
169 (define-public slurm-drmaa
175 (uri "http://apps.man.poznan.pl/trac/slurm-drmaa/downloads/9")
176 (file-name (string-append name "-" version ".tar.gz"))
179 "0grw55hmny2mc4nc0y1arnvxd2k0dcdfn476kzs180fibjxgfw14"))))
180 (build-system gnu-build-system)
185 (home-page "http://apps.man.poznan.pl/trac/slurm-drmaa")
186 (synopsis "Distributed resource management application API for SLURM")
188 "PSNC DRMAA for Simple Linux Utility for Resource Management (SLURM) is
189 an implementation of Open Grid Forum DRMAA 1.0 (Distributed Resource
190 Management Application API) specification for submission and control of jobs
191 to SLURM. Using DRMAA, grid applications builders, portal developers and ISVs
192 can use the same high-level API to link their software with different
193 cluster/resource management systems.")
194 (license license:gpl3+)))
196 (define-public python-slurm-magic
197 (let ((commit "73dd1a2b85799f7dae4b3f1cd9027536eff0c4d7")
200 (name "python-slurm-magic")
201 (version (git-version "0.0" revision commit))
202 (home-page "https://github.com/NERSC/slurm-magic")
205 (uri (git-reference (url home-page)
209 "19pp2vs0wm8mx0arz9n6lw9wgyv70w9wyi4y6b91qc5j3bz5igfs"))
210 (file-name (git-file-name name version))))
211 (build-system python-build-system)
213 '(#:phases (modify-phases %standard-phases
214 (add-before 'build 'set-slurm-path
215 (lambda* (#:key inputs #:allow-other-keys)
216 ;; The '_execute' method tries to exec 'salloc'
217 ;; etc. from $PATH. Record the absolute file name
219 (let ((slurm (assoc-ref inputs "slurm")))
220 (substitute* "slurm_magic.py"
221 (("name = (.*)$" _ value)
222 (string-append "name = \""
229 `(("python-ipython" ,python-ipython)
230 ("python-pandas" ,python-pandas)))
231 (synopsis "Control the SLURM batch scheduler from Jupyter Notebook")
233 "This package implements Jupyter/IPython
234 @uref{http://ipython.readthedocs.io/en/stable/interactive/magics.html, magic
235 commands} for interacting with the SLURM workload manager. SLURM magic simply
236 wraps command-line executables and the commands themselves should look like
237 their command-line counterparts. Commands are spawned via @code{subprocess}
238 and output captured in the notebook. Whatever arguments are accepted by a
239 SLURM command line executable are also accepted by the corresponding magic
240 command---e.g., @code{%salloc}, @code{%sbatch}, etc.")
241 (license license:bsd-3))))