gnu: r-seqpattern: Update to 1.16.0.
[jackhill/guix/guix.git] / gnu / packages / benchmark.scm
CommitLineData
c3ccba92 1;;; GNU Guix --- Functional package management for GNU
ac6fec05 2;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
04717e94 3;;; Copyright © 2017 Dave Love <fx@gnu.org>
cd661a41 4;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
61e265d2 5;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
4b444fc5 6;;; Copyright © 2019 Eric Bavier <bavier@member.fsf.org>
c3ccba92
MB
7;;;
8;;; This file is part of GNU Guix.
9;;;
10;;; GNU Guix is free software; you can redistribute it and/or modify it
11;;; under the terms of the GNU General Public License as published by
12;;; the Free Software Foundation; either version 3 of the License, or (at
13;;; your option) any later version.
14;;;
15;;; GNU Guix is distributed in the hope that it will be useful, but
16;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;;; GNU General Public License for more details.
19;;;
20;;; You should have received a copy of the GNU General Public License
21;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23(define-module (gnu packages benchmark)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix packages)
26 #:use-module (guix download)
4b444fc5 27 #:use-module (guix git-download)
c3ccba92
MB
28 #:use-module (guix build-system gnu)
29 #:use-module (gnu packages compression)
ac6fec05
MB
30 #:use-module (gnu packages linux)
31 #:use-module (gnu packages maths)
04717e94 32 #:use-module (gnu packages mpi)
aadead6f 33 #:use-module (gnu packages python)
44d10b1f 34 #:use-module (gnu packages python-xyz)
04717e94
DL
35 #:use-module (gnu packages storage)
36 #:use-module (ice-9 match))
c3ccba92
MB
37
38(define-public fio
39 (package
40 (name "fio")
ce32ce70 41 (version "3.13")
c3ccba92
MB
42 (source (origin
43 (method url-fetch)
f715f102 44 (uri (string-append "http://brick.kernel.dk/snaps/"
b31e1561 45 "fio-" version ".tar.bz2"))
c3ccba92
MB
46 (sha256
47 (base32
ce32ce70 48 "0ddj7zm04jqlna3w61qyp4qvwnv0r2lc1hzpwrgbvv4fq581w7d2"))))
c3ccba92
MB
49 (build-system gnu-build-system)
50 (arguments
cf46d071 51 '(#:test-target "test"
c3ccba92
MB
52 #:phases
53 (modify-phases %standard-phases
ac6fec05
MB
54 (add-after
55 'unpack 'patch-paths
56 (lambda* (#:key inputs outputs #:allow-other-keys)
57 (let ((out (assoc-ref outputs "out"))
58 (gnuplot (string-append (assoc-ref inputs "gnuplot")
59 "/bin/gnuplot")))
60 (substitute* "tools/plot/fio2gnuplot"
61 (("/usr/share/fio") (string-append out "/share/fio"))
62 ;; FIXME (upstream): The 'gnuplot' executable is used inline
63 ;; in various os.system() calls mixed with *.gnuplot filenames.
64 (("; do gnuplot") (string-append "; do " gnuplot))
65 (("gnuplot mymath") (string-append gnuplot " mymath"))
66 (("gnuplot mygraph") (string-append gnuplot " mygraph")))
67 #t)))
c3ccba92
MB
68 (replace 'configure
69 (lambda* (#:key outputs #:allow-other-keys)
70 ;; The configure script doesn't understand some of the
71 ;; GNU options, so we can't use #:configure-flags.
72 (let ((out (assoc-ref outputs "out")))
1cc3e26b
TGR
73 (invoke "./configure"
74 (string-append "--prefix=" out))
75 #t)))
f125ec8e
MB
76 ;; The main `fio` executable is fairly small and self contained.
77 ;; Moving the auxiliary python and gnuplot scripts to a separate
78 ;; output saves almost 400 MiB on the closure.
79 (add-after 'install 'move-outputs
80 (lambda* (#:key outputs #:allow-other-keys)
81 (let ((oldbin (string-append (assoc-ref outputs "out") "/bin"))
82 (newbin (string-append (assoc-ref outputs "utils") "/bin")))
83 (mkdir-p newbin)
84 (for-each (lambda (file)
85 (let ((src (string-append oldbin "/" file))
86 (dst (string-append newbin "/" file)))
87 (link src dst)
88 (delete-file src)))
20d2e1fa
MB
89 '("fio2gnuplot" "fiologparser_hist.py"
90 "fiologparser.py"))
f125ec8e
MB
91 ;; Make sure numpy et.al is found.
92 (wrap-program (string-append newbin "/fiologparser_hist.py")
93 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))
94 #t))))))
95 (outputs '("out" "utils"))
c3ccba92 96 (inputs
aadead6f
MB
97 `(("ceph" ,ceph "lib")
98 ("libaio" ,libaio)
ac6fec05
MB
99 ("gnuplot" ,gnuplot)
100 ("zlib" ,zlib)
101 ("python-numpy" ,python2-numpy)
102 ("python-pandas" ,python2-pandas)
103 ("python" ,python-2)))
c3ccba92
MB
104 (home-page "https://github.com/axboe/fio")
105 (synopsis "Flexible I/O tester")
106 (description
107 "fio is a tool that will spawn a number of threads or processes doing a
108particular type of I/O action as specified by the user. The typical use of fio
109is to write a job file matching the I/O load one wants to simulate.")
110 ;; The software is distributed under the GPL2, but a handful of components
111 ;; are covered by other licenses.
112 (license (list license:gpl2 license:gpl2+ license:bsd-2
113 license:public-domain))))
04717e94
DL
114
115;; Parameterized in anticipation of m(va)pich support
116(define (imb mpi)
117 (package
118 (name (string-append "imb-" (package-name mpi)))
4b444fc5 119 (version "2019.1")
04717e94
DL
120 (source
121 (origin
4b444fc5
EB
122 (method git-fetch)
123 (uri (git-reference
124 (url "https://github.com/intel/mpi-benchmarks.git")
125 (commit (string-append "v" version))))
126 (file-name (git-file-name name version))
127 (sha256 (base32 "18hfdyvl5i172gadiq9si1qxif5rvic0lifxpbrr7s59ylg8f9c4"))))
04717e94
DL
128 (build-system gnu-build-system)
129 (inputs
130 `(("mpi" ,mpi)))
131 (arguments
132 `(#:phases
133 (modify-phases %standard-phases
134 (delete 'configure)
135 (delete 'check)
136 (replace 'build
137 (lambda* (#:key inputs #:allow-other-keys)
138 (let ((mpi-home (assoc-ref inputs "mpi")))
4b444fc5
EB
139 ;; Override default parallelism
140 (substitute* "Makefile"
141 (("make -j[[:digit:]]+")
142 (format #f "make -j~d" (parallel-job-count))))
143 (invoke "make" "SHELL=sh" "CC=mpicc" "CXX=mpic++"))))
04717e94
DL
144 (replace 'install
145 (lambda* (#:key outputs #:allow-other-keys)
146 (let* ((out (assoc-ref outputs "out"))
04717e94 147 (bin (string-append out "/bin")))
4b444fc5
EB
148 (for-each
149 (lambda (file)
150 (install-file file bin))
151 '("IMB-IO" "IMB-EXT" "IMB-MPI1" "IMB-NBC" "IMB-RMA" "IMB-MT")))
04717e94
DL
152 #t)))))
153 (home-page "https://software.intel.com/en-us/articles/intel-mpi-benchmarks")
154 (synopsis "Intel MPI Benchmarks")
155 (description
156 "This package provides benchmarks for implementations of the @dfn{Message
157Passing Interface} (MPI). It contains MPI performance measurements for
158point-to-point and global communication, and file, operations for a range of
159message sizes. The generated benchmark data fully characterize:
160
161@itemize
162@item
163Performance of a cluster system, including node performance, network latency,
164and throughput;
165@item
166Efficiency of the MPI implementation.
167@end itemize")
168 (license license:cpl1.0)))
169
170(define-public imb-openmpi (imb openmpi))
61e265d2
RW
171
172(define-public multitime
173 (package
174 (name "multitime")
175 (version "1.4")
176 (source (origin
177 (method url-fetch)
178 (uri (string-append "https://tratt.net/laurie/src/"
179 "multitime/releases/"
180 "multitime-" version ".tar.gz"))
181 (sha256
182 (base32
183 "0iyfsdrbyqa7a4ifrh19l9a48hgv7ld6m0d8yf9bkl12q0qw91fx"))))
184 (build-system gnu-build-system)
185 (arguments '(#:tests? #f)) ; there are no tests
186 (home-page "https://tratt.net/laurie/src/multitime/")
187 (synopsis "Time command execution over multiple executions")
188 (description
189 "The @code{time} utility is a simple and often effective way of measuring
190how long a command takes to run (wall time). Unfortunately, running a command
191once can give misleading timings. @code{multitime} is, in essence, a simple
192extension to @code{time} which runs a command multiple times and prints the
193timing means, standard deviations, mins, medians, and maxes having done so.
194This can give a much better understanding of the command's performance.")
195 (license license:expat)))