Commit | Line | Data |
---|---|---|
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> |
a489466b | 4 | ;;; Copyright © 2018, 2019, 2020 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> |
4c7e8c23 | 7 | ;;; Copyright © 2019 Gábor Boskovits <boskovits@gmail.com> |
2d6f68aa | 8 | ;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org> |
176dd26b | 9 | ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com> |
c3ccba92 MB |
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 benchmark) | |
27 | #:use-module ((guix licenses) #:prefix license:) | |
28 | #:use-module (guix packages) | |
29 | #:use-module (guix download) | |
4b444fc5 | 30 | #:use-module (guix git-download) |
4c7e8c23 | 31 | #:use-module (guix build-system cmake) |
c3ccba92 | 32 | #:use-module (guix build-system gnu) |
4c7e8c23 GB |
33 | #:use-module (gnu packages) |
34 | #:use-module (gnu packages check) | |
c3ccba92 | 35 | #:use-module (gnu packages compression) |
ac6fec05 MB |
36 | #:use-module (gnu packages linux) |
37 | #:use-module (gnu packages maths) | |
04717e94 | 38 | #:use-module (gnu packages mpi) |
176dd26b | 39 | #:use-module (gnu packages perl) |
aadead6f | 40 | #:use-module (gnu packages python) |
312ec128 | 41 | #:use-module (gnu packages python-science) |
44d10b1f | 42 | #:use-module (gnu packages python-xyz) |
04717e94 DL |
43 | #:use-module (gnu packages storage) |
44 | #:use-module (ice-9 match)) | |
c3ccba92 MB |
45 | |
46 | (define-public fio | |
47 | (package | |
48 | (name "fio") | |
e880e637 | 49 | (version "3.23") |
c3ccba92 MB |
50 | (source (origin |
51 | (method url-fetch) | |
2dffd9c6 | 52 | (uri (string-append "https://brick.kernel.dk/snaps/" |
b31e1561 | 53 | "fio-" version ".tar.bz2")) |
c3ccba92 MB |
54 | (sha256 |
55 | (base32 | |
e880e637 | 56 | "0cy32431hv0i84yrryna5byj4r610n6i1rm8nfflnrznbf051axs")))) |
c3ccba92 MB |
57 | (build-system gnu-build-system) |
58 | (arguments | |
cf46d071 | 59 | '(#:test-target "test" |
c3ccba92 MB |
60 | #:phases |
61 | (modify-phases %standard-phases | |
ac6fec05 MB |
62 | (add-after |
63 | 'unpack 'patch-paths | |
64 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
65 | (let ((out (assoc-ref outputs "out")) | |
66 | (gnuplot (string-append (assoc-ref inputs "gnuplot") | |
67 | "/bin/gnuplot"))) | |
68 | (substitute* "tools/plot/fio2gnuplot" | |
69 | (("/usr/share/fio") (string-append out "/share/fio")) | |
70 | ;; FIXME (upstream): The 'gnuplot' executable is used inline | |
71 | ;; in various os.system() calls mixed with *.gnuplot filenames. | |
72 | (("; do gnuplot") (string-append "; do " gnuplot)) | |
73 | (("gnuplot mymath") (string-append gnuplot " mymath")) | |
74 | (("gnuplot mygraph") (string-append gnuplot " mygraph"))) | |
75 | #t))) | |
c3ccba92 MB |
76 | (replace 'configure |
77 | (lambda* (#:key outputs #:allow-other-keys) | |
78 | ;; The configure script doesn't understand some of the | |
79 | ;; GNU options, so we can't use #:configure-flags. | |
80 | (let ((out (assoc-ref outputs "out"))) | |
1cc3e26b TGR |
81 | (invoke "./configure" |
82 | (string-append "--prefix=" out)) | |
83 | #t))) | |
f125ec8e MB |
84 | ;; The main `fio` executable is fairly small and self contained. |
85 | ;; Moving the auxiliary python and gnuplot scripts to a separate | |
86 | ;; output saves almost 400 MiB on the closure. | |
87 | (add-after 'install 'move-outputs | |
88 | (lambda* (#:key outputs #:allow-other-keys) | |
89 | (let ((oldbin (string-append (assoc-ref outputs "out") "/bin")) | |
90 | (newbin (string-append (assoc-ref outputs "utils") "/bin"))) | |
91 | (mkdir-p newbin) | |
92 | (for-each (lambda (file) | |
93 | (let ((src (string-append oldbin "/" file)) | |
94 | (dst (string-append newbin "/" file))) | |
95 | (link src dst) | |
96 | (delete-file src))) | |
20d2e1fa MB |
97 | '("fio2gnuplot" "fiologparser_hist.py" |
98 | "fiologparser.py")) | |
f125ec8e MB |
99 | ;; Make sure numpy et.al is found. |
100 | (wrap-program (string-append newbin "/fiologparser_hist.py") | |
101 | `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))) | |
102 | #t)))))) | |
103 | (outputs '("out" "utils")) | |
c3ccba92 | 104 | (inputs |
aadead6f MB |
105 | `(("ceph" ,ceph "lib") |
106 | ("libaio" ,libaio) | |
ac6fec05 MB |
107 | ("gnuplot" ,gnuplot) |
108 | ("zlib" ,zlib) | |
109 | ("python-numpy" ,python2-numpy) | |
110 | ("python-pandas" ,python2-pandas) | |
111 | ("python" ,python-2))) | |
c3ccba92 MB |
112 | (home-page "https://github.com/axboe/fio") |
113 | (synopsis "Flexible I/O tester") | |
114 | (description | |
115 | "fio is a tool that will spawn a number of threads or processes doing a | |
116 | particular type of I/O action as specified by the user. The typical use of fio | |
117 | is to write a job file matching the I/O load one wants to simulate.") | |
118 | ;; The software is distributed under the GPL2, but a handful of components | |
119 | ;; are covered by other licenses. | |
120 | (license (list license:gpl2 license:gpl2+ license:bsd-2 | |
121 | license:public-domain)))) | |
04717e94 DL |
122 | |
123 | ;; Parameterized in anticipation of m(va)pich support | |
2d6f68aa | 124 | (define (intel-mpi-benchmarks mpi) |
04717e94 | 125 | (package |
2d6f68aa LC |
126 | (name (string-append "intel-mpi-benchmarks" |
127 | (if (string=? (package-name mpi) "openmpi") | |
128 | "" | |
129 | (string-append "-" (package-name mpi))))) | |
130 | (version "2019.3") | |
131 | (source (origin | |
132 | (method git-fetch) | |
133 | (uri (git-reference | |
b0e7b699 | 134 | (url "https://github.com/intel/mpi-benchmarks") |
2d6f68aa LC |
135 | (commit (string-append "IMB-v" version)))) |
136 | (file-name (git-file-name name version)) | |
137 | (sha256 | |
138 | (base32 | |
139 | "0si5xi6ilhd3w0gbsg124589pvp094hvf366rvjjb9pi7pdk5p4i")))) | |
04717e94 DL |
140 | (build-system gnu-build-system) |
141 | (inputs | |
142 | `(("mpi" ,mpi))) | |
143 | (arguments | |
144 | `(#:phases | |
145 | (modify-phases %standard-phases | |
146 | (delete 'configure) | |
147 | (delete 'check) | |
04717e94 DL |
148 | (replace 'install |
149 | (lambda* (#:key outputs #:allow-other-keys) | |
2d6f68aa LC |
150 | (define (benchmark? file stat) |
151 | (and (string-prefix? "IMB-" (basename file)) | |
152 | (executable-file? file))) | |
153 | ||
04717e94 | 154 | (let* ((out (assoc-ref outputs "out")) |
04717e94 | 155 | (bin (string-append out "/bin"))) |
2d6f68aa LC |
156 | (for-each (lambda (file) |
157 | (install-file file bin)) | |
158 | (find-files "." benchmark?)) | |
159 | #t)))) | |
160 | ||
161 | ;; The makefile doesn't express all the dependencies, it seems. | |
162 | #:parallel-build? #t | |
163 | ||
164 | #:make-flags '("CC=mpicc" "CXX=mpicxx"))) | |
04717e94 | 165 | (home-page "https://software.intel.com/en-us/articles/intel-mpi-benchmarks") |
2d6f68aa | 166 | (synopsis "Benchmarks for the Message Passing Interface (MPI)") |
04717e94 DL |
167 | (description |
168 | "This package provides benchmarks for implementations of the @dfn{Message | |
169 | Passing Interface} (MPI). It contains MPI performance measurements for | |
170 | point-to-point and global communication, and file, operations for a range of | |
171 | message sizes. The generated benchmark data fully characterize: | |
172 | ||
173 | @itemize | |
174 | @item | |
175 | Performance of a cluster system, including node performance, network latency, | |
176 | and throughput; | |
177 | @item | |
178 | Efficiency of the MPI implementation. | |
179 | @end itemize") | |
180 | (license license:cpl1.0))) | |
181 | ||
2d6f68aa LC |
182 | (define-public intel-mpi-benchmarks/openmpi |
183 | (intel-mpi-benchmarks openmpi)) | |
184 | ||
185 | (define-public imb-openmpi | |
186 | (deprecated-package "imb-openmpi" intel-mpi-benchmarks/openmpi)) | |
61e265d2 RW |
187 | |
188 | (define-public multitime | |
189 | (package | |
190 | (name "multitime") | |
191 | (version "1.4") | |
192 | (source (origin | |
193 | (method url-fetch) | |
194 | (uri (string-append "https://tratt.net/laurie/src/" | |
195 | "multitime/releases/" | |
196 | "multitime-" version ".tar.gz")) | |
197 | (sha256 | |
198 | (base32 | |
199 | "0iyfsdrbyqa7a4ifrh19l9a48hgv7ld6m0d8yf9bkl12q0qw91fx")))) | |
200 | (build-system gnu-build-system) | |
201 | (arguments '(#:tests? #f)) ; there are no tests | |
202 | (home-page "https://tratt.net/laurie/src/multitime/") | |
203 | (synopsis "Time command execution over multiple executions") | |
204 | (description | |
205 | "The @code{time} utility is a simple and often effective way of measuring | |
206 | how long a command takes to run (wall time). Unfortunately, running a command | |
207 | once can give misleading timings. @code{multitime} is, in essence, a simple | |
208 | extension to @code{time} which runs a command multiple times and prints the | |
209 | timing means, standard deviations, mins, medians, and maxes having done so. | |
210 | This can give a much better understanding of the command's performance.") | |
211 | (license license:expat))) | |
4c7e8c23 GB |
212 | |
213 | (define-public benchmark | |
214 | (package | |
215 | (name "benchmark") | |
216 | (version "1.5.0") | |
217 | (source (origin | |
218 | (method git-fetch) | |
219 | (uri (git-reference | |
b0e7b699 | 220 | (url "https://github.com/google/benchmark") |
4c7e8c23 GB |
221 | (commit (string-append "v" version)))) |
222 | (file-name (git-file-name name version)) | |
223 | (sha256 | |
224 | (base32 | |
225 | "0r9dbg4cbk47gwmayys31a83m3y67k0kh1f6pl8i869rbd609ndh")) | |
226 | (patches (search-patches "benchmark-unbundle-googletest.patch")))) | |
227 | (build-system cmake-build-system) | |
228 | (native-inputs | |
229 | `(("googletest" ,googletest))) | |
230 | (home-page "https://github.com/google/benchmark") | |
231 | (synopsis "Microbenchmark support library") | |
232 | (description | |
233 | "Benchmark is a library to benchmark code snippets, | |
234 | similar to unit tests.") | |
235 | (license license:asl2.0))) | |
176dd26b VL |
236 | |
237 | (define-public bonnie++ | |
238 | (package | |
239 | (name "bonnie++") | |
240 | (version "1.98") | |
241 | (source (origin | |
242 | (method url-fetch) | |
243 | (uri (string-append "https://www.coker.com.au/bonnie++/bonnie++-" | |
244 | version ".tgz")) | |
245 | (sha256 | |
246 | (base32 | |
247 | "010bmlmi0nrlp3aq7p624sfaj5a65lswnyyxk3cnz1bqig0cn2vf")))) | |
248 | (build-system gnu-build-system) | |
249 | (native-inputs | |
250 | `(("perl" ,perl))) | |
251 | (arguments '(#:tests? #f)) ; there are no tests | |
252 | (home-page "https://doc.coker.com.au/projects/bonnie/") | |
253 | (synopsis "Hard drive and file system benchmark suite") | |
254 | (description | |
255 | "Bonnie++ is a benchmark suite that is aimed at performing a number of | |
256 | simple tests of hard drive and file system performance. Bonnie++ allows you to | |
257 | benchmark how your file systems perform with respect to data read and write | |
258 | speed, the number of seeks that can be performed per second, and the number of | |
259 | file metadata operations that can be performed per second.") | |
260 | (license license:gpl2))) ;GPL 2 only, see copyright.txt |