Commit | Line | Data |
---|---|---|
8f8b2451 | 1 | ;;; GNU Guix --- Functional package management for GNU |
26433471 | 2 | ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr> |
da95c817 | 3 | ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> |
a53d6719 | 4 | ;;; Copyright © 2014, 2016, 2017 John Darrington <jmd@gnu.org> |
6d433d6e | 5 | ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Eric Bavier <bavier@member.fsf.org> |
df354a77 | 6 | ;;; Copyright © 2014 Federico Beffa <beffa@fbengineering.ch> |
182d6311 | 7 | ;;; Copyright © 2014 Mathieu Lirzin <mathieu.lirzin@openmailbox.org> |
0aad198e | 8 | ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net> |
32158110 | 9 | ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> |
df129041 | 10 | ;;; Copyright © 2015, 2018 Mark H Weaver <mhw@netris.org> |
0ef54303 | 11 | ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il> |
45147b0c | 12 | ;;; Copyright © 2015 Fabian Harfert <fhmgufs@web.de> |
ec8c7e47 | 13 | ;;; Copyright © 2016 Roel Janssen <roel@gnu.org> |
ab5f3f21 | 14 | ;;; Copyright © 2016, 2018 Kei Kebreau <kkebreau@posteo.net> |
59a07504 | 15 | ;;; Copyright © 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> |
d7cff656 | 16 | ;;; Copyright © 2016 Leo Famulari <leo@famulari.name> |
2fd26d05 | 17 | ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be> |
37dc2920 | 18 | ;;; Copyright © 2017, 2018, 2019 Paul Garlick <pgarlick@tourbillion-technology.com> |
47956fa0 | 19 | ;;; Copyright © 2017 ng0 <ng0@n0.is> |
ba1be533 | 20 | ;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com> |
d109b1e8 | 21 | ;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org> |
b18b9d20 | 22 | ;;; Copyright © 2017, 2019 Arun Isaac <arunisaac@systemreboot.net> |
98a5cd51 | 23 | ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
dc7d6d4e | 24 | ;;; Copyright © 2017 Dave Love <me@fx@gnu.org> |
3bc74090 | 25 | ;;; Copyright © 2018, 2019 Jan Nieuwenhuizen <janneke@gnu.org> |
41835f94 | 26 | ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com> |
910deec6 | 27 | ;;; Copyright © 2018 Nadya Voronova <voronovank@gmail.com> |
07254d8b | 28 | ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com> |
560acf25 | 29 | ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com> |
daa6036f | 30 | ;;; Copyright © 2018 Eric Brown <brown@fastmail.com> |
564cf93f | 31 | ;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu> |
fa574a6d | 32 | ;;; Copyright © 2018 Amin Bandali <bandali@gnu.org> |
6f8c4195 | 33 | ;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr> |
4cb5d251 | 34 | ;;; Copyright © 2019 Steve Sprang <scs@stevesprang.com> |
3b7828cc | 35 | ;;; Copyright © 2019 Robert Smith <robertsmith@posteo.net> |
8f8b2451 AE |
36 | ;;; |
37 | ;;; This file is part of GNU Guix. | |
38 | ;;; | |
39 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
40 | ;;; under the terms of the GNU General Public License as published by | |
41 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
42 | ;;; your option) any later version. | |
43 | ;;; | |
44 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
45 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
46 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
47 | ;;; GNU General Public License for more details. | |
48 | ;;; | |
49 | ;;; You should have received a copy of the GNU General Public License | |
50 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
51 | ||
52 | (define-module (gnu packages maths) | |
ec322be2 | 53 | #:use-module (ice-9 regex) |
a6b9ebc2 | 54 | #:use-module (ice-9 match) |
8f8b2451 | 55 | #:use-module (gnu packages) |
b5b73a82 | 56 | #:use-module ((guix licenses) #:prefix license:) |
8f8b2451 AE |
57 | #:use-module (guix packages) |
58 | #:use-module (guix download) | |
54052a54 | 59 | #:use-module (guix git-download) |
0e2672ae | 60 | #:use-module (guix utils) |
fa574a6d | 61 | #:use-module ((guix build utils) #:select (alist-replace)) |
da95c817 | 62 | #:use-module (guix build-system cmake) |
c9dfa3c7 | 63 | #:use-module (guix build-system gnu) |
560acf25 | 64 | #:use-module (guix build-system python) |
63e07468 | 65 | #:use-module (guix build-system ruby) |
3de01d3f | 66 | #:use-module (gnu packages algebra) |
ab5f3f21 | 67 | #:use-module (gnu packages audio) |
5143517c | 68 | #:use-module (gnu packages autotools) |
fa574a6d | 69 | #:use-module (gnu packages base) |
3de01d3f | 70 | #:use-module (gnu packages bison) |
a17d4564 | 71 | #:use-module (gnu packages boost) |
e73b49fb | 72 | #:use-module (gnu packages check) |
3de01d3f | 73 | #:use-module (gnu packages cmake) |
c9dfa3c7 | 74 | #:use-module (gnu packages compression) |
668c06ac | 75 | #:use-module (gnu packages curl) |
b7b27a8f | 76 | #:use-module (gnu packages cyrus-sasl) |
528bb464 | 77 | #:use-module (gnu packages documentation) |
57e544e8 | 78 | #:use-module (gnu packages elf) |
3de01d3f | 79 | #:use-module (gnu packages flex) |
668c06ac | 80 | #:use-module (gnu packages fltk) |
f3929800 | 81 | #:use-module (gnu packages fontutils) |
1dba6407 | 82 | #:use-module (gnu packages gettext) |
da95c817 | 83 | #:use-module (gnu packages gcc) |
73fed4f8 | 84 | #:use-module (gnu packages gd) |
668c06ac | 85 | #:use-module (gnu packages ghostscript) |
889187a4 | 86 | #:use-module (gnu packages graphviz) |
f3929800 | 87 | #:use-module (gnu packages gtk) |
45147b0c | 88 | #:use-module (gnu packages image) |
2fd26d05 | 89 | #:use-module (gnu packages java) |
668c06ac | 90 | #:use-module (gnu packages less) |
8731e527 | 91 | #:use-module (gnu packages lisp) |
ab5f3f21 | 92 | #:use-module (gnu packages linux) |
bc3a2e35 | 93 | #:use-module (gnu packages logging) |
6e64766a | 94 | #:use-module (gnu packages lua) |
5698b8b8 | 95 | #:use-module (gnu packages gnome) |
1b39a196 | 96 | #:use-module (gnu packages guile) |
668c06ac JD |
97 | #:use-module (gnu packages xorg) |
98 | #:use-module (gnu packages gl) | |
9f913401 | 99 | #:use-module (gnu packages imagemagick) |
8731e527 | 100 | #:use-module (gnu packages m4) |
d8c7eeb9 | 101 | #:use-module (gnu packages mpi) |
b92eee75 | 102 | #:use-module (gnu packages multiprecision) |
528bb464 | 103 | #:use-module (gnu packages netpbm) |
bd3d71cb | 104 | #:use-module (gnu packages onc-rpc) |
668c06ac | 105 | #:use-module (gnu packages pcre) |
5698b8b8 | 106 | #:use-module (gnu packages popt) |
c9dfa3c7 AE |
107 | #:use-module (gnu packages perl) |
108 | #:use-module (gnu packages pkg-config) | |
ab5f3f21 | 109 | #:use-module (gnu packages pulseaudio) |
da95c817 | 110 | #:use-module (gnu packages python) |
589e3f4e | 111 | #:use-module (gnu packages python-web) |
44d10b1f | 112 | #:use-module (gnu packages python-xyz) |
5b05dce7 | 113 | #:use-module (gnu packages qt) |
c9dfa3c7 | 114 | #:use-module (gnu packages readline) |
63e07468 | 115 | #:use-module (gnu packages ruby) |
2742f87e | 116 | #:use-module (gnu packages tbb) |
479c4273 | 117 | #:use-module (gnu packages scheme) |
b7194849 | 118 | #:use-module (gnu packages shells) |
df354a77 | 119 | #:use-module (gnu packages tcl) |
668c06ac | 120 | #:use-module (gnu packages texinfo) |
8f9ac901 | 121 | #:use-module (gnu packages tex) |
b7b27a8f | 122 | #:use-module (gnu packages tls) |
5b05dce7 | 123 | #:use-module (gnu packages version-control) |
9aafbc0c | 124 | #:use-module (gnu packages wxwidgets) |
c12efc72 | 125 | #:use-module (gnu packages xml) |
a17d4564 | 126 | #:use-module (srfi srfi-1)) |
8f8b2451 | 127 | |
193abc82 JD |
128 | (define-public aris |
129 | (package | |
1f45f18a JD |
130 | (name "aris") |
131 | (version "2.2") | |
132 | (source (origin | |
133 | (method url-fetch) | |
134 | (uri (string-append "mirror://gnu/" name "/" name "-" version ".tar.gz")) | |
135 | (sha256 (base32 | |
136 | "1q1887ryqdr9sn0522hc7p16kqwlxxyz5dkmma8ar2nxplhgll7q")))) | |
137 | (build-system gnu-build-system) | |
138 | (inputs `(("gtk+" ,gtk+) | |
139 | ("libxml2" ,libxml2))) | |
140 | (native-inputs `(("pkg-config" ,pkg-config))) | |
141 | (synopsis "Natural deduction first-order logic interface") | |
142 | (description "Aris is a program for performing logical proofs. It supports | |
143 | propositional and predicate logic, as well as Boolean algebra and | |
144 | arithmetical logic. In addition to its predefined inference and equivalence | |
145 | rules, Aris also supports references to older proofs. Its use of standard | |
146 | logical symbols and its natural deduction interface make it easy to use for | |
147 | beginners.") | |
148 | (license license:gpl3+) | |
6fd52309 | 149 | (home-page "https://www.gnu.org/software/aris/"))) |
193abc82 | 150 | |
9c45c519 JD |
151 | (define-public c-graph |
152 | (package | |
153 | (name "c-graph") | |
0ef54303 | 154 | (version "2.0.1") |
9c45c519 JD |
155 | (source (origin |
156 | (method url-fetch) | |
157 | (uri (string-append "mirror://gnu/c-graph/c-graph-" version | |
158 | ".tar.gz")) | |
159 | (sha256 (base32 | |
0ef54303 | 160 | "092412jzxy6wdvpk96pfj499hpmaww8xllavbvlqspfpr7ips9id")))) |
9c45c519 JD |
161 | (build-system gnu-build-system) |
162 | (inputs | |
0ef54303 | 163 | `(("fortran" ,gfortran))) |
a3947cb1 | 164 | (synopsis "Visualizing and demonstrating convolution") |
9c45c519 | 165 | (description |
0ef54303 | 166 | "GNU C-Graph is a tool for demonstrating the theory of convolution. |
a3947cb1 LC |
167 | Thus, it can serve as an excellent aid to students of signal and systems |
168 | theory in visualizing the convolution process. Rather than forcing the | |
169 | student to write code, the program offers an intuitive interface with | |
170 | interactive dialogs to guide them.") | |
9c45c519 | 171 | (license license:gpl3+) |
6fd52309 | 172 | (home-page "https://www.gnu.org/software/c-graph/"))) |
9c45c519 | 173 | |
d91025e3 TD |
174 | (define-public coda |
175 | (package | |
176 | (name "coda") | |
9285f8bb | 177 | (version "2.19") |
d91025e3 TD |
178 | (source |
179 | (origin | |
180 | (method url-fetch) | |
181 | (uri (string-append "https://github.com/stcorp/coda/releases/download/" | |
182 | version "/coda-" version ".tar.gz")) | |
183 | (sha256 | |
9285f8bb | 184 | (base32 "1fbxd2afm7dshd92p10yy8dwbr9gc1h1fmnnnmr7d0c5lnw80245")) |
4b12fe5c TD |
185 | (patches (search-patches "coda-use-system-libs.patch")) |
186 | (modules '((guix build utils))) | |
187 | (snippet | |
188 | ;; Make sure we don't use the bundled software. | |
6cbee49d MW |
189 | '(begin |
190 | (for-each (lambda (d) | |
191 | (delete-file-recursively (string-append "libcoda/" d))) | |
192 | '("zlib" "pcre" "expat")) | |
193 | #t)))) | |
d91025e3 TD |
194 | (native-inputs |
195 | `(("fortran" ,gfortran) | |
196 | ("python" ,python) | |
197 | ("python-numpy" ,python-numpy))) | |
198 | (inputs | |
199 | `(("zlib" ,zlib) | |
4b12fe5c TD |
200 | ("pcre" ,pcre) |
201 | ("expat" ,expat) | |
d91025e3 TD |
202 | ("hdf4" ,hdf4-alt) |
203 | ("hdf5" ,hdf5))) | |
204 | (build-system gnu-build-system) | |
205 | (arguments | |
4b12fe5c TD |
206 | '(#:configure-flags '("--with-hdf4" "--with-hdf5" "--enable-python" |
207 | "LIBS= -lz -lpcre -lexpat"))) | |
d91025e3 TD |
208 | (synopsis "A common interface to various earth observation data formats") |
209 | (description | |
210 | "The Common Data Access toolbox (CODA) provides a set of interfaces for | |
211 | reading remote sensing data from earth observation data files. It consists of | |
212 | command line applications and interfaces to the C, Fortran, Python, and Java | |
213 | programming languages.") | |
214 | (home-page "https://stcorp.nl/coda") | |
215 | (license license:gpl2+))) | |
216 | ||
d65f0661 KK |
217 | (define-public qhull |
218 | (package | |
219 | (name "qhull") | |
220 | (version "2015.2") | |
221 | (source (origin | |
222 | (method url-fetch) | |
223 | (uri (string-append "http://www.qhull.org/download/qhull-" | |
224 | (car (string-split version #\.)) | |
225 | "-src-7.2.0.tgz")) | |
226 | (sha256 | |
227 | (base32 | |
228 | "0dm4b2xr3asy6w74khq2zg4gf26zsy3qf9sq7pf7lmrvbj911c3q")))) | |
229 | (build-system cmake-build-system) | |
230 | (synopsis "Calculate convex hulls and related structures") | |
231 | (description | |
232 | "@code{Qhull} computes the convex hull, Delaunay triangulation, Voronoi | |
233 | diagram, halfspace intersection about a point, furthest-site Delaunay | |
234 | triangulation, and furthest-site Voronoi diagram. The source code runs in 2-d, | |
235 | 3-d, 4-d, and higher dimensions. @code{Qhull} implements the Quickhull | |
236 | algorithm for computing the convex hull. It handles roundoff errors from | |
237 | floating point arithmetic. It computes volumes, surface areas, and | |
238 | approximations to the convex hull. | |
239 | ||
240 | @code{Qhull} does not support triangulation of non-convex surfaces, mesh | |
241 | generation of non-convex objects, medium-sized inputs in 9-D and higher, alpha | |
242 | shapes, weighted Voronoi diagrams, Voronoi volumes, or constrained Delaunay | |
243 | triangulations.") | |
244 | (home-page "http://qhull.org") | |
245 | (license (license:non-copyleft "file://COPYING.txt" | |
246 | "See COPYING in the distribution.")))) | |
247 | ||
a8fa86c4 RW |
248 | (define-public python-cvxopt |
249 | (package | |
250 | (name "python-cvxopt") | |
a7c7015a | 251 | (version "1.2.3") |
a8fa86c4 RW |
252 | (source (origin |
253 | (method git-fetch) | |
254 | (uri (git-reference | |
255 | (url "https://github.com/cvxopt/cvxopt.git") | |
256 | (commit version))) | |
257 | (file-name (git-file-name name version)) | |
258 | (sha256 | |
259 | (base32 | |
a7c7015a | 260 | "1kiy2m62xgs2d5id6dnnwy4vap85cd70p7pgkb9nh23qf9xnak7b")))) |
a8fa86c4 RW |
261 | (build-system python-build-system) |
262 | (arguments | |
263 | `(#:phases | |
264 | (modify-phases %standard-phases | |
265 | (add-after 'unpack 'find-libraries | |
266 | (lambda* (#:key inputs #:allow-other-keys) | |
267 | (setenv "CVXOPT_BLAS_LIB" "openblas") | |
268 | (setenv "CVXOPT_BUILD_FFTW" "1") | |
269 | (setenv "CVXOPT_BUILD_GLPK" "1") | |
270 | (setenv "CVXOPT_BUILD_GSL" "1") | |
271 | #t))))) | |
272 | (inputs | |
273 | `(("fftw" ,fftw) | |
274 | ("glpk" ,glpk) | |
275 | ("gsl" ,gsl) | |
276 | ("lapack" ,lapack) | |
277 | ("openblas" ,openblas) | |
278 | ("suitesparse" ,suitesparse))) | |
279 | (home-page "https://www.cvxopt.org") | |
280 | (synopsis "Python library for convex optimization") | |
281 | (description | |
282 | "CVXOPT is a package for convex optimization based on the Python | |
283 | programming language. Its main purpose is to make the development of software | |
284 | for convex optimization applications straightforward by building on Python’s | |
285 | extensive standard library and on the strengths of Python as a high-level | |
286 | programming language.") | |
287 | (license license:gpl3+))) | |
288 | ||
289 | (define-public python2-cvxopt | |
290 | (package-with-python2 python-cvxopt)) | |
291 | ||
8f8b2451 AE |
292 | (define-public units |
293 | (package | |
294 | (name "units") | |
494a8cd0 | 295 | (version "2.19") |
8f8b2451 AE |
296 | (source (origin |
297 | (method url-fetch) | |
298 | (uri (string-append "mirror://gnu/units/units-" version | |
299 | ".tar.gz")) | |
300 | (sha256 (base32 | |
494a8cd0 | 301 | "0mk562g7dnidjgfgvkxxpvlba66fh1ykmfd9ylzvcln1vxmi6qj2")))) |
8f8b2451 | 302 | (build-system gnu-build-system) |
0498d248 | 303 | (inputs |
a2549713 EB |
304 | `(("readline" ,readline) |
305 | ("python" ,python-wrapper) ;for 'units_cur' script | |
0498d248 EB |
306 | ("python-requests" ,python-requests))) |
307 | (arguments | |
308 | `(#:phases (modify-phases %standard-phases | |
309 | (add-after 'install 'wrap-units_cur | |
310 | (lambda* (#:key outputs #:allow-other-keys) | |
311 | (let* ((out (assoc-ref outputs "out")) | |
312 | (bin (string-append out "/bin"))) | |
313 | (wrap-program (string-append bin "/units_cur") | |
314 | `("PYTHONPATH" ":" prefix | |
315 | ,(search-path-as-string->list (getenv "PYTHONPATH")))) | |
316 | #t)))))) | |
8f8b2451 AE |
317 | (synopsis "Conversion between thousands of scales") |
318 | (description | |
574e86f9 | 319 | "GNU Units converts numeric quantities between units of measure. It |
7c125ce0 AK |
320 | can handle scale changes through adaptive usage of standard scale |
321 | prefixes (micro-, kilo-, etc.). It can also handle nonlinear | |
322 | conversions such as Fahrenheit to Celsius. Its interpreter is powerful | |
323 | enough to be used effectively as a scientific calculator.") | |
8f8b2451 | 324 | (license license:gpl3+) |
6fd52309 | 325 | (home-page "https://www.gnu.org/software/units/"))) |
c9dfa3c7 | 326 | |
61a529b4 RW |
327 | (define-public double-conversion |
328 | (package | |
329 | (name "double-conversion") | |
1c7d7f3f | 330 | (version "3.1.5") |
b343850e | 331 | (home-page "https://github.com/google/double-conversion") |
61a529b4 | 332 | (source (origin |
2bdc73fb | 333 | (method git-fetch) |
a4de1a65 MB |
334 | (uri (git-reference (url home-page) |
335 | (commit (string-append "v" version)))) | |
2bdc73fb | 336 | (file-name (git-file-name name version)) |
61a529b4 RW |
337 | (sha256 |
338 | (base32 | |
1c7d7f3f | 339 | "0csy4pjw1p8rp6g5qxi2h0ychhhp1fldv7gb761627fs2mclw9gv")))) |
61a529b4 RW |
340 | (build-system cmake-build-system) |
341 | (arguments | |
342 | '(#:test-target "test" | |
343 | #:configure-flags '("-DBUILD_SHARED_LIBS=ON" | |
344 | "-DBUILD_TESTING=ON"))) | |
61a529b4 RW |
345 | (synopsis "Conversion routines for IEEE doubles") |
346 | (description | |
347 | "The double-conversion library provides binary-decimal and decimal-binary | |
348 | routines for IEEE doubles. The library consists of efficient conversion | |
349 | routines that have been extracted from the V8 JavaScript engine.") | |
350 | (license license:bsd-3))) | |
351 | ||
182d6311 ML |
352 | (define-public dionysus |
353 | (package | |
354 | (name "dionysus") | |
bd041e7f | 355 | (version "1.4.0") |
182d6311 ML |
356 | (source (origin |
357 | (method url-fetch) | |
358 | (uri (string-append "mirror://gnu/dionysus/dionysus-" version | |
bd041e7f | 359 | ".tar.xz")) |
182d6311 ML |
360 | (sha256 |
361 | (base32 | |
bd041e7f | 362 | "194pzs1mlsj4ww6v37qq3961h5hckm5h805cv0r14xj3g9wfx2sk")))) |
182d6311 ML |
363 | (build-system gnu-build-system) |
364 | (inputs `(("tcl" ,tcl))) ;for 'tclsh' | |
365 | (synopsis "Local search for universal constants and scientific values") | |
366 | (description | |
367 | "GNU Dionysus is a convenient system for quickly retrieving the values of | |
368 | mathematical constants used in science and engineering. Values can be | |
369 | searched using a simple command-line tool, choosing from three databases: | |
370 | universal constants, atomic numbers, and constants related to | |
371 | semiconductors.") | |
372 | (license license:gpl3+) | |
6fd52309 | 373 | (home-page "https://www.gnu.org/software/dionysus/"))) |
182d6311 | 374 | |
88bd1804 AE |
375 | (define-public gsl |
376 | (package | |
377 | (name "gsl") | |
f3a34b9d | 378 | (version "2.5") |
ab2cc5cd LC |
379 | (source (origin |
380 | (method url-fetch) | |
381 | (uri (string-append "mirror://gnu/gsl/gsl-" | |
382 | version ".tar.gz")) | |
383 | (sha256 | |
384 | (base32 | |
f3a34b9d | 385 | "1395y9hlhqadn5g9j8q22224fds5sd92jxi9czfavjj24myasq04")) |
ab2cc5cd | 386 | (patches (search-patches "gsl-test-i686.patch")))) |
88bd1804 | 387 | (build-system gnu-build-system) |
71e0f288 | 388 | (arguments |
f885fc05 | 389 | `(;; Currently there are numerous tests that fail on "exotic" |
6f766069 EF |
390 | ;; architectures such as aarch64 and ppc64le. |
391 | ,@(if (string-prefix? "aarch64-linux" | |
392 | (or (%current-target-system) (%current-system))) | |
393 | '(#:tests? #f) | |
394 | '()))) | |
395 | (home-page "https://www.gnu.org/software/gsl/") | |
88bd1804 AE |
396 | (synopsis "Numerical library for C and C++") |
397 | (description | |
a22dc0c4 LC |
398 | "The GNU Scientific Library is a library for numerical analysis in C |
399 | and C++. It includes a wide range of mathematical routines, with over 1000 | |
400 | functions in total. Subject areas covered by the library include: | |
401 | differential equations, linear algebra, Fast Fourier Transforms and random | |
402 | numbers.") | |
88bd1804 AE |
403 | (license license:gpl3+))) |
404 | ||
b92eee75 AE |
405 | (define-public glpk |
406 | (package | |
407 | (name "glpk") | |
445929e0 | 408 | (version "4.65") |
b92eee75 AE |
409 | (source |
410 | (origin | |
411 | (method url-fetch) | |
412 | (uri (string-append "mirror://gnu/glpk/glpk-" | |
413 | version ".tar.gz")) | |
414 | (sha256 | |
415 | (base32 | |
445929e0 | 416 | "040sfaa9jclg2nqdh83w71sv9rc1sznpnfiripjdyr48cady50a2")))) |
b92eee75 AE |
417 | (build-system gnu-build-system) |
418 | (inputs | |
419 | `(("gmp" ,gmp))) | |
420 | (arguments | |
421 | `(#:configure-flags '("--with-gmp"))) | |
82110ef6 | 422 | (home-page "https://www.gnu.org/software/glpk/") |
79c311b8 | 423 | (synopsis "GNU Linear Programming Kit, supporting the MathProg language") |
b92eee75 AE |
424 | (description |
425 | "GLPK is a C library for solving large-scale linear programming (LP), | |
426 | mixed integer programming (MIP), and other related problems. It supports the | |
427 | GNU MathProg modeling language, a subset of the AMPL language, and features a | |
428 | translator for the language. In addition to the C library, a stand-alone | |
429 | LP/MIP solver is included in the package.") | |
430 | (license license:gpl3+))) | |
431 | ||
b146763a AE |
432 | (define-public 4ti2 |
433 | (package | |
434 | (name "4ti2") | |
eea4a091 | 435 | (version "1.6.9") |
b146763a AE |
436 | (source |
437 | (origin | |
eea4a091 TGR |
438 | (method url-fetch) |
439 | (uri (string-append "https://github.com/4ti2/4ti2/releases/download/" | |
440 | "Release_" | |
441 | (string-map (lambda (c) (if (char=? c #\.) #\_ c)) | |
442 | version) | |
443 | "/4ti2-" version ".tar.gz")) | |
444 | (sha256 | |
445 | (base32 "0rj92x6p9m3la5gasjbj7sa569im527ffmka5y2sv1amgd3fflrh")))) | |
b146763a AE |
446 | (build-system gnu-build-system) |
447 | (native-inputs | |
448 | `(("which" ,(@ (gnu packages base) which)))) ; for the tests | |
449 | (inputs | |
450 | `(("glpk" ,glpk) | |
451 | ("gmp" ,gmp))) | |
452 | (home-page "http://www.4ti2.de/") | |
453 | (synopsis "Mathematical tool suite for problems on linear spaces") | |
454 | (description | |
455 | "4ti2 implements algorithms for solving algebraic, geometric and | |
456 | combinatorial problems on linear spaces. Among others, it solves systems | |
457 | of linear equations, computes extreme rays of polyhedral cones, solves | |
458 | integer programming problems and computes Markov bases for statistics.") | |
459 | (license license:gpl2+))) | |
460 | ||
53696f10 AE |
461 | (define-public cddlib |
462 | (package | |
463 | (name "cddlib") | |
7fe491fb | 464 | (version "0.94i") |
53696f10 AE |
465 | (source |
466 | (origin | |
467 | (method url-fetch) | |
182dde82 | 468 | (uri (string-append "ftp://ftp.math.ethz.ch/users/fukudak/cdd/cddlib-" |
53696f10 AE |
469 | (string-delete #\. version) ".tar.gz")) |
470 | (sha256 | |
471 | (base32 | |
7fe491fb | 472 | "00zdgiqb91vx6gd2103h3ijij0llspsxc6zz3iw2bll39fvkl4xq")))) |
53696f10 AE |
473 | (build-system gnu-build-system) |
474 | (inputs | |
475 | `(("gmp" ,gmp))) | |
476 | (home-page "https://www.inf.ethz.ch/personal/fukudak/cdd_home/index.html") | |
477 | (synopsis "Library for convex hulls and extreme rays of polyhedra") | |
478 | (description | |
479 | "The C-library cddlib implements the Double Description Method of | |
480 | Motzkin et al. for generating all vertices (i.e. extreme points) and extreme | |
481 | rays of a general convex polyhedron given by a system of linear inequalities | |
482 | in arbitrary dimension. It can also be used for the converse operation of | |
483 | computing convex hulls.") | |
484 | (license license:gpl2+))) | |
485 | ||
865a69dd RW |
486 | (define-public arpack-ng |
487 | (package | |
488 | (name "arpack-ng") | |
f03c4ec6 | 489 | (version "3.6.3") |
c0edb5b5 | 490 | (home-page "https://github.com/opencollab/arpack-ng") |
622ef2b9 MB |
491 | (source (origin |
492 | (method git-fetch) | |
493 | (uri (git-reference (url home-page) (commit version))) | |
494 | (file-name (git-file-name name version)) | |
495 | (sha256 | |
496 | (base32 | |
f03c4ec6 | 497 | "1wljl96yqxc9v8r49c37lscwkdp58kaacfb9p6s6nvpm31haax4y")))) |
865a69dd | 498 | (build-system gnu-build-system) |
c0edb5b5 LC |
499 | (native-inputs |
500 | `(("autoconf" ,autoconf) | |
501 | ("automake" ,automake) | |
502 | ("libtool" ,libtool))) | |
865a69dd RW |
503 | (inputs |
504 | `(("lapack" ,lapack) | |
19afbea1 | 505 | ("fortran" ,gfortran))) |
865a69dd RW |
506 | (synopsis "Fortran subroutines for solving eigenvalue problems") |
507 | (description | |
508 | "ARPACK-NG is a collection of Fortran77 subroutines designed to solve | |
509 | large scale eigenvalue problems.") | |
166191b3 | 510 | (license (license:non-copyleft "file://COPYING" |
865a69dd RW |
511 | "See COPYING in the distribution.")))) |
512 | ||
c0edb5b5 LC |
513 | (define-public arpack-ng-3.3.0 |
514 | (package | |
515 | (inherit arpack-ng) | |
516 | (version "3.3.0") | |
517 | (name (package-name arpack-ng)) | |
518 | (home-page (package-home-page arpack-ng)) | |
519 | (source | |
520 | (origin | |
521 | (method url-fetch) | |
522 | (uri (string-append home-page "/archive/" version ".tar.gz")) | |
523 | (file-name (string-append name "-" version ".tar.gz")) | |
524 | (sha256 | |
525 | (base32 | |
526 | "1cz53wqzcf6czmcpfb3vb61xi0rn5bwhinczl65hpmbrglg82ndd")))))) | |
527 | ||
8c94c886 EB |
528 | (define-public arpack-ng-openmpi |
529 | (package (inherit arpack-ng) | |
530 | (name "arpack-ng-openmpi") | |
531 | (inputs | |
532 | `(("mpi" ,openmpi) | |
533 | ,@(package-inputs arpack-ng))) | |
4f387541 LC |
534 | (arguments |
535 | (substitute-keyword-arguments (package-arguments arpack-ng) | |
536 | ((#:configure-flags _ '()) | |
aa82260b PG |
537 | ''("--enable-mpi")) |
538 | ((#:phases phases '%standard-phases) | |
539 | `(modify-phases ,phases | |
bbe46a4a EB |
540 | (add-before 'check 'mpi-setup |
541 | ,%openmpi-setup))))) | |
8c94c886 EB |
542 | (synopsis "Fortran subroutines for solving eigenvalue problems with MPI"))) |
543 | ||
da95c817 NK |
544 | (define-public lapack |
545 | (package | |
546 | (name "lapack") | |
ef39a177 | 547 | (version "3.7.1") |
da95c817 NK |
548 | (source |
549 | (origin | |
550 | (method url-fetch) | |
551 | (uri (string-append "http://www.netlib.org/lapack/lapack-" | |
552 | version ".tgz")) | |
553 | (sha256 | |
554 | (base32 | |
7c0d4c3a | 555 | "1j51r7n5w4k7r3lrvy7710xrpkg40wf4rqnmngfz6ck9ypckzign")))) |
da95c817 NK |
556 | (build-system cmake-build-system) |
557 | (home-page "http://www.netlib.org/lapack/") | |
19afbea1 | 558 | (inputs `(("fortran" ,gfortran) |
da95c817 NK |
559 | ("python" ,python-2))) |
560 | (arguments | |
3ab869b6 | 561 | `(#:configure-flags (list |
3ab869b6 LC |
562 | "-DBUILD_SHARED_LIBS:BOOL=YES" |
563 | "-DLAPACKE=ON" | |
564 | ||
565 | ;; Build the 'LAPACKE_clatms' functions. | |
566 | "-DLAPACKE_WITH_TMG=ON") | |
dc1d3cde KK |
567 | #:phases |
568 | (modify-phases %standard-phases | |
569 | (add-before 'check 'patch-python | |
570 | (lambda* (#:key inputs #:allow-other-keys) | |
571 | (let ((python (assoc-ref inputs "python"))) | |
572 | (substitute* "lapack_testing.py" | |
573 | (("/usr/bin/env python") python))) | |
574 | #t))))) | |
da95c817 NK |
575 | (synopsis "Library for numerical linear algebra") |
576 | (description | |
577 | "LAPACK is a Fortran 90 library for solving the most commonly occurring | |
578 | problems in numerical linear algebra.") | |
166191b3 | 579 | (license (license:non-copyleft "file://LICENSE" |
da95c817 | 580 | "See LICENSE in the distribution.")))) |
73fed4f8 | 581 | |
e1ff597a EB |
582 | (define-public scalapack |
583 | (package | |
584 | (name "scalapack") | |
585 | (version "2.0.2") | |
586 | (source | |
587 | (origin | |
588 | (method url-fetch) | |
589 | (uri (string-append "http://www.netlib.org/scalapack/scalapack-" | |
590 | version ".tgz")) | |
591 | (sha256 | |
592 | (base32 | |
f73750e6 EB |
593 | "0p1r61ss1fq0bs8ynnx7xq4wwsdvs32ljvwjnx6yxr8gd6pawx0c")) |
594 | (patches (search-patches "scalapack-blacs-mpi-deprecations.patch")))) | |
e1ff597a EB |
595 | (build-system cmake-build-system) |
596 | (inputs | |
597 | `(("mpi" ,openmpi) | |
598 | ("fortran" ,gfortran) | |
599 | ("lapack" ,lapack))) ;for testing only | |
600 | (arguments | |
6df2a50a LC |
601 | `(#:configure-flags `("-DBUILD_SHARED_LIBS:BOOL=YES") |
602 | #:phases (modify-phases %standard-phases | |
bbe46a4a EB |
603 | (add-before 'check 'mpi-setup |
604 | ,%openmpi-setup)))) | |
e1ff597a EB |
605 | (home-page "http://www.netlib.org/scalapack/") |
606 | (synopsis "Library for scalable numerical linear algebra") | |
607 | (description | |
608 | "ScaLAPACK is a Fortran 90 library of high-performance linear algebra | |
609 | routines on parallel distributed memory machines. ScaLAPACK solves dense and | |
610 | banded linear systems, least squares problems, eigenvalue problems, and | |
611 | singular value problems.") | |
adb223b8 LC |
612 | (license (license:non-copyleft "file://LICENSE" |
613 | "See LICENSE in the distribution.")))) | |
e1ff597a | 614 | |
73fed4f8 | 615 | (define-public gnuplot |
5f800540 KK |
616 | (package |
617 | (name "gnuplot") | |
cb1d8aee | 618 | (version "5.2.7") |
5f800540 KK |
619 | (source (origin |
620 | (method url-fetch) | |
621 | (uri (string-append "mirror://sourceforge/gnuplot/gnuplot/" | |
622 | version "/gnuplot-" | |
623 | version ".tar.gz")) | |
624 | (sha256 | |
cb1d8aee | 625 | (base32 "1vglp4la40f5dpj0zdj63zprrkyjgzy068p35bz5dqxjyczm1zlp")))) |
5f800540 KK |
626 | (build-system gnu-build-system) |
627 | (inputs `(("readline" ,readline) | |
628 | ("cairo" ,cairo) | |
629 | ("pango" ,pango) | |
6e64766a DM |
630 | ("gd" ,gd) |
631 | ("lua" ,lua))) | |
612a387f RW |
632 | (native-inputs |
633 | `(("pkg-config" ,pkg-config) | |
634 | ("texlive" ,texlive-tiny))) | |
07254d8b AM |
635 | (arguments `(#:configure-flags (list (string-append |
636 | "--with-texdir=" %output | |
637 | "/texmf-local/tex/latex/gnuplot")))) | |
5f800540 KK |
638 | (home-page "http://www.gnuplot.info") |
639 | (synopsis "Command-line driven graphing utility") | |
640 | (description "Gnuplot is a portable command-line driven graphing | |
35b9e423 | 641 | utility. It was originally created to allow scientists and students to |
73fed4f8 | 642 | visualize mathematical functions and data interactively, but has grown to |
35b9e423 | 643 | support many non-interactive uses such as web scripting. It is also used as a |
73fed4f8 | 644 | plotting engine by third-party applications like Octave.") |
5f800540 KK |
645 | ;; X11 Style with the additional restriction that derived works may only be |
646 | ;; distributed as patches to the original. | |
647 | (license (license:fsf-free | |
648 | "http://gnuplot.cvs.sourceforge.net/gnuplot/gnuplot/Copyright")))) | |
668c06ac | 649 | |
32f70e1f TD |
650 | (define-public gctp |
651 | (package | |
652 | (name "gctp") | |
653 | (version "2.0.0") | |
654 | (source | |
655 | (origin | |
5db874d1 TGR |
656 | (method git-fetch) |
657 | (uri (git-reference | |
658 | (url "https://github.com/OkoSanto/GCTP.git") | |
659 | (commit (string-append "v" version)))) | |
660 | (file-name (git-file-name name version)) | |
32f70e1f | 661 | (sha256 |
5db874d1 | 662 | (base32 "11wqmd443b4nksdbzp1msdws3av948nmwq1xz80w6hka3ss2aigd")))) |
32f70e1f TD |
663 | (native-inputs |
664 | `(("fortran" ,gfortran))) | |
665 | (build-system gnu-build-system) | |
666 | (synopsis "General Cartographic Transformation Package (GCTP)") | |
667 | (description | |
668 | "The General Cartographic Transformation Package (GCTP) is a system of | |
669 | software routines designed to permit the transformation of coordinate pairs | |
670 | from one map projection to another. The GCTP is the standard computer | |
671 | software used by the National Mapping Division for map projection | |
672 | computations.") | |
673 | (home-page "https://github.com/OkoSanto/GCTP") | |
0f7cd95b | 674 | (license license:public-domain))) ;https://www2.usgs.gov/laws/info_policies.html |
32f70e1f | 675 | |
becbbefc TD |
676 | (define-public hdf4 |
677 | (package | |
678 | (name "hdf4") | |
c959d99f | 679 | (version "4.2.14") |
becbbefc TD |
680 | (source |
681 | (origin | |
682 | (method url-fetch) | |
683 | (uri (string-append "https://support.hdfgroup.org/ftp/HDF/releases/HDF" | |
684 | version "/src/hdf-" version ".tar.bz2")) | |
685 | (sha256 | |
c959d99f | 686 | (base32 "0n29klrrbwan9307np0d9hr128dlpc4nnlf57a140080ll3jmp8l")) |
15ca49b2 AE |
687 | (patches (search-patches "hdf4-architectures.patch" |
688 | "hdf4-reproducibility.patch" | |
bd3d71cb MB |
689 | "hdf4-shared-fortran.patch" |
690 | "hdf4-tirpc.patch")))) | |
becbbefc TD |
691 | (build-system gnu-build-system) |
692 | (native-inputs | |
693 | `(("gfortran" ,gfortran) | |
694 | ("bison" ,bison) | |
695 | ("flex" ,flex))) | |
696 | (inputs | |
697 | `(("zlib" ,zlib) | |
bd3d71cb MB |
698 | ("libjpeg" ,libjpeg) |
699 | ("libtirpc" ,libtirpc))) | |
becbbefc TD |
700 | (arguments |
701 | `(#:parallel-tests? #f | |
bd3d71cb MB |
702 | #:configure-flags (list "--enable-shared" |
703 | (string-append "CPPFLAGS=-I" | |
704 | (assoc-ref %build-inputs "libtirpc") | |
705 | "/include/tirpc")) | |
becbbefc TD |
706 | #:phases |
707 | (modify-phases %standard-phases | |
953a12fa EF |
708 | ;; This is inspired by two of Debian's patches. |
709 | (add-before 'configure 'add-more-aarch64-support | |
710 | (lambda _ | |
711 | (substitute* '("mfhdf/ncgen/ncgen.l" | |
712 | "mfhdf/ncgen/ncgenyy.c" | |
713 | "mfhdf/libsrc/netcdf.h.in") | |
714 | (("AIX5L64") "__aarch64__")) | |
715 | #t)) | |
becbbefc TD |
716 | (add-before 'configure 'patchbuild |
717 | (lambda _ | |
718 | (substitute* | |
719 | '("mfhdf/hdfimport/testutil.sh.in" "hdf/util/testutil.sh.in") | |
720 | (("/bin/rm") "rm") | |
721 | (("/bin/mkdir") "mkdir")) | |
722 | (substitute* (find-files "." "^Makefile\\.in$") | |
723 | (("@HDF_BUILD_XDR_TRUE@XDR_ADD = \ | |
724 | -R\\$\\(abs_top_builddir\\)/mfhdf/xdr/\\.libs") "") | |
725 | (("@HDF_BUILD_SHARED_TRUE@AM_LDFLAGS = \ | |
726 | -R\\$\\(abs_top_builddir\\)/mfhdf/libsrc/\\.libs \ | |
953a12fa | 727 | -R\\$\\(abs_top_builddir\\)/hdf/src/\\.libs \\$\\(XDR_ADD\\)") "")) |
e464b455 TD |
728 | #t)) |
729 | (add-after 'configure 'patch-settings | |
730 | (lambda _ | |
731 | ;; libhdf4.settings contains the full path of the | |
732 | ;; compilers used, and its contents are included in | |
733 | ;; .so-files. We truncate the hashes to avoid | |
734 | ;; unnecessary store references to those compilers: | |
735 | (substitute* "libhdf4.settings" | |
736 | (("(/gnu/store/)([a-Z0-9]*)" all prefix hash) | |
737 | (string-append prefix (string-take hash 10) "..."))) | |
738 | #t)) | |
739 | ))) | |
becbbefc TD |
740 | (home-page "https://www.hdfgroup.org/products/hdf4/") |
741 | (synopsis | |
742 | "Library and multi-object file format for storing and managing data") | |
743 | (description "HDF4 is a library and multi-object file format for storing | |
744 | and managing data between machines. HDF4 is an older hierarchical data format, | |
745 | incompatible with HDF5.") | |
746 | (license | |
747 | (license:non-copyleft | |
748 | "https://www.hdfgroup.org/ftp/HDF/HDF_Current/src/unpacked/COPYING")))) | |
749 | ||
750 | (define-public hdf4-alt | |
751 | (package | |
752 | (inherit hdf4) | |
753 | (name "hdf4-alt") | |
754 | (arguments | |
755 | (substitute-keyword-arguments (package-arguments hdf4) | |
756 | ((#:configure-flags flags) `(cons* "--disable-netcdf" ,flags)))) | |
757 | (synopsis | |
758 | "HDF4 without netCDF API, can be combined with the regular netCDF library"))) | |
759 | ||
7ee3f1a2 JD |
760 | (define-public hdf5 |
761 | (package | |
762 | (name "hdf5") | |
7b84610e | 763 | (version "1.8.21") |
7ee3f1a2 JD |
764 | (source |
765 | (origin | |
766 | (method url-fetch) | |
2da63064 TD |
767 | (uri (list (string-append "https://support.hdfgroup.org/ftp/HDF5/releases/" |
768 | "hdf5-" (version-major+minor version) | |
769 | "/hdf5-" version "/src/hdf5-" | |
dcd9d163 LF |
770 | version ".tar.bz2") |
771 | (string-append "https://support.hdfgroup.org/ftp/HDF5/" | |
772 | "current" | |
7b84610e EB |
773 | (match (string-split version #\.) |
774 | ((major minor _ ...) | |
775 | (string-append major minor))) | |
dcd9d163 | 776 | "/src/hdf5-" version ".tar.bz2"))) |
7ee3f1a2 | 777 | (sha256 |
7b84610e | 778 | (base32 "03glk4w4wyb1jyb443g53y3y1ncnf6mj2cqwm6avfr2awkgb3cg5")) |
7fedc3fd EB |
779 | (patches (search-patches "hdf5-config-date.patch" |
780 | "hdf5-1.8-mpi-deprecations.patch")))) | |
7ee3f1a2 | 781 | (build-system gnu-build-system) |
12ed1216 AE |
782 | (inputs |
783 | `(("zlib" ,zlib))) | |
e3a1a1de | 784 | (native-inputs |
3ea420f3 LC |
785 | `(("gfortran" ,gfortran) |
786 | ("perl" ,perl))) ;part of the test machinery needs Perl | |
e3a1a1de TD |
787 | (outputs '("out" ; core library |
788 | "fortran")) ; fortran interface | |
7ee3f1a2 | 789 | (arguments |
62126576 | 790 | `(;; Some of the users, notably Flann, need the C++ interface. |
e3a1a1de TD |
791 | #:configure-flags '("--enable-cxx" |
792 | "--enable-fortran" | |
549d1571 LC |
793 | "--enable-fortran2003" |
794 | ||
795 | ;; Build a thread-safe library. Unfortunately, | |
796 | ;; 'configure' invites you to either turn off C++, | |
797 | ;; Fortran, and the high-level interface (HL), or | |
798 | ;; to pass '--enable-unsupported'. Debian | |
799 | ;; packagers chose to pass '--enable-unsupported' | |
800 | ;; and we follow their lead here. | |
801 | "--enable-threadsafe" | |
802 | "--with-pthread" | |
803 | "--enable-unsupported") | |
4dba441c RW |
804 | ;; Use -fPIC to allow the R bindings to link with the static libraries |
805 | #:make-flags (list "CFLAGS=-fPIC" | |
806 | "CXXFLAGS=-fPIC") | |
62126576 | 807 | #:phases |
f622e212 EB |
808 | (modify-phases %standard-phases |
809 | (add-before 'configure 'patch-configure | |
e3a1a1de | 810 | (lambda* (#:key outputs #:allow-other-keys) |
f622e212 | 811 | (substitute* "configure" |
b8d9c93b | 812 | (("/bin/mv") "mv")) |
e3a1a1de TD |
813 | (substitute* "fortran/src/Makefile.in" |
814 | (("libhdf5_fortran_la_LDFLAGS =") | |
815 | (string-append "libhdf5_fortran_la_LDFLAGS = -Wl-rpath=" | |
816 | (assoc-ref outputs "fortran") "/lib"))) | |
817 | (substitute* "hl/fortran/src/Makefile.in" | |
818 | (("libhdf5hl_fortran_la_LDFLAGS =") | |
819 | (string-append "libhdf5hl_fortran_la_LDFLAGS = -Wl,-rpath=" | |
820 | (assoc-ref outputs "fortran") "/lib"))) | |
b8d9c93b | 821 | #t)) |
fd0378a1 TD |
822 | (add-after 'configure 'patch-settings |
823 | (lambda _ | |
824 | ;; libhdf5.settings contains the full path of the | |
825 | ;; compilers used, and its contents are included in | |
826 | ;; libhdf5.so. We truncate the hashes to avoid | |
827 | ;; unnecessary store references to those compilers: | |
828 | (substitute* "src/libhdf5.settings" | |
829 | (("(/gnu/store/)([a-Z0-9]*)" all prefix hash) | |
d8f46d52 RW |
830 | (string-append prefix (string-take hash 10) "...")) |
831 | ;; Don't record the build-time kernel version to make the | |
832 | ;; settings file reproducible. | |
833 | (("Uname information:.*") | |
834 | "Uname information: Linux\n")) | |
b8d9c93b | 835 | #t)) |
f622e212 EB |
836 | (add-after 'install 'patch-references |
837 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
838 | (let ((bin (string-append (assoc-ref outputs "out") "/bin")) | |
839 | (zlib (assoc-ref inputs "zlib"))) | |
840 | (substitute* (find-files bin "h5p?cc") | |
841 | (("-lz" lib) | |
842 | (string-append "-L" zlib "/lib " lib))) | |
e3a1a1de TD |
843 | #t))) |
844 | (add-after 'install 'split | |
845 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
846 | ;; Move all fortran-related files | |
847 | (let* ((out (assoc-ref outputs "out")) | |
848 | (bin (string-append out "/bin")) | |
849 | (lib (string-append out "/lib")) | |
850 | (inc (string-append out "/include")) | |
851 | (ex (string-append out "/share/hdf5_examples/fortran")) | |
852 | (fort (assoc-ref outputs "fortran")) | |
853 | (fbin (string-append fort "/bin")) | |
854 | (flib (string-append fort "/lib")) | |
855 | (finc (string-append fort "/include")) | |
856 | (fex (string-append fort "/share/hdf5_examples/fortran"))) | |
857 | (mkdir-p fbin) | |
858 | (mkdir-p flib) | |
859 | (mkdir-p finc) | |
860 | (mkdir-p fex) | |
b0d1e60f PG |
861 | ;; Note: When built with --enable-parallel, the 'h5fc' file |
862 | ;; doesn't exist, hence this condition. | |
863 | (when (file-exists? (string-append bin "/h5fc")) | |
864 | (rename-file (string-append bin "/h5fc") | |
865 | (string-append fbin "/h5fc"))) | |
e3a1a1de TD |
866 | (for-each (lambda (file) |
867 | (rename-file file | |
868 | (string-append flib "/" (basename file)))) | |
869 | (find-files lib ".*fortran.*")) | |
870 | (for-each (lambda (file) | |
871 | (rename-file file | |
872 | (string-append finc "/" (basename file)))) | |
873 | (find-files inc ".*mod")) | |
874 | (for-each (lambda (file) | |
875 | (rename-file file | |
876 | (string-append fex "/" (basename file)))) | |
877 | (find-files ex ".*")) | |
878 | (delete-file-recursively ex)) | |
879 | #t))))) | |
7ee3f1a2 | 880 | (home-page "http://www.hdfgroup.org") |
516e93f8 | 881 | (synopsis "Management suite for extremely large and complex data") |
7ee3f1a2 JD |
882 | (description "HDF5 is a suite that makes possible the management of |
883 | extremely large and complex data collections.") | |
d4bf49b1 EB |
884 | (license (license:x11-style |
885 | "http://www.hdfgroup.org/ftp/HDF5/current/src/unpacked/COPYING")))) | |
7ee3f1a2 | 886 | |
bb47aca5 RW |
887 | (define-public hdf5-1.10 |
888 | (package (inherit hdf5) | |
889 | (version "1.10.4") | |
890 | (source | |
891 | (origin | |
892 | (method url-fetch) | |
893 | (uri (list (string-append "https://support.hdfgroup.org/ftp/HDF5/releases/" | |
894 | "hdf5-" (version-major+minor version) | |
895 | "/hdf5-" version "/src/hdf5-" | |
896 | version ".tar.bz2") | |
897 | (string-append "https://support.hdfgroup.org/ftp/HDF5/" | |
898 | "current" | |
899 | (apply string-append | |
900 | (take (string-split version #\.) 2)) | |
901 | "/src/hdf5-" version ".tar.bz2"))) | |
902 | (sha256 | |
903 | (base32 "1pr85fa1sh2ky6ai2hs3f21lp252grl2cq3wbyi4rh7dm83gyrqj")) | |
7fedc3fd EB |
904 | (patches (search-patches "hdf5-config-date.patch" |
905 | "hdf5-mpi-deprecations.patch")))))) | |
bb47aca5 | 906 | |
2fd26d05 TD |
907 | (define-public hdf-java |
908 | (package | |
2a509880 RW |
909 | (name "hdf-java") |
910 | (version "3.3.2") | |
911 | (source | |
912 | (origin | |
913 | (method url-fetch) | |
914 | (uri (string-append | |
915 | "http://www.hdfgroup.org/ftp/HDF5/releases/HDF-JAVA/hdfjni-" | |
916 | version "/src/CMake-hdfjava-" version ".tar.gz")) | |
917 | (sha256 | |
918 | (base32 "0m1gp2aspcblqzmpqbdpfp6giskws85ds6p5gz8sx7asyp7wznpr")) | |
919 | (modules '((guix build utils))) | |
920 | (snippet ; Make sure we don't use the bundled sources and binaries. | |
921 | `(begin | |
922 | (for-each delete-file | |
923 | (list "SZip.tar.gz" "ZLib.tar.gz" "JPEG8d.tar.gz" | |
924 | "HDF4.tar.gz" "HDF5.tar.gz")) | |
925 | (delete-file-recursively ,(string-append "hdfjava-" version "/lib")) | |
926 | #t)))) | |
927 | (build-system gnu-build-system) | |
928 | (native-inputs | |
929 | `(("jdk" ,icedtea "jdk") | |
930 | ("automake" ,automake) ; For up to date 'config.guess' and 'config.sub'. | |
931 | ;; For tests: | |
932 | ("hamcrest-core" ,java-hamcrest-core) | |
933 | ("junit" ,java-junit) | |
934 | ("slf4j-simple" ,java-slf4j-simple))) | |
935 | (inputs | |
936 | `(("hdf4" ,hdf4) | |
937 | ("hdf5" ,hdf5) | |
938 | ("zlib" ,zlib) | |
939 | ("libjpeg" ,libjpeg) | |
940 | ("slf4j-api" ,java-slf4j-api))) | |
941 | (arguments | |
942 | `(#:configure-flags | |
943 | (list (string-append "--target=" ,(or (%current-target-system) (%current-system))) | |
944 | (string-append "--with-jdk=" (assoc-ref %build-inputs "jdk") "/include," | |
945 | (assoc-ref %build-inputs "jdk") "/lib" ) | |
946 | (string-append "--with-hdf4=" (assoc-ref %build-inputs "hdf4") "/lib") | |
947 | (string-append "--with-hdf5=" (assoc-ref %build-inputs "hdf5") "/lib")) | |
2fd26d05 | 948 | |
2a509880 RW |
949 | #:make-flags |
950 | (list (string-append "HDFLIB=" (assoc-ref %build-inputs "hdf4") "/lib") | |
951 | (string-append "HDF5LIB=" (assoc-ref %build-inputs "hdf5") "/lib") | |
952 | (string-append "ZLIB=" (assoc-ref %build-inputs "zlib") "/lib/libz.so") | |
953 | (string-append "JPEGLIB=" | |
954 | (assoc-ref %build-inputs "libjpeg") "/lib/libjpeg.so") | |
955 | "LLEXT=so") | |
2fd26d05 | 956 | |
2a509880 RW |
957 | #:phases |
958 | (modify-phases %standard-phases | |
959 | (add-before 'configure 'chdir-to-source | |
960 | (lambda _ (chdir ,(string-append "hdfjava-" version)) #t)) | |
961 | (add-before 'configure 'patch-build | |
962 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
963 | (substitute* "configure" | |
964 | (("COPT=\"") "COPT=\"-O2 ") ; CFLAGS is ignored in Makefiles | |
965 | (("/bin/cat") (which "cat"))) | |
966 | ;; Set classpath for compilation | |
967 | (substitute* '("hdf/hdf5lib/Makefile.in" | |
968 | "hdf/hdf5lib/exceptions/Makefile.in" | |
969 | "hdf/hdflib/Makefile.in") | |
970 | (("\\$\\(TOP\\)/lib/slf4j-api-1\\.7\\.5\\.jar") | |
971 | (string-append (assoc-ref inputs "slf4j-api") | |
972 | "/share/java/slf4j-api.jar"))) | |
973 | ;; Replace outdated config.sub and config.guess: | |
974 | (with-directory-excursion "config" | |
975 | (for-each (lambda (file) | |
976 | (install-file | |
977 | (string-append (assoc-ref inputs "automake") | |
978 | "/share/automake-" | |
979 | ,(version-major+minor (package-version automake)) | |
980 | "/" file) ".")) | |
981 | '("config.sub" "config.guess"))) | |
64dc8b0b | 982 | |
2a509880 RW |
983 | ;; Fix embedded version number |
984 | (let ((hdf5version (list ,@(string-split (package-version hdf5) #\.)))) | |
985 | (substitute* "hdf/hdf5lib/H5.java" | |
986 | (("1, 8, 19") | |
987 | (string-join hdf5version ", ")))) | |
64dc8b0b | 988 | |
2a509880 RW |
989 | (mkdir-p (string-append (assoc-ref outputs "out"))) |
990 | ;; Set classpath for tests | |
991 | (let* ((build-dir (getcwd)) | |
992 | (lib (string-append build-dir "/lib")) | |
993 | (jhdf (string-append lib "/jhdf.jar")) | |
994 | (jhdf5 (string-append lib "/jhdf5.jar")) | |
995 | (testjars | |
996 | (map (lambda (i) | |
997 | (string-append (assoc-ref inputs i) | |
998 | "/share/java/" i ".jar")) | |
999 | '("junit" "hamcrest-core" "slf4j-api" "slf4j-simple"))) | |
1000 | (class-path | |
1001 | (string-join `("." ,build-dir ,jhdf ,jhdf5 ,@testjars) ":"))) | |
2fd26d05 | 1002 | |
2a509880 RW |
1003 | (substitute* '("test/hdf5lib/Makefile.in" |
1004 | "test/hdf5lib/junit.sh.in" | |
1005 | "examples/runExample.sh.in") | |
1006 | (("/usr/bin/test") | |
1007 | (string-append (assoc-ref inputs "coreutils") | |
1008 | "/bin/test")) | |
1009 | (("/usr/bin/uname") | |
1010 | (string-append (assoc-ref inputs "coreutils") | |
1011 | "/bin/uname")) | |
1012 | (("CLASSPATH=[^\n]*") | |
1013 | (string-append "CLASSPATH=" class-path))) | |
1014 | (setenv "CLASSPATH" class-path)) | |
1015 | #t)) | |
1016 | (add-before 'check 'build-examples | |
1017 | (lambda _ | |
1018 | (apply invoke `("javac" | |
1019 | ,@(find-files "examples" ".*\\.java")))))) | |
2fd26d05 | 1020 | |
2a509880 | 1021 | #:parallel-build? #f |
2fd26d05 | 1022 | |
2a509880 RW |
1023 | #:parallel-tests? #f )) |
1024 | (home-page "https://support.hdfgroup.org/products/java") | |
1025 | (synopsis "Java interface for the HDF4 and HDF5 libraries") | |
1026 | (description "Java HDF Interface (JHI) and Java HDF5 Interface (JHI5) use | |
2fd26d05 TD |
1027 | the Java Native Interface to wrap the HDF4 and HDF5 libraries, which are |
1028 | implemented in C.") | |
1029 | ||
2a509880 RW |
1030 | ;; BSD-style license: |
1031 | (license (license:x11-style | |
1032 | "https://support.hdfgroup.org/ftp/HDF5/hdf-java\ | |
2fd26d05 TD |
1033 | /current/src/unpacked/COPYING")))) |
1034 | ||
d3c4f3bb TD |
1035 | (define-public hdf-eos2 |
1036 | (package | |
1037 | (name "hdf-eos2") | |
1038 | (version "19.1.0") | |
1039 | (source | |
1040 | (origin | |
1041 | (method url-fetch) | |
1042 | (uri "ftp://edhs1.gsfc.nasa.gov\ | |
1043 | /edhs/hdfeos/latest_release/HDF-EOS2.19v1.00.tar.Z") | |
1044 | (sha256 | |
1045 | (base32 "0c9fcz25s292ldap12wxmlrvnyz99z24p63d8fwx51bf8s0s1zrz")) | |
1046 | (patches (search-patches "hdf-eos2-remove-gctp.patch" | |
1047 | "hdf-eos2-build-shared.patch" | |
1048 | "hdf-eos2-fortrantests.patch")))) | |
1049 | (build-system gnu-build-system) | |
1050 | (native-inputs | |
1051 | `(("gfortran" ,gfortran))) | |
1052 | (inputs | |
1053 | `(("hdf4" ,hdf4-alt) ; assume most HDF-EOS2 users won't use the HDF4 netCDF API | |
25bdbb61 | 1054 | ;; XXX: These inputs are really dependencies of hdf4. |
d3c4f3bb TD |
1055 | ("zlib" ,zlib) |
1056 | ("libjpeg" ,libjpeg) | |
25bdbb61 MB |
1057 | ("libtirpc" ,libtirpc) |
1058 | ||
d3c4f3bb TD |
1059 | ("gctp" ,gctp))) |
1060 | (arguments | |
1061 | `( #:configure-flags '("--enable-install-include" "--enable-shared" | |
1062 | "CC=h4cc -Df2cFortran" "LIBS=-lgctp") | |
1063 | #:parallel-tests? #f)) | |
1064 | (home-page "http://hdfeos.org/software/library.php#HDF-EOS2") | |
1065 | (synopsis "HDF4-based data format for NASA's Earth Observing System") | |
1066 | (description "HDF-EOS2 is a software library built on HDF4 which supports | |
1067 | the construction of data structures used in NASA's Earth Observing | |
1068 | System (Grid, Point and Swath).") | |
1069 | ||
1070 | ;; Source files carry a permissive license header. | |
1071 | (license (license:non-copyleft home-page)))) | |
1072 | ||
0f43f835 TD |
1073 | (define-public hdf-eos5 |
1074 | (package | |
1075 | (name "hdf-eos5") | |
1076 | (version "1.15") | |
1077 | (source (origin | |
1078 | (method url-fetch) | |
1079 | (uri (string-append "ftp://edhs1.gsfc.nasa.gov\ | |
1080 | /edhs/hdfeos5/latest_release/HDF-EOS5." version ".tar.Z")) | |
1081 | (sha256 | |
1082 | (base32 | |
1083 | "1p83333nzzy8rn5chxlm0hrkjjnhh2w1ji8ac0f9q4xzg838i58i")) | |
1084 | (patches (search-patches "hdf-eos5-build-shared.patch" | |
1085 | "hdf-eos5-remove-gctp.patch" | |
1086 | "hdf-eos5-fix-szip.patch" | |
1087 | "hdf-eos5-fortrantests.patch")))) | |
1088 | (native-inputs | |
1089 | `(("gfortran" ,gfortran))) | |
1090 | (build-system gnu-build-system) | |
1091 | (inputs | |
1092 | `(("hdf5" ,hdf5) | |
1093 | ("zlib" ,zlib) | |
1094 | ("gctp" ,gctp))) | |
1095 | (arguments | |
1096 | `(#:configure-flags '("--enable-install-include" "--enable-shared" | |
1097 | "CC=h5cc -Df2cFortran" "LIBS=-lgctp") | |
1098 | #:parallel-tests? #f)) | |
1099 | (synopsis "HDF5-based data format for NASA's Earth Observing System") | |
1100 | (description | |
1101 | "HDF-EOS5 is a software library built on HDF5 to support the construction | |
1102 | of data structures used in NASA's Earth Observing System (Grid, Point and | |
1103 | Swath).") | |
1104 | (home-page "http://www.hdfeos.org/software/library.php#HDF-EOS5") | |
1105 | ||
1106 | ;; Source files carry a permissive license header. | |
1107 | (license (license:non-copyleft home-page)))) | |
1108 | ||
c8378eea EB |
1109 | (define-public hdf5-parallel-openmpi |
1110 | (package (inherit hdf5) | |
1111 | (name "hdf5-parallel-openmpi") | |
1112 | (inputs | |
1113 | `(("mpi" ,openmpi) | |
1114 | ,@(package-inputs hdf5))) | |
1115 | (arguments | |
45201bf2 PG |
1116 | (substitute-keyword-arguments (package-arguments hdf5) |
1117 | ((#:configure-flags flags) | |
549d1571 LC |
1118 | ``("--enable-parallel" |
1119 | ,@(delete "--enable-cxx" | |
1120 | (delete "--enable-threadsafe" ,flags)))) | |
c8378eea EB |
1121 | ((#:phases phases) |
1122 | `(modify-phases ,phases | |
45201bf2 PG |
1123 | (add-after 'build 'mpi-setup |
1124 | ,%openmpi-setup) | |
c8378eea EB |
1125 | (add-before 'check 'patch-tests |
1126 | (lambda _ | |
1127 | ;; OpenMPI's mpirun will exit with non-zero status if it | |
1128 | ;; detects an "abnormal termination", i.e. any process not | |
784c3da1 | 1129 | ;; calling MPI_Finalize(). Since the test is explicitly |
c8378eea EB |
1130 | ;; avoiding MPI_Finalize so as not to have at_exit and thus |
1131 | ;; H5C_flush_cache from being called, mpirun will always | |
1132 | ;; complain, so turn this test off. | |
1133 | (substitute* "testpar/Makefile" | |
1134 | (("(^TEST_PROG_PARA.*)t_pflush1(.*)" front back) | |
1135 | (string-append front back "\n"))) | |
1136 | (substitute* "tools/h5diff/testph5diff.sh" | |
1137 | (("/bin/sh") (which "sh"))) | |
1138 | #t)))))) | |
1139 | (synopsis "Management suite for data with parallel IO support"))) | |
1140 | ||
00775104 EB |
1141 | (define-public h5check |
1142 | (package | |
1143 | (name "h5check") | |
1144 | (version "2.0.1") | |
1145 | (source | |
1146 | (origin | |
1147 | (method url-fetch) | |
1148 | (uri (string-append "http://www.hdfgroup.org/ftp/HDF5/tools/" | |
1149 | "h5check/src/h5check-" version ".tar.gz")) | |
1150 | (sha256 | |
1151 | (base32 | |
1152 | "1gm76jbwhz9adbxgn14zx8cj33dmjdr2g5xcy0m9c2gakp8w59kj")))) | |
1153 | (build-system gnu-build-system) | |
1154 | (inputs `(("hdf5" ,hdf5))) ;h5cc for tests | |
1155 | (home-page "https://www.hdfgroup.org/products/hdf5_tools/h5check.html") | |
1156 | (synopsis "HDF5 format checker") | |
1157 | (description "@code{h5check} is a validation tool for verifying that an | |
1158 | HDF5 file is encoded according to the HDF File Format Specification.") | |
1159 | (license (license:x11-style "file://COPYING")))) | |
1160 | ||
a53d6719 JD |
1161 | (define-public itpp |
1162 | (package | |
1163 | (name "itpp") | |
1164 | (version "4.3.1") | |
1165 | (source (origin | |
1166 | (method url-fetch) | |
1167 | (uri (string-append "mirror://sourceforge/itpp/itpp/" | |
1168 | version "/itpp-" | |
1169 | version ".tar.gz")) | |
1170 | (sha256 | |
1171 | (base32 | |
1172 | "14ddy2xnb6sgp4hiax9v5sv4pr4l4dd4ps76nfha3nrpr1ikhcqm")))) | |
1173 | (build-system cmake-build-system) | |
1174 | (arguments `(#:tests? #f)) ; Tests require googletest *sources* | |
1175 | (inputs `(("lapack" ,lapack) | |
1176 | ("fftw" ,fftw))) | |
3a4d5df2 RW |
1177 | ;; FIXME: Even though the fonts are available dvips complains: |
1178 | ;; "Font cmmi10 not found; characters will be left blank." | |
1179 | (native-inputs | |
1180 | `(("texlive" ,texlive-tiny) | |
1181 | ("ghostscript" ,ghostscript) | |
1182 | ("doxygen" ,doxygen))) | |
a53d6719 JD |
1183 | (home-page "http://itpp.sourceforge.net") |
1184 | (synopsis "C++ library of maths, signal processing and communication classes") | |
1185 | (description "IT++ is a C++ library of mathematical, signal processing and | |
1186 | communication classes and functions. Its main use is in simulation of | |
1187 | communication systems and for performing research in the area of | |
1188 | communications. The kernel of the library consists of generic vector and | |
1189 | matrix classes, and a set of accompanying routines. Such a kernel makes IT++ | |
1190 | similar to MATLAB, GNU Octave or SciPy.") | |
1191 | (license license:gpl3+))) | |
1192 | ||
889187a4 EB |
1193 | (define-public netcdf |
1194 | (package | |
1195 | (name "netcdf") | |
a4b0bfb1 | 1196 | (version "4.4.1.1") |
889187a4 EB |
1197 | (source |
1198 | (origin | |
1199 | (method url-fetch) | |
1200 | (uri (string-append "ftp://ftp.unidata.ucar.edu/pub/netcdf/" | |
1201 | "netcdf-" version ".tar.gz")) | |
1202 | (sha256 | |
1203 | (base32 | |
a4b0bfb1 EB |
1204 | "1blc7ik5yin7i0ls2kag0a9xjk12m0dzx6v1x88az3ras3scci2d")) |
1205 | (patches (search-patches "netcdf-date-time.patch" | |
1206 | "netcdf-tst_h_par.patch")))) | |
889187a4 EB |
1207 | (build-system gnu-build-system) |
1208 | (native-inputs | |
1209 | `(("m4" ,m4) | |
1210 | ("doxygen" ,doxygen) | |
1211 | ("graphviz" ,graphviz))) | |
1212 | (inputs | |
db825570 TD |
1213 | `(("hdf4" ,hdf4-alt) |
1214 | ("hdf5" ,hdf5) | |
1215 | ("zlib" ,zlib) | |
1216 | ("libjpeg" ,libjpeg))) | |
889187a4 | 1217 | (arguments |
db825570 | 1218 | `(#:configure-flags '("--enable-doxygen" "--enable-dot" "--enable-hdf4") |
43d01672 TD |
1219 | |
1220 | #:phases (modify-phases %standard-phases | |
1221 | (add-before 'configure 'fix-source-date | |
1222 | (lambda _ | |
1223 | ;; As we ${SOURCE_DATE_EPOCH} evaluates to "1" in the build | |
1224 | ;; environment, `date -u -d ${SOURCE_DATE_EPOCH}` will evaluate | |
1225 | ;; to '1st hour of the current day', and therefore makes the | |
1226 | ;; package not reproducible. | |
1227 | (substitute* "./configure" | |
1228 | (("date -u -d \"\\$\\{SOURCE_DATE_EPOCH\\}\"") | |
1229 | "date --date='@0'")) | |
1230 | #t)) | |
1231 | (add-after 'configure 'patch-settings | |
1232 | (lambda _ | |
1233 | ;; libnetcdf.settings contains the full filename of the compilers | |
1234 | ;; used to build the library. We truncate the hashes of those | |
1235 | ;; filenames to avoid unnecessary references to the corresponding | |
1236 | ;; store items. | |
1237 | (substitute* "libnetcdf.settings" | |
1238 | (("(/gnu/store/)([a-Z0-9]*)" all prefix hash) | |
1239 | (string-append prefix (string-take hash 10) "..."))) | |
1240 | #t))) | |
1241 | ||
889187a4 EB |
1242 | #:parallel-tests? #f)) ;various race conditions |
1243 | (home-page "http://www.unidata.ucar.edu/software/netcdf/") | |
1244 | (synopsis "Library for scientific data") | |
1245 | (description "NetCDF is an interface for scientific data access and a | |
1246 | software library that provides an implementation of the interface. The netCDF | |
1247 | library defines a machine-independent format for representing scientific data. | |
1248 | Together, the interface, library, and format support the creation, access, and | |
1249 | sharing of scientific data.") | |
1250 | (license (license:x11-style "file://COPYRIGHT")))) | |
1251 | ||
1252 | (define-public netcdf-parallel-openmpi | |
1253 | (package (inherit netcdf) | |
1254 | (name "netcdf-parallel-openmpi") | |
1255 | (inputs | |
1256 | `(("mpi" ,openmpi) | |
1257 | ,@(alist-replace "hdf5" (list hdf5-parallel-openmpi) | |
1258 | (package-inputs netcdf)))) | |
1259 | ;; TODO: Replace pkg-config references in nc-config with absolute references | |
1260 | (arguments | |
1261 | (substitute-keyword-arguments (package-arguments netcdf) | |
1262 | ((#:configure-flags flags) | |
1263 | `(cons* "CC=mpicc" "CXX=mpicxx" | |
1264 | "--enable-parallel-tests" | |
1265 | ;; Shared libraries not supported with parallel IO. | |
1266 | "--disable-shared" "--with-pic" | |
1267 | ,flags)))))) | |
1268 | ||
300200b6 TD |
1269 | (define-public netcdf-fortran |
1270 | (package | |
1271 | (name "netcdf-fortran") | |
1272 | (version "4.4.4") | |
1273 | (source (origin | |
1274 | (method url-fetch) | |
1275 | (uri (string-append | |
1276 | "ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-fortran-" | |
1277 | version ".tar.gz")) | |
1278 | (sha256 | |
1279 | (base32 | |
1280 | "0xaxdcg1p83zmypwml3swsnr3ccn38inwldyr1l3wa4dbwbrblxj")))) | |
1281 | (build-system gnu-build-system) | |
1282 | (arguments | |
1283 | `(#:parallel-tests? #f)) | |
1284 | (inputs | |
1285 | `(("netcdf" ,netcdf))) | |
1286 | (native-inputs | |
1287 | `(("gfortran" ,gfortran))) | |
1288 | (synopsis "Fortran interface for the netCDF library") | |
1289 | (description (package-description netcdf)) | |
1290 | (home-page (package-home-page netcdf)) | |
1291 | (license (package-license netcdf)))) | |
1292 | ||
1b39a196 RJ |
1293 | (define-public nlopt |
1294 | (package | |
1295 | (name "nlopt") | |
1296 | (version "2.4.2") | |
1297 | (source (origin | |
1298 | (method url-fetch) | |
1299 | (uri (string-append "http://ab-initio.mit.edu/nlopt/nlopt-" | |
1300 | version ".tar.gz")) | |
1301 | (sha256 | |
1302 | (base32 "12cfkkhcdf4zmb6h7y6qvvdvqjs2xf9sjpa3rl3bq76px4yn76c0")))) | |
1303 | (build-system gnu-build-system) | |
1304 | (arguments | |
1305 | `(;; Shared libraries are not built by default. They are required to | |
1306 | ;; build the Guile, Octave, and Python bindings. | |
1307 | #:configure-flags '("--enable-shared") | |
1308 | ||
1309 | #:phases | |
1310 | (modify-phases %standard-phases | |
1311 | (add-before 'configure 'set-libnlopt-file-name | |
1312 | (lambda* (#:key outputs #:allow-other-keys) | |
1313 | ;; Make sure the Scheme module refers to the library by its | |
1314 | ;; absolute file name (we cannot do that from a snippet | |
1315 | ;; because the expansion of @libdir@ contains | |
1316 | ;; ${exec_prefix}.) | |
1317 | (let ((out (assoc-ref outputs "out"))) | |
1318 | (substitute* "swig/nlopt.scm.in" | |
1319 | (("libnlopt") | |
1320 | (string-append out "/lib/libnlopt"))) | |
1321 | #t)))))) | |
1322 | (inputs `(("guile" ,guile-2.0))) | |
1323 | (native-inputs `(("pkg-config" ,pkg-config))) | |
1324 | (home-page "http://ab-initio.mit.edu/wiki/") | |
1325 | (synopsis "Library for nonlinear optimization") | |
1326 | (description "NLopt is a library for nonlinear optimization, providing a | |
1327 | common interface for a number of different free optimization routines available | |
1328 | online as well as original implementations of various other algorithms.") | |
1329 | (license license:lgpl2.1+))) | |
1330 | ||
005c787d LC |
1331 | (define-public ipopt |
1332 | (package | |
1333 | (name "ipopt") | |
98a5cd51 | 1334 | (version "3.12.12") |
005c787d LC |
1335 | (source (origin |
1336 | (method url-fetch) | |
1337 | (uri (string-append | |
1338 | "http://www.coin-or.org/download/source/Ipopt/Ipopt-" | |
1339 | version".tgz")) | |
1340 | (sha256 | |
1341 | (base32 | |
98a5cd51 | 1342 | "07yn9rzdswjk8n246qq6ci9ssf2bcplkifcpsfz9j6cdxw9vgbkv")) |
005c787d LC |
1343 | (modules '((guix build utils))) |
1344 | (snippet | |
1345 | ;; Make sure we don't use the bundled software. | |
6cbee49d MW |
1346 | '(begin |
1347 | (delete-file-recursively "ThirdParty") | |
1348 | #t)))) | |
005c787d | 1349 | (build-system gnu-build-system) |
ad1c4537 LC |
1350 | (arguments |
1351 | '(#:phases (modify-phases %standard-phases | |
1352 | (add-after 'install 'add--L-flags-in-ipopt.pc | |
1353 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1354 | ;; The '.pc' file lists '-llapack -lblas' in "Libs"; | |
1355 | ;; move it to "Libs.private" where it belongs, and add a | |
1356 | ;; '-L' flag for LAPACK. | |
1357 | (let ((out (assoc-ref outputs "out")) | |
1358 | (lapack (assoc-ref inputs "lapack"))) | |
1359 | (substitute* (string-append out "/lib/pkgconfig/" | |
1360 | "ipopt.pc") | |
1361 | (("Libs: (.*)-llapack -lblas(.*)$" _ before after) | |
1362 | (string-append "Libs: " before " " after "\n" | |
1363 | "Libs.private: " before | |
1364 | "-L" lapack "/lib -llapack -lblas " | |
1365 | after "\n"))) | |
1366 | #t)))))) | |
005c787d LC |
1367 | (native-inputs |
1368 | `(("gfortran" ,gfortran))) | |
1369 | (inputs | |
1370 | ;; TODO: Maybe add dependency on COIN-MUMPS, ASL, and HSL. | |
ad1c4537 | 1371 | `(("lapack" ,lapack))) ;for both libblas and liblapack |
005c787d LC |
1372 | (home-page "http://www.coin-or.org") |
1373 | (synopsis "Large-scale nonlinear optimizer") | |
1374 | (description | |
1375 | "The Interior Point Optimizer (IPOPT) is a software package for | |
1376 | large-scale nonlinear optimization. It provides C++, C, and Fortran | |
1377 | interfaces.") | |
1378 | (license license:epl1.0))) | |
1379 | ||
ecfbc51f RW |
1380 | (define-public clp |
1381 | (package | |
1382 | (name "clp") | |
1383 | (version "1.17.1") | |
1384 | (source (origin | |
1385 | (method url-fetch) | |
1386 | (uri (string-append "https://www.coin-or.org/download/source/" | |
1387 | "Clp/Clp-" version ".tgz")) | |
1388 | (sha256 | |
1389 | (base32 | |
1390 | "1wdg820g3iikf9344ijwsc8sy6c0m6im42bzzizm6rlmkvnmxhk9")) | |
1391 | (modules '((guix build utils))) | |
1392 | (snippet | |
1393 | ;; Make sure we don't use the bundled software. | |
1394 | '(begin | |
1395 | (delete-file-recursively "ThirdParty") | |
1396 | #t)))) | |
1397 | (build-system gnu-build-system) | |
1398 | (native-inputs | |
1399 | `(("gfortran" ,gfortran) | |
1400 | ("pkg-config" ,pkg-config))) | |
1401 | (inputs | |
1402 | `(("openblas" ,openblas))) | |
1403 | (home-page "https://www.coin-or.org") | |
1404 | (synopsis "Linear programming solver") | |
1405 | (description | |
1406 | "CLP is a high quality linear programming solver. Its main strengths are | |
1407 | its dual and primal Simplex algorithms. It also has a barrier algorithm for | |
1408 | linear and quadratic objectives. There are limited facilities for nonlinear | |
1409 | and quadratic objectives using the Simplex algorithm.") | |
1410 | (license license:epl1.0))) | |
1411 | ||
f9940ef1 LC |
1412 | (define-public ceres |
1413 | (package | |
1414 | (name "ceres-solver") | |
e0bee0de | 1415 | (version "1.14.0") |
f9940ef1 LC |
1416 | (home-page "http://ceres-solver.org/") |
1417 | (source (origin | |
1418 | (method url-fetch) | |
1419 | (uri (string-append home-page "ceres-solver-" | |
1420 | version ".tar.gz")) | |
1421 | (sha256 | |
1422 | (base32 | |
e0bee0de | 1423 | "13lfxy8x58w8vprr0nkbzziaijlh0vvqshgahvcgw0mrqdgh0i27")))) |
f9940ef1 LC |
1424 | (build-system cmake-build-system) |
1425 | (arguments | |
1426 | ;; TODO: Build HTML user documentation and install separately. | |
bc3a2e35 | 1427 | '(#:configure-flags '("-DBUILD_EXAMPLES=OFF" |
f9940ef1 LC |
1428 | "-DBUILD_SHARED_LIBS=ON") |
1429 | ||
1430 | #:phases (modify-phases %standard-phases | |
1431 | (add-before 'configure 'set-library-directory | |
1432 | (lambda _ | |
1433 | ;; Install libraries to lib/, not lib64/. | |
1434 | (substitute* "internal/ceres/CMakeLists.txt" | |
1435 | (("set\\(LIB_SUFFIX \"64\"\\)") | |
1436 | "set(LIB_SUFFIX \"\")")) | |
1437 | #t))))) | |
1438 | (native-inputs | |
1439 | `(("pkg-config" ,pkg-config))) | |
468e0b18 LC |
1440 | (propagated-inputs |
1441 | `(("glog" ,glog))) ;for #include <glog/glog.h> | |
f9940ef1 LC |
1442 | (inputs |
1443 | `(("eigen" ,eigen) | |
1444 | ("blas" ,openblas) | |
1445 | ("lapack" ,lapack) | |
1446 | ("suitesparse" ,suitesparse) | |
1447 | ("gflags" ,gflags))) | |
1448 | (synopsis "C++ library for solving large optimization problems") | |
1449 | (description | |
1450 | "Ceres Solver is a C++ library for modeling and solving large, | |
1451 | complicated optimization problems. It is a feature rich, mature and | |
1452 | performant library which has been used in production since 2010. Ceres Solver | |
1453 | can solve two kinds of problems: | |
1454 | @enumerate | |
1455 | @item non-linear least squares problems with bounds constraints; | |
1456 | @item general unconstrained optimization problems. | |
1457 | @end enumerate\n") | |
1458 | (license license:bsd-3))) | |
1459 | ||
b66741ed | 1460 | ;; For a fully featured Octave, users are strongly recommended also to install |
5ca4fe96 | 1461 | ;; the following packages: less, ghostscript, gnuplot. |
5537603f | 1462 | (define-public octave-cli |
668c06ac | 1463 | (package |
5537603f | 1464 | (name "octave-cli") |
5b8f8928 | 1465 | (version "5.1.0") |
668c06ac JD |
1466 | (source |
1467 | (origin | |
1468 | (method url-fetch) | |
1469 | (uri (string-append "mirror://gnu/octave/octave-" | |
f5a077b1 | 1470 | version ".tar.lz")) |
668c06ac JD |
1471 | (sha256 |
1472 | (base32 | |
5b8f8928 | 1473 | "11wwxpy2q1bhxs2v41bqn05i2sb0905cj1xil6mg8l4k2kka4cq6")))) |
668c06ac JD |
1474 | (build-system gnu-build-system) |
1475 | (inputs | |
697df13f EF |
1476 | `(("alsa-lib" ,alsa-lib) |
1477 | ("arpack" ,arpack-ng) | |
1478 | ("curl" ,curl) | |
1ec78e9d EB |
1479 | ("fftw" ,fftw) |
1480 | ("fftwf" ,fftwf) | |
668c06ac JD |
1481 | ("fltk" ,fltk) |
1482 | ("fontconfig" ,fontconfig) | |
1483 | ("freetype" ,freetype) | |
697df13f EF |
1484 | ("gl2ps" ,gl2ps) |
1485 | ("glpk" ,glpk) | |
1ec78e9d | 1486 | ("glu" ,glu) |
ab5f3f21 | 1487 | ("graphicsmagick" ,graphicsmagick) |
697df13f EF |
1488 | ("hdf5" ,hdf5) |
1489 | ("lapack" ,lapack) | |
ab5f3f21 | 1490 | ("libsndfile" ,libsndfile) |
697df13f EF |
1491 | ("libxft" ,libxft) |
1492 | ("mesa" ,mesa) | |
1493 | ("pcre" ,pcre) | |
ab5f3f21 | 1494 | ("portaudio" ,portaudio) |
697df13f EF |
1495 | ("qhull" ,qhull) |
1496 | ("readline" ,readline) | |
1497 | ("suitesparse" ,suitesparse) | |
1498 | ("texinfo" ,texinfo) | |
1499 | ("zlib" ,zlib))) | |
668c06ac | 1500 | (native-inputs |
f5a077b1 EF |
1501 | `(("lzip" ,lzip) |
1502 | ("gfortran" ,gfortran) | |
668c06ac JD |
1503 | ("pkg-config" ,pkg-config) |
1504 | ("perl" ,perl) | |
1ec78e9d EB |
1505 | ;; The following inputs are not actually used in the build process. |
1506 | ;; However, the ./configure gratuitously tests for their existence and | |
1507 | ;; assumes that programs not present at build time are also not, and | |
1508 | ;; can never be, available at run time! If these inputs are therefore | |
1509 | ;; not present, support for them will be built out. However, Octave | |
1510 | ;; will still run without them, albeit without the features they | |
668c06ac JD |
1511 | ;; provide. |
1512 | ("less" ,less) | |
668c06ac JD |
1513 | ("ghostscript" ,ghostscript) |
1514 | ("gnuplot" ,gnuplot))) | |
116af86f KK |
1515 | ;; Octave code uses this variable to detect directories holding multiple CA |
1516 | ;; certificates to verify peers with. This is required for the networking | |
1517 | ;; functions that require encryption to work properly. | |
1518 | (native-search-paths | |
1519 | (list (search-path-specification | |
1520 | (variable "CURLOPT_CAPATH") | |
1521 | (files '("etc/ssl/certs"))))) | |
668c06ac | 1522 | (arguments |
b7b27a8f KY |
1523 | `(#:configure-flags |
1524 | (list (string-append "--with-shell=" | |
1525 | (assoc-ref %build-inputs "bash") | |
5ca4fe96 AI |
1526 | "/bin/sh")) |
1527 | #:phases | |
1528 | (modify-phases %standard-phases | |
1529 | (add-after 'configure 'configure-makeinfo | |
1530 | (lambda* (#:key inputs #:allow-other-keys) | |
b18b9d20 AI |
1531 | (substitute* "libinterp/corefcn/help.h" |
1532 | (("\"makeinfo\"") | |
1533 | (string-append | |
1534 | "\"" (assoc-ref inputs "texinfo") "/bin/makeinfo\""))) | |
5ca4fe96 | 1535 | #t))))) |
f5a077b1 | 1536 | (home-page "https://www.gnu.org/software/octave/") |
668c06ac | 1537 | (synopsis "High-level language for numerical computation") |
1ec78e9d EB |
1538 | (description "GNU Octave is a high-level interpreted language that is |
1539 | specialized for numerical computations. It can be used for both linear and | |
1540 | non-linear applications and it provides great support for visualizing results. | |
1541 | Work may be performed both at the interactive command-line as well as via | |
1542 | script files.") | |
668c06ac | 1543 | (license license:gpl3+))) |
3de01d3f | 1544 | |
e0ae7e73 | 1545 | (define-public octave |
5537603f | 1546 | (package (inherit octave-cli) |
e0ae7e73 | 1547 | (name "octave") |
7a3772b3 | 1548 | (source (origin |
5537603f | 1549 | (inherit (package-source octave-cli)))) |
36ce25f0 KK |
1550 | (inputs |
1551 | `(("qscintilla" ,qscintilla) | |
1552 | ("qt" ,qtbase) | |
5537603f | 1553 | ,@(package-inputs octave-cli))) |
36ce25f0 KK |
1554 | (native-inputs |
1555 | `(("qttools" , qttools) ;for lrelease | |
70bb5d88 | 1556 | ("texlive" ,(texlive-union (list texlive-epsf))) ; for texi2dvi |
5537603f | 1557 | ,@(package-native-inputs octave-cli))) |
36ce25f0 | 1558 | (arguments |
5537603f | 1559 | (substitute-keyword-arguments (package-arguments octave-cli) |
36ce25f0 KK |
1560 | ((#:phases phases) |
1561 | `(modify-phases ,phases | |
1562 | (add-before 'configure 'patch-qscintilla-library-name | |
1563 | (lambda* (#:key inputs #:allow-other-keys) | |
1564 | ;; The QScintilla library that the Octave configure script tries | |
1565 | ;; to link with should be named libqscintilla-qt5.so, but the | |
1566 | ;; QScintilla input provides the shared library as | |
1567 | ;; libqscintilla2_qt5.so. | |
1568 | (substitute* "configure" | |
1569 | (("qscintilla2-qt5") | |
1570 | "qscintilla2_qt5")) | |
1571 | #t)))))))) | |
1572 | ||
e0ae7e73 KK |
1573 | (define-public qtoctave |
1574 | (deprecated-package "qtoctave" octave)) | |
1575 | ||
5d4bd4cc PG |
1576 | (define-public opencascade-oce |
1577 | (package | |
1578 | (name "opencascade-oce") | |
1579 | (version "0.17.2") | |
1580 | (source | |
1581 | (origin | |
830971bf TGR |
1582 | (method git-fetch) |
1583 | (uri (git-reference | |
1584 | (url "https://github.com/tpaviot/oce.git") | |
1585 | (commit (string-append "OCE-" version)))) | |
1586 | (file-name (git-file-name name version)) | |
a4f393b7 | 1587 | (patches (search-patches "opencascade-oce-glibc-2.26.patch")) |
5d4bd4cc | 1588 | (sha256 |
830971bf | 1589 | (base32 "0rg5wzkvfmzfl6v2amyryb8dnjad0nn9kyr607wy2gch6rciah69")))) |
5d4bd4cc PG |
1590 | (build-system cmake-build-system) |
1591 | (arguments | |
1592 | '(#:configure-flags | |
1593 | (list "-DOCE_TESTING:BOOL=ON" | |
1594 | "-DOCE_USE_TCL_TEST_FRAMEWORK:BOOL=ON" | |
1595 | "-DOCE_DRAW:BOOL=ON" | |
1596 | (string-append "-DOCE_INSTALL_PREFIX:PATH=" | |
1597 | (assoc-ref %outputs "out")) | |
1598 | "-UCMAKE_INSTALL_RPATH"))) | |
1599 | (inputs | |
1600 | `(("freetype" ,freetype) | |
1601 | ("glu" ,glu) | |
1602 | ("libxmu" ,libxmu) | |
1603 | ("mesa" ,mesa) | |
1604 | ("tcl" ,tcl) | |
1605 | ("tk" ,tk))) | |
1606 | (native-inputs | |
1607 | `(("python" ,python-wrapper))) | |
1608 | (home-page "https://github.com/tpaviot/oce") | |
1609 | (synopsis "Libraries for 3D modeling and numerical simulation") | |
1610 | (description | |
1611 | "Open CASCADE is a set of libraries for the development of applications | |
1612 | dealing with 3D CAD data or requiring industrial 3D capabilities. It includes | |
1613 | C++ class libraries providing services for 3D surface and solid modeling, CAD | |
1614 | data exchange, and visualization. It is used for development of specialized | |
1615 | software dealing with 3D models in design (CAD), manufacturing (CAM), | |
1616 | numerical simulation (CAE), measurement equipment (CMM), and quality | |
1617 | control (CAQ) domains. | |
1618 | ||
1619 | This is the ``Community Edition'' (OCE) of Open CASCADE, which gathers | |
1620 | patches, improvements, and experiments contributed by users over the official | |
1621 | Open CASCADE library.") | |
1622 | (license (list license:lgpl2.1; OCE libraries, with an exception for the | |
1623 | ; use of header files; see | |
1624 | ; OCCT_LGPL_EXCEPTION.txt | |
1625 | license:public-domain; files | |
1626 | ; src/Standard/Standard_StdAllocator.hxx and | |
1627 | ; src/NCollection/NCollection_StdAllocator.hxx | |
1628 | license:expat; file src/OpenGl/OpenGl_glext.h | |
1629 | license:bsd-3)))); test framework gtest | |
1630 | ||
37dc2920 PG |
1631 | (define-public opencascade-occt |
1632 | (package | |
1633 | (name "opencascade-occt") | |
1634 | (version "7.3.0p3") | |
1635 | (source | |
1636 | (origin | |
1637 | (method git-fetch) | |
1638 | (uri (git-reference | |
1639 | (url "https://git.dev.opencascade.org/repos/occt.git") | |
1640 | (commit | |
1641 | (string-append "V" | |
1642 | (string-map (lambda (x) (if (eq? x #\.) #\_ x)) | |
1643 | version))))) | |
1644 | (file-name (git-file-name name version)) | |
1645 | (sha256 | |
1646 | (base32 "0bdywwxb6mk0ykbiajlvsb37295akqjp0a60y672qjfa67k0ljv4")) | |
1647 | (modules '((guix build utils))) | |
1648 | (snippet | |
1649 | '(begin | |
1650 | ;; Remove files specific to non-free operating systems. | |
1651 | (delete-file-recursively "samples/ios") | |
1652 | (delete-file-recursively "samples/mfc") | |
1653 | (delete-file-recursively "samples/qt/FuncDemo") | |
1654 | (delete-file "genconf.bat") | |
1655 | (delete-file "gendoc.bat") | |
1656 | (delete-file "genproj.bat") | |
1657 | (delete-file "upgrade.bat") | |
1658 | ;; Remove references to deleted files. | |
1659 | (substitute* "dox/FILES_HTML.txt" | |
1660 | ((".*standard.*") "" ) | |
1661 | ((".*UIKitSample.*") "")) | |
1662 | #t)))) | |
1663 | (build-system cmake-build-system) | |
1664 | (arguments | |
1665 | '(;; There is no test target for make. OCCT provides an | |
1666 | ;; 'Automated Testing System', which may be accessed after | |
1667 | ;; installation via the draw.sh script. draw.sh is located in | |
1668 | ;; the bin directory. For details see: | |
1669 | ;; https://www.opencascade.com/doc/occt-7.3.0/overview/html/\ | |
1670 | ;; occt_dev_guides__tests.html | |
1671 | #:tests? #f | |
1672 | ;; Configure without freeimage: attempting to link against the | |
1673 | ;; freeimage version 3.17 library leads to 'undefined | |
1674 | ;; reference' errors. | |
1675 | #:configure-flags | |
1676 | (list "-DUSE_FREEIMAGE:BOOL=OFF" | |
1677 | "-DUSE_TBB:BOOL=ON" | |
1678 | "-DUSE_VTK:BOOL=OFF" | |
1679 | "-DBUILD_DOC_Overview:BOOL=OFF" | |
1680 | "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" | |
1681 | "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" | |
1682 | "-UCMAKE_INSTALL_LIBDIR"))) | |
1683 | (inputs | |
1684 | `(("doxygen" ,doxygen) | |
1685 | ;("freeimage" ,freeimage) | |
1686 | ("freetype" ,freetype) | |
1687 | ("glu" ,glu) | |
1688 | ("libxext" ,libxext) | |
1689 | ("libxi" ,libxi) | |
1690 | ("libxmu" ,libxmu) | |
1691 | ("mesa" ,mesa) | |
1692 | ("tbb" ,tbb) | |
1693 | ("tcl" ,tcl) | |
1694 | ("tk" ,tk))) | |
1695 | ;; TODO: build Overview documentation and add 'doc' output. | |
1696 | (home-page "https://www.opencascade.com") | |
1697 | (synopsis "Libraries for 3D modeling and numerical simulation") | |
1698 | (description | |
1699 | "Open CASCADE is a set of libraries for the development of applications | |
1700 | dealing with 3D CAD data or requiring industrial 3D capabilities. It includes | |
1701 | C++ class libraries providing services for 3D surface and solid modeling, CAD | |
1702 | data exchange, and visualization. It is used for development of specialized | |
1703 | software dealing with 3D models in design (CAD), manufacturing (CAM), | |
1704 | numerical simulation (CAE), measurement equipment (CMM), and quality | |
1705 | control (CAQ) domains. | |
1706 | ||
1707 | This is the certified version of the Open Cascade Technology (OCCT) library.") | |
1708 | (license (list ;; OCCT library: | |
1709 | license:lgpl2.1; with an exception for the use of header | |
1710 | ; files, see OCCT_LGPL_EXCEPTION.txt. | |
1711 | ;; Files src/OpenGl/glext.h, adm/cmake/cotire.cmake and | |
1712 | ;; src/OpenGl/OpenGl_HaltonSampler.hxx: | |
1713 | license:expat | |
1714 | ;; Files src/ExprIntrp/ExprIntrp.tab.* and | |
1715 | ;; src/StepFile/step.tab.*: | |
1716 | license:gpl3+ ; with Bison 2.2 exception. | |
1717 | ;; File src/NCollection/NCollection_UtfIterator.lxx: | |
1718 | (license:non-copyleft | |
1719 | "https://www.unicode.org/license.html") | |
1720 | ;; File src/NCollection/NCollection_StdAllocator.hxx: | |
1721 | license:public-domain)))) | |
1722 | ||
3de01d3f EB |
1723 | (define-public gmsh |
1724 | (package | |
1725 | (name "gmsh") | |
8a4d14fa | 1726 | (version "2.16.0") |
3de01d3f EB |
1727 | (source |
1728 | (origin | |
abed5df7 PG |
1729 | (method git-fetch) |
1730 | (uri (git-reference | |
1731 | (url "https://gitlab.onelab.info/gmsh/gmsh.git") | |
1732 | (commit | |
1733 | (string-append "gmsh_" | |
1734 | (string-map (lambda (x) (if (eq? x #\.) #\_ x)) | |
1735 | version))))) | |
1736 | (file-name (git-file-name name version)) | |
3de01d3f | 1737 | (sha256 |
abed5df7 | 1738 | (base32 "08rq4jajwmlpivnm9yifz2jhaivnz065lnk0h2zv773nwl9wf162")) |
3de01d3f EB |
1739 | (modules '((guix build utils))) |
1740 | (snippet | |
1741 | ;; Remove non-free METIS code | |
6cbee49d MW |
1742 | '(begin |
1743 | (delete-file-recursively "contrib/Metis") | |
1744 | #t)))) | |
3de01d3f | 1745 | (build-system cmake-build-system) |
3de01d3f EB |
1746 | (propagated-inputs |
1747 | `(("fltk" ,fltk) | |
19afbea1 | 1748 | ("gfortran" ,gfortran) |
3de01d3f | 1749 | ("gmp" ,gmp) |
40029cbe | 1750 | ("hdf5" ,hdf5) |
3de01d3f EB |
1751 | ("lapack" ,lapack) |
1752 | ("mesa" ,mesa) | |
85f41902 | 1753 | ("glu" ,glu) |
45548139 | 1754 | ("opencascade-oce" ,opencascade-oce) |
3de01d3f EB |
1755 | ("libx11" ,libx11) |
1756 | ("libxext" ,libxext))) | |
66395a61 EF |
1757 | (inputs |
1758 | `(("fontconfig" ,fontconfig) | |
1759 | ("libxft" ,libxft))) | |
3de01d3f EB |
1760 | (arguments |
1761 | `(#:configure-flags `("-DENABLE_METIS:BOOL=OFF" | |
1762 | "-DENABLE_BUILD_SHARED:BOOL=ON" | |
45548139 | 1763 | "-DENABLE_BUILD_DYNAMIC:BOOL=ON"))) |
0746c33e | 1764 | (home-page "http://gmsh.info/") |
3de01d3f | 1765 | (synopsis "3D finite element grid generator") |
edf684ef EB |
1766 | (description "Gmsh is a 3D finite element grid generator with a built-in |
1767 | CAD engine and post-processor. Its design goal is to provide a fast, light | |
1768 | and user-friendly meshing tool with parametric input and advanced | |
1769 | visualization capabilities. Gmsh is built around four modules: geometry, | |
1770 | mesh, solver and post-processing. The specification of any input to these | |
1771 | modules is done either interactively using the graphical user interface or in | |
1772 | ASCII text files using Gmsh's own scripting language.") | |
3de01d3f | 1773 | (license license:gpl2+))) |
b9100e2f | 1774 | |
6d5f63b6 JD |
1775 | (define-public maxflow |
1776 | (package | |
1777 | (name "maxflow") | |
0af12a13 TGR |
1778 | ;; Versioning is ambiguous: the git tag matching this commit is ‘3.0.5’, |
1779 | ;; which matches CMakeLists.txt, but README.md and CHANGES say ‘3.04’. | |
1780 | (version "3.0.5") | |
6d5f63b6 JD |
1781 | (source (origin |
1782 | (method git-fetch) | |
1783 | (uri (git-reference | |
1784 | (url "https://github.com/gerddie/maxflow.git") | |
0af12a13 | 1785 | (commit version))) |
2dc0a6cf | 1786 | (file-name (git-file-name name version)) |
6d5f63b6 JD |
1787 | (sha256 |
1788 | (base32 | |
1789 | "0rll38whw55h0vcjrrwdnh9ascvxby0ph7n1l0d12z17cg215kkb")))) | |
1790 | (build-system cmake-build-system) | |
0be9038c | 1791 | (home-page "https://pub.ist.ac.at/~vnk/software.html") |
6d5f63b6 JD |
1792 | (synopsis "Library implementing Maxflow algorithm") |
1793 | (description "An implementation of the maxflow algorithm described in | |
1794 | @cite{An Experimental Comparison of Min-Cut/Max-Flow Algorithms for | |
1795 | Energy Minimization in Computer Vision.\n | |
1796 | Yuri Boykov and Vladimir Kolmogorov.\n | |
1797 | In IEEE Transactions on Pattern Analysis and Machine Intelligence,\n | |
1798 | September 2004}") | |
1799 | (license license:gpl3+))) | |
1800 | ||
b9100e2f EB |
1801 | (define-public petsc |
1802 | (package | |
1803 | (name "petsc") | |
4f7a4a06 | 1804 | (version "3.11.2") |
b9100e2f EB |
1805 | (source |
1806 | (origin | |
1807 | (method url-fetch) | |
1808 | ;; The *-lite-* tarball does not contain the *large* documentation | |
1809 | (uri (string-append "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/" | |
1810 | "petsc-lite-" version ".tar.gz")) | |
1811 | (sha256 | |
4f7a4a06 | 1812 | (base32 "1645nwwcp9bcnfnxikk480mhbbacdvhsay2c401818hk97dqj5nx")))) |
b2c52fc9 TGR |
1813 | (outputs '("out" ; libraries and headers |
1814 | "examples")) ; ~30MiB of examples | |
b9100e2f EB |
1815 | (build-system gnu-build-system) |
1816 | (native-inputs | |
6fec298d | 1817 | `(("python" ,python-2))) |
b9100e2f | 1818 | (inputs |
19afbea1 | 1819 | `(("gfortran" ,gfortran) |
b9100e2f | 1820 | ("lapack" ,lapack) |
f258212d | 1821 | ("superlu" ,superlu) |
b9100e2f EB |
1822 | ;; leaving out hdf5 and fftw, as petsc expects them to be built with mpi |
1823 | ;; leaving out opengl, as configuration seems to only be for mac | |
1824 | )) | |
1825 | (arguments | |
1826 | `(#:test-target "test" | |
b2c52fc9 | 1827 | #:parallel-build? #f ; build is parallel by default |
b9100e2f EB |
1828 | #:configure-flags |
1829 | `("--with-mpi=0" | |
f258212d | 1830 | "--with-openmp=1" |
c15be128 | 1831 | "--with-superlu=1") |
9731c412 EB |
1832 | #:make-flags |
1833 | ;; Honor (parallel-job-count) for build. Do not use --with-make-np, | |
1834 | ;; whose value is dumped to $out/lib/petsc/conf/petscvariables. | |
1835 | (list (format #f "MAKE_NP=~a" (parallel-job-count))) | |
b9100e2f | 1836 | #:phases |
64dcc289 EB |
1837 | (modify-phases %standard-phases |
1838 | (replace 'configure | |
1839 | ;; PETSc's configure script is actually a python script, so we can't | |
1840 | ;; run it with bash. | |
1841 | (lambda* (#:key outputs (configure-flags '()) | |
1842 | #:allow-other-keys) | |
1843 | (let* ((prefix (assoc-ref outputs "out")) | |
1844 | (flags `(,(string-append "--prefix=" prefix) | |
1845 | ,@configure-flags))) | |
1846 | (format #t "build directory: ~s~%" (getcwd)) | |
1847 | (format #t "configure flags: ~s~%" flags) | |
49fdd357 | 1848 | (apply invoke "./configure" flags)))) |
64dcc289 | 1849 | (add-after 'configure 'clean-local-references |
9731c412 | 1850 | (lambda* (#:key outputs #:allow-other-keys) |
64dcc289 EB |
1851 | (let ((out (assoc-ref outputs "out"))) |
1852 | (substitute* (find-files "." "^petsc(conf|machineinfo).h$") | |
b730b437 EB |
1853 | ;; Prevent build directory from leaking into compiled code |
1854 | (((getcwd)) out) | |
1855 | ;; Scrub timestamp for reproducibility | |
fafd623e | 1856 | ((".*Libraries compiled on.*") "")) |
9731c412 EB |
1857 | (substitute* (find-files "." "petscvariables") |
1858 | ;; Do not expose build machine characteristics, set to defaults. | |
1859 | (("MAKE_NP = [:digit:]+") "MAKE_NP = 2") | |
1860 | (("NPMAX = [:digit:]+") "NPMAX = 2")) | |
fafd623e | 1861 | #t))) |
64dcc289 | 1862 | (add-after 'install 'clean-install |
10b11968 EB |
1863 | ;; Try to keep installed files from leaking build directory names. |
1864 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
64dcc289 | 1865 | (let ((out (assoc-ref outputs "out"))) |
10b11968 | 1866 | (substitute* (map (lambda (file) |
9a899cce | 1867 | (string-append out "/lib/petsc/conf/" file)) |
fafd623e | 1868 | '("petscvariables")) |
10b11968 EB |
1869 | (((getcwd)) out)) |
1870 | ;; Make compiler references point to the store | |
9a899cce | 1871 | (substitute* (string-append out "/lib/petsc/conf/petscvariables") |
dfdf5716 EB |
1872 | (("= (gcc|g\\+\\+|gfortran)" _ compiler) |
1873 | (string-append "= " (which compiler)))) | |
10b11968 EB |
1874 | ;; PETSc installs some build logs, which aren't necessary. |
1875 | (for-each (lambda (file) | |
9a899cce | 1876 | (let ((f (string-append out "/lib/petsc/conf/" file))) |
10b11968 EB |
1877 | (when (file-exists? f) |
1878 | (delete-file f)))) | |
9a899cce EB |
1879 | '("configure.log" "make.log" "gmake.log" |
1880 | "test.log" "error.log" "RDict.db" | |
fafd623e | 1881 | "PETScBuildInternal.cmake" |
10b11968 | 1882 | ;; Once installed, should uninstall with Guix |
fafd623e | 1883 | "uninstall.py")) |
a3a99e27 EB |
1884 | #t))) |
1885 | (add-after 'install 'move-examples | |
1886 | (lambda* (#:key outputs #:allow-other-keys) | |
1887 | (let* ((out (assoc-ref outputs "out")) | |
1888 | (examples (assoc-ref outputs "examples")) | |
1889 | (exdir (string-append out "/share/petsc/examples")) | |
1890 | (exdir' (string-append examples "/share/petsc/examples"))) | |
1891 | (copy-recursively exdir exdir') | |
1892 | (delete-file-recursively exdir) | |
fafd623e | 1893 | #t)))))) |
b9100e2f | 1894 | (home-page "http://www.mcs.anl.gov/petsc") |
16ecf3ff | 1895 | (synopsis "Library to solve PDEs") |
b9100e2f EB |
1896 | (description "PETSc, pronounced PET-see (the S is silent), is a suite of |
1897 | data structures and routines for the scalable (parallel) solution of | |
1898 | scientific applications modeled by partial differential equations.") | |
166191b3 | 1899 | (license (license:non-copyleft |
b9100e2f EB |
1900 | "http://www.mcs.anl.gov/petsc/documentation/copyright.html")))) |
1901 | ||
1902 | (define-public petsc-complex | |
1903 | (package (inherit petsc) | |
1904 | (name "petsc-complex") | |
1905 | (arguments | |
1906 | (substitute-keyword-arguments (package-arguments petsc) | |
1907 | ((#:configure-flags cf) | |
1908 | `(cons "--with-scalar-type=complex" ,cf)))) | |
16ecf3ff | 1909 | (synopsis "Library to solve PDEs (with complex scalars)"))) |
183e44ae | 1910 | |
d8c7eeb9 EB |
1911 | (define-public petsc-openmpi |
1912 | (package (inherit petsc) | |
1913 | (name "petsc-openmpi") | |
1914 | (inputs | |
9e2aa70b | 1915 | `(("hdf5" ,hdf5-parallel-openmpi) |
af523673 | 1916 | ("hypre" ,hypre-openmpi) |
9e2aa70b PG |
1917 | ("metis" ,metis) |
1918 | ("mumps" ,mumps-openmpi) | |
1919 | ("openmpi" ,openmpi) | |
1920 | ("scalapack" ,scalapack) | |
72f95783 | 1921 | ("scotch" ,pt-scotch32) |
d8c7eeb9 EB |
1922 | ,@(package-inputs petsc))) |
1923 | (arguments | |
1924 | (substitute-keyword-arguments (package-arguments petsc) | |
1925 | ((#:configure-flags cf) | |
af523673 PG |
1926 | ``("--with-hypre=1" |
1927 | "--with-mpiexec=mpirun" | |
9e2aa70b PG |
1928 | "--with-metis=1" |
1929 | "--with-mumps=1" | |
1930 | "--with-scalapack=1" | |
1931 | "--with-ptscotch=1" | |
d8c7eeb9 EB |
1932 | ,(string-append "--with-mpi-dir=" |
1933 | (assoc-ref %build-inputs "openmpi")) | |
71ca16b5 PG |
1934 | ,(string-append "--with-hdf5-include=" |
1935 | (assoc-ref %build-inputs "hdf5") "/include") | |
1936 | ,(string-append "--with-hdf5-lib=" | |
1937 | (assoc-ref %build-inputs "hdf5") "/lib/libhdf5.a") | |
1938 | ,@(delete "--with-mpi=0" ,cf))) | |
1939 | ((#:phases phases) | |
1940 | `(modify-phases ,phases | |
9e2aa70b | 1941 | (add-before 'configure 'mpi-setup |
bbe46a4a | 1942 | ,%openmpi-setup))))) |
9e2aa70b | 1943 | (synopsis "Library to solve PDEs (with MUMPS and MPI support)"))) |
d8c7eeb9 EB |
1944 | |
1945 | (define-public petsc-complex-openmpi | |
1946 | (package (inherit petsc-complex) | |
1947 | (name "petsc-complex-openmpi") | |
1948 | (inputs | |
1949 | `(("openmpi" ,openmpi) | |
1950 | ,@(package-inputs petsc-complex))) | |
1951 | (arguments | |
1952 | (substitute-keyword-arguments (package-arguments petsc-complex) | |
1953 | ((#:configure-flags cf) | |
1954 | ``("--with-mpiexec=mpirun" | |
1955 | ,(string-append "--with-mpi-dir=" | |
1956 | (assoc-ref %build-inputs "openmpi")) | |
e586c6fa EB |
1957 | ,@(delete "--with-mpi=0" ,cf))) |
1958 | ((#:phases phases) | |
1959 | `(modify-phases ,phases | |
1960 | (add-before 'configure 'mpi-setup | |
1961 | ,%openmpi-setup))))) | |
16ecf3ff | 1962 | (synopsis "Library to solve PDEs (with complex scalars and MPI support)"))) |
d8c7eeb9 | 1963 | |
90ff2874 PG |
1964 | (define-public python-petsc4py |
1965 | (package | |
1966 | (name "python-petsc4py") | |
758439cf | 1967 | (version "3.10.1") |
90ff2874 PG |
1968 | (source |
1969 | (origin | |
1970 | (method url-fetch) | |
1971 | (uri (pypi-uri "petsc4py" version)) | |
1972 | (sha256 | |
1973 | (base32 | |
758439cf | 1974 | "094hcnran0r2z1wlvmjswsz3ski1m9kqrl5l0ax8jjhnk55x0flh")))) |
90ff2874 PG |
1975 | (build-system python-build-system) |
1976 | (arguments | |
1977 | `(#:phases | |
1978 | (modify-phases %standard-phases | |
1979 | (add-before 'build 'pre-build | |
1980 | (lambda _ | |
1981 | ;; Define path to PETSc installation. | |
1982 | (setenv "PETSC_DIR" (assoc-ref %build-inputs "petsc")) | |
1983 | #t)) | |
1984 | (add-before 'check 'mpi-setup | |
1985 | ,%openmpi-setup)))) | |
1986 | (inputs | |
1987 | `(("petsc" ,petsc-openmpi) | |
1988 | ("python-numpy" ,python-numpy))) | |
1989 | (home-page "https://bitbucket.org/petsc/petsc4py/") | |
1990 | (synopsis "Python bindings for PETSc") | |
1991 | (description "PETSc, the Portable, Extensible Toolkit for | |
1992 | Scientific Computation, is a suite of data structures and routines for | |
1993 | the scalable (parallel) solution of scientific applications modeled by | |
1994 | partial differential equations. It employs the MPI standard for all | |
1995 | message-passing communication. @code{petsc4py} provides Python | |
1996 | bindings to almost all functions of PETSc.") | |
1997 | (license license:bsd-3))) | |
1998 | ||
560acf25 MB |
1999 | (define-public python-kiwisolver |
2000 | (package | |
2001 | (name "python-kiwisolver") | |
2002 | (version "1.0.1") | |
2003 | (source (origin | |
2004 | (method url-fetch) | |
2005 | (uri (pypi-uri "kiwisolver" version)) | |
2006 | (sha256 | |
2007 | (base32 | |
2008 | "0y22ci86znwwwfhbmvbgdfnbi6lv5gv2xkdlxvjw7lml43ayafyf")))) | |
2009 | (build-system python-build-system) | |
2010 | (home-page "https://github.com/nucleic/kiwi") | |
2011 | (synopsis "Fast implementation of the Cassowary constraint solver") | |
2012 | (description | |
2013 | "Kiwi is an efficient C++ implementation of the Cassowary constraint | |
2014 | solving algorithm. Kiwi has been designed from the ground up to be | |
2015 | lightweight and fast. Kiwi ranges from 10x to 500x faster than the original | |
2016 | Cassowary solver with typical use cases gaining a 40x improvement. Memory | |
2017 | savings are consistently > 5x.") | |
2018 | (license license:bsd-3))) | |
2019 | ||
2020 | (define-public python2-kiwisolver | |
2021 | (package-with-python2 python-kiwisolver)) | |
2022 | ||
a7f01414 EB |
2023 | (define-public slepc |
2024 | (package | |
2025 | (name "slepc") | |
a13e0f3d | 2026 | (version "3.11.1") |
a7f01414 EB |
2027 | (source |
2028 | (origin | |
2029 | (method url-fetch) | |
baeaf882 EB |
2030 | (uri (string-append "http://slepc.upv.es/download/distrib/slepc-" |
2031 | version ".tar.gz")) | |
a7f01414 EB |
2032 | (sha256 |
2033 | (base32 | |
a13e0f3d | 2034 | "1yq84q9wannc8xwapxpay4ypdd675picwi395hhsdvng9q6hf5j8")))) |
a7f01414 EB |
2035 | (build-system gnu-build-system) |
2036 | (native-inputs | |
a13e0f3d EB |
2037 | `(("python" ,python-2) |
2038 | ("petsc:examples" ,petsc "examples"))) ;for gmakegen.py script | |
a7f01414 EB |
2039 | (inputs |
2040 | `(("arpack" ,arpack-ng) | |
2041 | ("gfortran" ,gfortran))) | |
2042 | (propagated-inputs | |
2043 | `(("petsc" ,petsc))) | |
2044 | (arguments | |
2045 | `(#:parallel-build? #f ;build is parallel by default | |
2046 | #:configure-flags | |
2047 | `(,(string-append "--with-arpack-dir=" | |
9cf52454 | 2048 | (assoc-ref %build-inputs "arpack") "/lib")) |
9731c412 | 2049 | #:make-flags ;honor (parallel-job-count) |
a13e0f3d EB |
2050 | `(,(format #f "MAKE_NP=~a" (parallel-job-count)) |
2051 | ,(string-append "PETSCCONFIGDIR=" | |
2052 | (assoc-ref %build-inputs "petsc:examples") | |
2053 | "/share/petsc/examples/config")) | |
a7f01414 EB |
2054 | #:phases |
2055 | (modify-phases %standard-phases | |
8787c555 | 2056 | (replace 'configure |
a7f01414 EB |
2057 | ;; configure is a python script, so we can't run it with bash. |
2058 | (lambda* (#:key inputs outputs (configure-flags '()) | |
2059 | #:allow-other-keys) | |
2060 | (let* ((prefix (assoc-ref outputs "out")) | |
2061 | (flags `(,(string-append "--prefix=" prefix) | |
2062 | ,@configure-flags))) | |
2063 | (format #t "build directory: ~s~%" (getcwd)) | |
2064 | (format #t "configure flags: ~s~%" flags) | |
2065 | (setenv "SLEPC_DIR" (getcwd)) | |
9cf52454 | 2066 | (setenv "PETSC_DIR" (assoc-ref inputs "petsc")) |
c6840089 | 2067 | (apply invoke "./configure" flags)))) |
8787c555 | 2068 | (add-after 'install 'delete-doc |
a7f01414 EB |
2069 | ;; TODO: SLEPc installs HTML documentation alongside headers in |
2070 | ;; $out/include. We'd like to move them to share/doc, but delete | |
2071 | ;; them for now, as they are incomplete and installing the complete | |
2072 | ;; documentation is difficult. | |
2073 | (lambda* (#:key outputs #:allow-other-keys) | |
2074 | (let* ((out (assoc-ref outputs "out"))) | |
0f6dc120 TGR |
2075 | (for-each delete-file (find-files out "\\.html$")) |
2076 | #t))) | |
8787c555 | 2077 | (add-after 'install 'clean-install |
a7f01414 EB |
2078 | ;; Clean up unnecessary build logs from installation. |
2079 | (lambda* (#:key outputs #:allow-other-keys) | |
2080 | (let ((out (assoc-ref outputs "out"))) | |
2081 | (for-each (lambda (file) | |
2082 | (let ((f (string-append out "/lib/slepc/conf/" file))) | |
2083 | (when (file-exists? f) | |
2084 | (delete-file f)))) | |
2085 | '("configure.log" "make.log" "gmake.log" | |
2086 | "test.log" "error.log" "RDict.db" | |
0f6dc120 TGR |
2087 | "uninstall.py")) |
2088 | #t)))))) | |
a7f01414 EB |
2089 | (home-page "http://slepc.upv.es") |
2090 | (synopsis "Scalable library for eigenproblems") | |
2091 | (description "SLEPc is a software library for the solution of large sparse | |
2092 | eigenproblems on parallel computers. It can be used for the solution of | |
2093 | linear eigenvalue problems formulated in either standard or generalized form, | |
2094 | as well as other related problems such as the singular value decomposition. | |
2095 | The emphasis of the software is on methods and techniques appropriate for | |
2096 | problems in which the associated matrices are sparse, for example, those | |
2097 | arising after the discretization of partial differential equations.") | |
3c524f21 | 2098 | (license license:bsd-2))) |
a7f01414 EB |
2099 | |
2100 | (define-public slepc-complex | |
2101 | (package (inherit slepc) | |
2102 | (name "slepc-complex") | |
2103 | (propagated-inputs | |
2104 | `(("petsc" ,petsc-complex) | |
2105 | ,@(alist-delete "petsc" (package-propagated-inputs slepc)))) | |
2106 | (synopsis "Scalable library for eigenproblems (with complex scalars)"))) | |
2107 | ||
2108 | (define-public slepc-openmpi | |
2109 | (package (inherit slepc) | |
2110 | (name "slepc-openmpi") | |
6df2a50a LC |
2111 | (arguments |
2112 | (substitute-keyword-arguments (package-arguments slepc) | |
2113 | ((#:phases phases '%standard-phases) | |
2114 | `(modify-phases ,phases | |
bbe46a4a EB |
2115 | (add-before 'check 'mpi-setup |
2116 | ,%openmpi-setup))))) | |
a7f01414 EB |
2117 | (inputs |
2118 | `(("mpi" ,openmpi) | |
2119 | ("arpack" ,arpack-ng-openmpi) | |
2120 | ,@(alist-delete "arpack" (package-inputs slepc)))) | |
2121 | (propagated-inputs | |
2122 | `(("petsc" ,petsc-openmpi) | |
2123 | ,@(alist-delete "petsc" (package-propagated-inputs slepc)))) | |
2124 | (synopsis "Scalable library for eigenproblems (with MPI support)"))) | |
2125 | ||
2126 | (define-public slepc-complex-openmpi | |
2127 | (package (inherit slepc-openmpi) | |
2128 | (name "slepc-complex-openmpi") | |
2129 | (propagated-inputs | |
2130 | `(("petsc" ,petsc-complex-openmpi) | |
2131 | ,@(alist-delete "petsc" (package-propagated-inputs slepc-openmpi)))) | |
2132 | (synopsis "Scalable library for eigenproblems (with complex scalars and MPI support)"))) | |
2133 | ||
6b5687d0 PG |
2134 | (define-public python-slepc4py |
2135 | (package | |
2136 | (name "python-slepc4py") | |
57d30004 | 2137 | (version "3.10.0") |
6b5687d0 PG |
2138 | (source |
2139 | (origin | |
2140 | (method url-fetch) | |
2141 | (uri (pypi-uri "slepc4py" version)) | |
2142 | (sha256 | |
2143 | (base32 | |
57d30004 | 2144 | "0x049dyc8frgh79fvvavf4vlbqp4mgm61nsaivzdav4316vvlv1j")))) |
6b5687d0 PG |
2145 | (build-system python-build-system) |
2146 | (arguments | |
2147 | `(#:phases | |
2148 | (modify-phases %standard-phases | |
2149 | (add-before 'build 'pre-build | |
2150 | (lambda _ | |
2151 | ;; Define path to PETSc installation. | |
2152 | (setenv "PETSC_DIR" (assoc-ref %build-inputs "petsc")) | |
2153 | ;; Define path to SLEPc installation. | |
2154 | (setenv "SLEPC_DIR" (assoc-ref %build-inputs "slepc")) | |
2155 | #t)) | |
2156 | (add-before 'check 'mpi-setup | |
2157 | ,%openmpi-setup)))) | |
2158 | (inputs | |
2159 | `(("python-numpy" ,python-numpy) | |
2160 | ("python-petsc4py" ,python-petsc4py) | |
2161 | ("slepc" ,slepc-openmpi))) | |
2162 | (home-page "https://bitbucket.org/slepc/slepc4py/") | |
2163 | (synopsis "Python bindings for SLEPc") | |
2164 | (description "SLEPc, the Scalable Library for Eigenvalue Problem | |
2165 | Computations, is based on PETSc, the Portable, Extensible Toolkit for | |
2166 | Scientific Computation. It employs the MPI standard for all | |
2167 | message-passing communication. @code{slepc4py} provides Python | |
2168 | bindings to almost all functions of SLEPc.") | |
2169 | (license license:bsd-3))) | |
2170 | ||
cec86422 EB |
2171 | (define-public mumps |
2172 | (package | |
2173 | (name "mumps") | |
5dbc79eb | 2174 | (version "5.2.1") |
cec86422 EB |
2175 | (source |
2176 | (origin | |
2177 | (method url-fetch) | |
2178 | (uri (string-append "http://mumps.enseeiht.fr/MUMPS_" | |
2179 | version ".tar.gz")) | |
2180 | (sha256 | |
2181 | (base32 | |
5dbc79eb | 2182 | "0jklh54x4y3ik1zkw6db7766kakjm5910diyaghfxxf8vwsgr26r")) |
06e12395 MB |
2183 | (patches (search-patches "mumps-build-parallelism.patch" |
2184 | "mumps-shared-libseq.patch" | |
2185 | "mumps-shared-mumps.patch" | |
2186 | "mumps-shared-pord.patch")))) | |
cec86422 EB |
2187 | (build-system gnu-build-system) |
2188 | (inputs | |
2189 | `(("fortran" ,gfortran) | |
2190 | ;; These are required for linking against mumps, but we let the user | |
2191 | ;; declare the dependency. | |
2192 | ("blas" ,openblas) | |
2193 | ("metis" ,metis) | |
2194 | ("scotch" ,scotch))) | |
2195 | (arguments | |
2196 | `(#:modules ((ice-9 match) | |
2197 | (ice-9 popen) | |
2198 | (srfi srfi-1) | |
2199 | ,@%gnu-build-system-modules) | |
2200 | #:phases | |
2201 | (modify-phases %standard-phases | |
fba78d18 | 2202 | (replace 'configure |
cec86422 EB |
2203 | (lambda* (#:key inputs #:allow-other-keys) |
2204 | (call-with-output-file "Makefile.inc" | |
2205 | (lambda (port) | |
2206 | (format port " | |
2207 | PLAT = | |
2208 | LIBEXT = .a | |
2209 | OUTC = -o | |
2210 | OUTF = -o | |
2211 | RM = rm -f~:[ | |
2212 | CC = gcc | |
2213 | FC = gfortran | |
2214 | FL = gfortran | |
2215 | INCSEQ = -I$(topdir)/libseq | |
06e12395 | 2216 | LIBSEQ = $(topdir)/libseq/libmpiseq.a |
cec86422 EB |
2217 | LIBSEQNEEDED = libseqneeded~; |
2218 | CC = mpicc | |
2219 | FC = mpifort | |
2220 | FL = mpifort~] | |
2221 | AR = ar vr # rules require trailing space, ugh... | |
2222 | RANLIB = ranlib | |
06e12395 MB |
2223 | BLASDIR = ~a |
2224 | LIBBLAS = -Wl,-rpath=$(BLASDIR) -Wl,-rpath='$$ORIGIN' -L$(BLASDIR) -lopenblas~@[ | |
2225 | SCALAPDIR = ~a | |
2226 | SCALAP = -Wl,-rpath=$(SCALAPDIR) -Wl,-rpath='$$ORIGIN' -L$(SCALAPDIR) -lscalapack~] | |
cec86422 EB |
2227 | LIBOTHERS = -pthread |
2228 | CDEFS = -DAdd_ | |
2229 | PIC = -fPIC | |
2230 | OPTF = -O2 -DALLOW_NON_INIT $(PIC) | |
2231 | OPTL = -O2 $(PIC) | |
2232 | OPTC = -O2 $(PIC) | |
2233 | INCS = $(INCSEQ) | |
2234 | LIBS = $(SCALAP) $(LIBSEQ) | |
2235 | LPORDDIR = $(topdir)/PORD/lib | |
2236 | IPORD = -I$(topdir)/PORD/include | |
06e12395 | 2237 | LPORD = $(LPORDDIR)/libpord.a |
cec86422 EB |
2238 | ORDERINGSF = -Dpord~@[ |
2239 | METISDIR = ~a | |
2240 | IMETIS = -I$(METISDIR)/include | |
06e12395 | 2241 | LMETIS = -Wl,-rpath $(METISDIR)/lib -L$(METISDIR)/lib -lmetis |
cec86422 EB |
2242 | ORDERINGSF += -Dmetis~]~@[~:{ |
2243 | SCOTCHDIR = ~a | |
2244 | ISCOTCH = -I$(SCOTCHDIR)/include | |
06e12395 | 2245 | LSCOTCH = -Wl,-rpath $(SCOTCHDIR)/lib -L$(SCOTCHDIR)/lib ~a-lesmumps -lscotch -lscotcherr |
cec86422 EB |
2246 | ORDERINGSF += ~a~}~] |
2247 | ORDERINGSC = $(ORDERINGSF) | |
06e12395 | 2248 | LORDERINGS = $(LPORD) $(LMETIS) $(LSCOTCH) $(LIBSEQ) |
cec86422 EB |
2249 | IORDERINGSF = $(ISCOTCH) |
2250 | IORDERINGSC = $(IPORD) $(IMETIS) $(ISCOTCH)" | |
2251 | (assoc-ref inputs "mpi") | |
2252 | (assoc-ref inputs "blas") | |
2253 | (assoc-ref inputs "scalapack") | |
2254 | (assoc-ref inputs "metis") | |
2255 | (match (list (assoc-ref inputs "pt-scotch") | |
2256 | (assoc-ref inputs "scotch")) | |
2257 | ((#f #f) | |
2258 | #f) | |
2259 | ((#f scotch) | |
2260 | `((,scotch "" "-Dscotch"))) | |
2261 | ((ptscotch _) | |
2262 | `((,ptscotch | |
2263 | "-lptesmumps -lptscotch -lptscotcherr " | |
2264 | "-Dptscotch"))))))))) | |
fba78d18 | 2265 | (replace 'build |
cec86422 EB |
2266 | ;; By default only the d-precision library is built. Make with "all" |
2267 | ;; target so that all precision libraries and examples are built. | |
2268 | (lambda _ | |
b414cf52 TGR |
2269 | (invoke "make" "all" |
2270 | (format #f "-j~a" (parallel-job-count))))) | |
fba78d18 | 2271 | (replace 'check |
cec86422 EB |
2272 | ;; Run the simple test drivers, which read test input from stdin: |
2273 | ;; from the "real" input for the single- and double-precision | |
2274 | ;; testers, and from the "cmplx" input for complex-precision | |
2275 | ;; testers. The EXEC-PREFIX key is used by the mumps-openmpi | |
2276 | ;; package to prefix execution with "mpirun". | |
2277 | (lambda* (#:key (exec-prefix '()) #:allow-other-keys) | |
2278 | (with-directory-excursion "examples" | |
2279 | (every | |
2280 | (lambda (prec type) | |
2281 | (let ((tester (apply open-pipe* | |
2282 | `(,OPEN_WRITE | |
2283 | ,@exec-prefix | |
2284 | ,(string-append "./" prec | |
2285 | "simpletest")))) | |
2286 | (input (open-input-file | |
2287 | (string-append "input_simpletest_" type)))) | |
2288 | (begin | |
2289 | (dump-port input tester) | |
2290 | (close-port input) | |
2291 | (zero? (close-pipe tester))))) | |
2292 | '("s" "d" "c" "z") | |
2293 | '("real" "real" "cmplx" "cmplx"))))) | |
fba78d18 EB |
2294 | (replace 'install |
2295 | (lambda* (#:key outputs #:allow-other-keys) | |
2296 | (let* ((out (assoc-ref outputs "out")) | |
2297 | (libdir (string-append out "/lib"))) | |
2298 | (copy-recursively "lib" libdir) | |
2299 | (copy-recursively "include" (string-append out "/include")) | |
2300 | (when (file-exists? "libseq/libmpiseq.a") | |
2301 | (install-file "libseq/libmpiseq.a" libdir)) | |
06e12395 MB |
2302 | (when (file-exists? "libseq/libmpiseq.so") |
2303 | (install-file "libseq/libmpiseq.so" libdir)) | |
fba78d18 | 2304 | #t)))))) |
cec86422 EB |
2305 | (home-page "http://mumps.enseeiht.fr") |
2306 | (synopsis "Multifrontal sparse direct solver") | |
2307 | (description | |
2308 | "MUMPS (MUltifrontal Massively Parallel sparse direct Solver) solves a | |
57e69c1d | 2309 | sparse system of linear equations A x = b using Gaussian elimination.") |
cec86422 EB |
2310 | (license license:cecill-c))) |
2311 | ||
2312 | (define-public mumps-metis | |
2313 | (package (inherit mumps) | |
2314 | (name "mumps-metis") | |
2315 | (inputs | |
2316 | (alist-delete "scotch" (package-inputs mumps))))) | |
2317 | ||
2318 | (define-public mumps-openmpi | |
2319 | (package (inherit mumps) | |
2320 | (name "mumps-openmpi") | |
2321 | (inputs | |
2322 | `(("mpi" ,openmpi) | |
2323 | ("scalapack" ,scalapack) | |
2324 | ("pt-scotch" ,pt-scotch) | |
2325 | ,@(alist-delete "scotch" (package-inputs mumps)))) | |
2326 | (arguments | |
2327 | (substitute-keyword-arguments (package-arguments mumps) | |
2328 | ((#:phases phases) | |
2329 | `(modify-phases ,phases | |
bbe46a4a EB |
2330 | (add-before 'check 'mpi-setup |
2331 | ,%openmpi-setup) | |
6df2a50a LC |
2332 | (replace 'check |
2333 | (lambda _ | |
2334 | ((assoc-ref ,phases 'check) | |
2335 | #:exec-prefix '("mpirun" "-n" "2")))))))) | |
cec86422 EB |
2336 | (synopsis "Multifrontal sparse direct solver (with MPI)"))) |
2337 | ||
2338 | (define-public mumps-metis-openmpi | |
2339 | (package (inherit mumps-openmpi) | |
2340 | (name "mumps-metis-openmpi") | |
2341 | (inputs | |
2342 | (alist-delete "pt-scotch" (package-inputs mumps-openmpi))))) | |
2343 | ||
63e07468 BW |
2344 | (define-public ruby-asciimath |
2345 | (package | |
2346 | (name "ruby-asciimath") | |
2347 | (version "1.0.4") | |
2348 | (source | |
2349 | (origin | |
2350 | (method url-fetch) | |
2351 | (uri (rubygems-uri "asciimath" version)) | |
2352 | (sha256 | |
2353 | (base32 | |
2354 | "1d80kiph5mc78zps7si1hv48kv4k12mzaq8jk5kb3pqpjdr72qmc")))) | |
2355 | (build-system ruby-build-system) | |
2356 | (arguments | |
2357 | '(#:phases | |
2358 | (modify-phases %standard-phases | |
2359 | ;; Apply this patch | |
2360 | ;; https://github.com/asciidoctor/asciimath/commit/1c06fdc8086077f4785479f78b0823a4a72d7948 | |
2361 | (add-after 'unpack 'patch-remove-spurious-backslashes | |
2362 | (lambda _ | |
2363 | (substitute* "spec/parser_spec.rb" | |
2364 | (("\\\\\"") | |
9923d5a4 TGR |
2365 | "\"")) |
2366 | #t))))) | |
63e07468 BW |
2367 | (native-inputs |
2368 | `(("bundler" ,bundler) | |
2369 | ("ruby-rspec" ,ruby-rspec))) | |
2370 | (synopsis "AsciiMath parsing and conversion library") | |
2371 | (description | |
2372 | "A pure Ruby AsciiMath parsing and conversion library. AsciiMath is an | |
2373 | easy-to-write markup language for mathematics.") | |
2374 | (home-page "https://github.com/asciidoctor/asciimath") | |
2375 | (license license:expat))) | |
2376 | ||
183e44ae EB |
2377 | (define-public superlu |
2378 | (package | |
2379 | (name "superlu") | |
995a09e0 | 2380 | (version "5.2.1") |
183e44ae EB |
2381 | (source |
2382 | (origin | |
2383 | (method url-fetch) | |
2384 | (uri (string-append "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/" | |
2385 | "superlu_" version ".tar.gz")) | |
2386 | (sha256 | |
995a09e0 EB |
2387 | (base32 "0qzlb7cd608q62kyppd0a8c65l03vrwqql6gsm465rky23b6dyr8")) |
2388 | (modules '((guix build utils))) | |
2389 | (snippet | |
2390 | ;; Replace the non-free implementation of MC64 with a stub adapted | |
2391 | ;; from Debian | |
2392 | '(begin | |
2393 | (use-modules (ice-9 regex) | |
2394 | (ice-9 rdelim)) | |
2395 | (call-with-output-file "SRC/mc64ad.c" | |
2396 | (lambda (port) | |
2397 | (display " | |
2398 | #include <stdio.h> | |
2399 | #include <stdlib.h> | |
2400 | void mc64id_(int *a) { | |
2401 | fprintf (stderr, \"SuperLU: non-free MC64 not available. Aborting.\\n\"); | |
2402 | abort (); | |
2403 | } | |
2404 | void mc64ad_ (int *a, int *b, int *c, int *d, int *e, double *f, int *g, | |
2405 | int *h, int *i, int *j, int *k, double *l, int *m, int *n) { | |
2406 | fprintf (stderr, \"SuperLU: non-free MC64 not available. Aborting.\\n\"); | |
2407 | abort (); | |
2408 | }\n" port))) | |
2409 | ;; Remove the corresponding license verbiage. MC64 license follows | |
2410 | ;; a "------" line separator. | |
2411 | (with-atomic-file-replacement "License.txt" | |
2412 | (let ((rx (make-regexp "-{8}"))) | |
2413 | (lambda (in out) | |
2414 | (let loop () | |
2415 | (let ((line (read-line in 'concat))) | |
2416 | (unless (regexp-exec rx line) | |
2417 | (display line out) | |
6cbee49d MW |
2418 | (loop)))) |
2419 | #t))))))) | |
995a09e0 | 2420 | (build-system cmake-build-system) |
183e44ae EB |
2421 | (native-inputs |
2422 | `(("tcsh" ,tcsh))) | |
2423 | (inputs | |
995a09e0 | 2424 | `(("blas" ,openblas) |
19afbea1 | 2425 | ("gfortran" ,gfortran))) |
183e44ae | 2426 | (arguments |
995a09e0 EB |
2427 | `(#:configure-flags '("-Denable_blaslib:BOOL=NO" ;do not use internal cblas |
2428 | "-DTPL_BLAS_LIBRARIES=openblas" | |
677bc34d | 2429 | "-DBUILD_SHARED_LIBS:BOOL=YES"))) |
183e44ae EB |
2430 | (home-page "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/") |
2431 | (synopsis "Supernodal direct solver for sparse linear systems") | |
2432 | (description | |
2433 | "SuperLU is a general purpose library for the direct solution of large, | |
2434 | sparse, nonsymmetric systems of linear equations on high performance machines. | |
2435 | The library is written in C and is callable from either C or Fortran. The | |
2436 | library routines perform an LU decomposition with partial pivoting and | |
2437 | triangular system solves through forward and back substitution. The library | |
2438 | also provides threshold-based ILU factorization preconditioners.") | |
995a09e0 EB |
2439 | (license (list license:bsd-3 |
2440 | license:gpl2+ ;EXAMPLE/*fgmr.c | |
2441 | (license:fsf-free "file://SRC/colamd.h"))))) | |
f8ed036a | 2442 | |
a54aefea EB |
2443 | (define-public superlu-dist |
2444 | (package | |
2445 | (name "superlu-dist") | |
6161141e | 2446 | (version "6.1.0") |
a54aefea EB |
2447 | (source |
2448 | (origin | |
2449 | (method url-fetch) | |
2450 | (uri (string-append "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/" | |
2451 | "superlu_dist_" version ".tar.gz")) | |
2452 | (sha256 | |
6161141e | 2453 | (base32 "0pqgcgh1yxhfzs99fas3mggajzd5wca3nbyp878rziy74gfk03dl")) |
0921eff2 | 2454 | (modules '((guix build utils))) |
29080870 EB |
2455 | (snippet |
2456 | ;; Replace the non-free implementation of MC64 with a stub | |
2457 | '(begin | |
0921eff2 | 2458 | (call-with-output-file "SRC/mc64ad_dist.c" |
29080870 EB |
2459 | (lambda (port) |
2460 | (display " | |
2461 | #include <stdio.h> | |
2462 | #include <stdlib.h> | |
0921eff2 | 2463 | void mc64id_dist(int *a) { |
29080870 EB |
2464 | fprintf (stderr, \"SuperLU_DIST: non-free MC64 not available. Aborting.\\n\"); |
2465 | abort (); | |
2466 | } | |
0921eff2 | 2467 | void mc64ad_dist (int *a, int *b, int *c, int *d, int *e, double *f, int *g, |
29080870 EB |
2468 | int *h, int *i, int *j, int *k, double *l, int *m, int *n) { |
2469 | fprintf (stderr, \"SuperLU_DIST: non-free MC64 not available. Aborting.\\n\"); | |
2470 | abort (); | |
2471 | }\n" port))) | |
29080870 | 2472 | (substitute* "SRC/util.c" ;adjust default algorithm |
6161141e EB |
2473 | (("RowPerm[[:blank:]]*=[[:blank:]]*LargeDiag_MC64;") |
2474 | ;; TODO: set to "LargeDiag_AWPM" once combinatorial-blas has | |
2475 | ;; general (i.e. non-square) processor-grid support. | |
2476 | "RowPerm = NOROWPERM;")) | |
6cbee49d | 2477 | #t)) |
6161141e | 2478 | (patches (search-patches "superlu-dist-scotchmetis.patch" |
2bdf26f1 EB |
2479 | "superlu-dist-awpm-grid.patch" |
2480 | "superlu-dist-fix-mpi-deprecations.patch")))) | |
6161141e | 2481 | (build-system cmake-build-system) |
a54aefea EB |
2482 | (native-inputs |
2483 | `(("tcsh" ,tcsh))) | |
2484 | (inputs | |
6161141e EB |
2485 | `(("gfortran" ,gfortran) |
2486 | ("blas" ,openblas) | |
2487 | ("lapack" ,lapack) | |
2488 | ("combblas" ,combinatorial-blas))) | |
a54aefea | 2489 | (propagated-inputs |
6161141e EB |
2490 | `(("mpi" ,openmpi) ;headers include MPI heades |
2491 | ("parmetis" ,pt-scotch32 "metis") | |
2492 | ("pt-scotch" ,pt-scotch32))) | |
a54aefea | 2493 | (arguments |
6161141e EB |
2494 | `(#:parallel-tests? #f ;tests use MPI and OpenMP |
2495 | #:configure-flags (list "-DBUILD_SHARED_LIBS:BOOL=YES" | |
2496 | "-DTPL_ENABLE_COMBBLASLIB=YES" | |
2497 | "-DTPL_BLAS_LIBRARIES=-lopenblas" | |
2498 | "-DTPL_LAPACK_LIBRARIES=-llapack" | |
2499 | (string-append "-DTPL_PARMETIS_LIBRARIES=" | |
2500 | (string-join | |
2501 | '("ptscotchparmetis" "ptscotch" "ptscotcherr" | |
2502 | "scotchmetis" "scotch" "scotcherr") | |
2503 | ";")) | |
2504 | (string-append "-DTPL_PARMETIS_INCLUDE_DIRS=" | |
2505 | (assoc-ref %build-inputs "parmetis") | |
2506 | "/include") | |
2507 | "-DTPL_ENABLE_COMBBLASLIB=ON" | |
2508 | (string-append "-DTPL_COMBBLAS_INCLUDE_DIRS=" | |
2509 | (assoc-ref %build-inputs "combblas") | |
2510 | "/include/CombBLAS;" | |
2511 | (assoc-ref %build-inputs "combblas") | |
2512 | "/include/BipartiteMatchings") | |
2513 | "-DTPL_COMBBLAS_LIBRARIES=CombBLAS") | |
a54aefea | 2514 | #:phases |
dc1d3cde | 2515 | (modify-phases %standard-phases |
6161141e | 2516 | (add-before 'configure 'set-c++-standard |
dc1d3cde | 2517 | (lambda _ |
6161141e EB |
2518 | (substitute* "CMakeLists.txt" |
2519 | ;; AWPM headers require C++14 | |
2520 | (("CMAKE_CXX_STANDARD 11") "CMAKE_CXX_STANDARD 14")))) | |
bbe46a4a EB |
2521 | (add-before 'check 'mpi-setup |
2522 | ,%openmpi-setup) | |
6161141e EB |
2523 | (add-before 'check 'omp-setup |
2524 | (lambda _ (setenv "OMP_NUM_THREADS" "1") #t))))) | |
a54aefea EB |
2525 | (home-page (package-home-page superlu)) |
2526 | (synopsis "Parallel supernodal direct solver") | |
2527 | (description | |
2528 | "SuperLU_DIST is a parallel extension to the serial SuperLU library. | |
2529 | It is targeted for distributed memory parallel machines. SuperLU_DIST is | |
2530 | implemented in ANSI C, and MPI for communications.") | |
2531 | (license license:bsd-3))) | |
2532 | ||
f8ed036a EB |
2533 | (define-public scotch |
2534 | (package | |
2535 | (name "scotch") | |
fd373343 | 2536 | (version "6.0.6") |
f8ed036a EB |
2537 | (source |
2538 | (origin | |
2539 | (method url-fetch) | |
1dc31097 TGR |
2540 | (uri (string-append "https://gforge.inria.fr/frs/download.php/" |
2541 | "latestfile/298/scotch_" version ".tar.gz")) | |
f8ed036a | 2542 | (sha256 |
fd373343 EB |
2543 | (base32 "1ky4k9r6jvajhqaqnnx6h8fkmds2yxgp70dpr1qzwcyhi2nhqvv8")) |
2544 | (patches (search-patches "scotch-build-parallelism.patch" | |
2545 | "scotch-integer-declarations.patch")))) | |
f8ed036a EB |
2546 | (build-system gnu-build-system) |
2547 | (inputs | |
2548 | `(("zlib" ,zlib) | |
5e54f4ad | 2549 | ("flex" ,flex) |
f8ed036a | 2550 | ("bison" ,bison))) |
fd373343 | 2551 | (outputs '("out" "metis")) |
f8ed036a | 2552 | (arguments |
fd373343 EB |
2553 | `(#:make-flags (list (string-append "prefix=" %output)) |
2554 | #:phases | |
d6602ee9 EB |
2555 | (modify-phases %standard-phases |
2556 | (add-after | |
2557 | 'unpack 'chdir-to-src | |
d67a7e9e | 2558 | (lambda _ (chdir "src") #t)) |
d6602ee9 EB |
2559 | (replace |
2560 | 'configure | |
2561 | (lambda _ | |
2562 | (call-with-output-file "Makefile.inc" | |
2563 | (lambda (port) | |
2564 | (format port " | |
f8ed036a EB |
2565 | EXE = |
2566 | LIB = .a | |
2567 | OBJ = .o | |
2568 | MAKE = make | |
2569 | AR = ar | |
2570 | ARFLAGS = -ruv | |
cf0ec6c4 | 2571 | CAT = cat |
f8ed036a EB |
2572 | CCS = gcc |
2573 | CCP = mpicc | |
2574 | CCD = gcc | |
2575 | CPPFLAGS =~{ -D~a~} | |
6c798540 | 2576 | CFLAGS = -O2 -g -fPIC $(CPPFLAGS) |
f8ed036a EB |
2577 | LDFLAGS = -lz -lm -lrt -lpthread |
2578 | CP = cp | |
2579 | LEX = flex -Pscotchyy -olex.yy.c | |
2580 | LN = ln | |
2581 | MKDIR = mkdir | |
2582 | MV = mv | |
2583 | RANLIB = ranlib | |
2584 | YACC = bison -pscotchyy -y -b y | |
2585 | " | |
d6602ee9 EB |
2586 | '("COMMON_FILE_COMPRESS_GZ" |
2587 | "COMMON_PTHREAD" | |
2588 | "COMMON_RANDOM_FIXED_SEED" | |
fd373343 | 2589 | "INTSIZE64" ;use 'int64_t' |
cf0ec6c4 EB |
2590 | ;; Prevents symbolc clashes with libesmumps |
2591 | "SCOTCH_RENAME" | |
d6602ee9 EB |
2592 | ;; XXX: Causes invalid frees in superlu-dist tests |
2593 | ;; "SCOTCH_PTHREAD" | |
2594 | ;; "SCOTCH_PTHREAD_NUMBER=2" | |
d67a7e9e TGR |
2595 | "restrict=__restrict")))) |
2596 | #t)) | |
bbe46a4a | 2597 | (add-after 'build 'build-esmumps |
cf0ec6c4 | 2598 | (lambda _ |
d67a7e9e TGR |
2599 | (invoke "make" |
2600 | (format #f "-j~a" (parallel-job-count)) | |
2601 | "esmumps"))) | |
fd373343 EB |
2602 | (add-before 'install 'make-install-dirs |
2603 | (lambda* (#:key outputs #:allow-other-keys) | |
2604 | (mkdir (assoc-ref outputs "out")))) | |
2605 | (add-after 'install 'install-metis | |
2606 | (lambda* (#:key outputs #:allow-other-keys) | |
2607 | (let ((out (assoc-ref outputs "metis"))) | |
2608 | (mkdir out) | |
2609 | ;; metis files are not installed with 'make install' | |
2610 | (for-each (lambda (f) | |
2611 | (install-file f (string-append out "/include"))) | |
2612 | (find-files "../include/" ".*metis\\.h")) | |
2613 | (for-each (lambda (f) | |
2614 | (install-file f (string-append out "/lib"))) | |
2615 | (find-files "../lib/" ".*metis\\..*")) | |
2616 | #t)))))) | |
f8ed036a EB |
2617 | (home-page "http://www.labri.fr/perso/pelegrin/scotch/") |
2618 | (synopsis "Programs and libraries for graph algorithms") | |
2619 | (description "SCOTCH is a set of programs and libraries which implement | |
2620 | the static mapping and sparse matrix reordering algorithms developed within | |
2621 | the SCOTCH project. Its purpose is to apply graph theory, with a divide and | |
2622 | conquer approach, to scientific computing problems such as graph and mesh | |
2623 | partitioning, static mapping, and sparse matrix ordering, in application | |
2624 | domains ranging from structural mechanics to operating systems or | |
2625 | bio-chemistry.") | |
2626 | ;; See LICENSE_en.txt | |
2627 | (license license:cecill-c))) | |
6acb4adb | 2628 | |
1c39f3b8 PG |
2629 | (define-public scotch32 |
2630 | ;; This is the 'INTSIZE32' variant, which uses 32-bit integers, as needed by | |
2631 | ;; some applications. | |
2632 | (package (inherit scotch) | |
2633 | (name "scotch32") | |
2634 | (arguments | |
2635 | (substitute-keyword-arguments (package-arguments scotch) | |
2636 | ((#:phases scotch-phases) | |
2637 | `(modify-phases ,scotch-phases | |
2638 | (replace | |
2639 | 'configure | |
2640 | (lambda _ | |
2641 | (call-with-output-file "Makefile.inc" | |
2642 | (lambda (port) | |
2643 | (format port " | |
2644 | EXE = | |
2645 | LIB = .a | |
2646 | OBJ = .o | |
2647 | MAKE = make | |
2648 | AR = ar | |
2649 | ARFLAGS = -ruv | |
2650 | CAT = cat | |
2651 | CCS = gcc | |
2652 | CCP = mpicc | |
2653 | CCD = gcc | |
2654 | CPPFLAGS =~{ -D~a~} | |
2655 | CFLAGS = -O2 -g -fPIC $(CPPFLAGS) | |
2656 | LDFLAGS = -lz -lm -lrt -lpthread | |
2657 | CP = cp | |
2658 | LEX = flex -Pscotchyy -olex.yy.c | |
2659 | LN = ln | |
2660 | MKDIR = mkdir | |
2661 | MV = mv | |
2662 | RANLIB = ranlib | |
2663 | YACC = bison -pscotchyy -y -b y | |
2664 | " | |
2665 | '("COMMON_FILE_COMPRESS_GZ" | |
2666 | "COMMON_PTHREAD" | |
2667 | "COMMON_RANDOM_FIXED_SEED" | |
2668 | "INTSIZE32" ;use 32-bit integers. See INSTALL.txt | |
2669 | ;; Prevents symbolc clashes with libesmumps | |
2670 | "SCOTCH_RENAME" | |
2671 | ;; XXX: Causes invalid frees in superlu-dist tests | |
2672 | ;; "SCOTCH_PTHREAD" | |
2673 | ;; "SCOTCH_PTHREAD_NUMBER=2" | |
2674 | "restrict=__restrict")))))))))) | |
2675 | (synopsis | |
2676 | "Programs and libraries for graph algorithms (32-bit integers)"))) | |
2677 | ||
6acb4adb EB |
2678 | (define-public pt-scotch |
2679 | (package (inherit scotch) | |
2680 | (name "pt-scotch") | |
2681 | (propagated-inputs | |
2682 | `(("openmpi" ,openmpi))) ;Headers include MPI headers | |
2683 | (arguments | |
2684 | (substitute-keyword-arguments (package-arguments scotch) | |
2685 | ((#:phases scotch-phases) | |
d6602ee9 EB |
2686 | `(modify-phases ,scotch-phases |
2687 | (replace | |
2688 | 'build | |
d6602ee9 | 2689 | (lambda _ |
c491f7f8 LC |
2690 | (invoke "make" (format #f "-j~a" (parallel-job-count)) |
2691 | "ptscotch" "ptesmumps") | |
2692 | ||
2693 | ;; Install the serial metis compatibility library | |
2694 | (invoke "make" "-C" "libscotchmetis" "install"))) | |
2695 | (add-before 'check 'mpi-setup | |
2696 | ,%openmpi-setup) | |
2697 | (replace 'check | |
2698 | (lambda _ | |
2699 | (invoke "make" "ptcheck"))))))) | |
6acb4adb | 2700 | (synopsis "Programs and libraries for graph algorithms (with MPI)"))) |
5698b8b8 | 2701 | |
1c25a52c PG |
2702 | (define-public pt-scotch32 |
2703 | (package (inherit scotch32) | |
2704 | (name "pt-scotch32") | |
2705 | (propagated-inputs | |
2706 | `(("openmpi" ,openmpi))) ;headers include MPI headers | |
2707 | (arguments | |
c4d4a779 PG |
2708 | (substitute-keyword-arguments (package-arguments scotch32) |
2709 | ((#:phases scotch32-phases) | |
2710 | `(modify-phases ,scotch32-phases | |
1c25a52c PG |
2711 | (replace 'build |
2712 | (lambda _ | |
c491f7f8 LC |
2713 | (invoke "make" (format #f "-j~a" (parallel-job-count)) |
2714 | "ptscotch" "ptesmumps") | |
2715 | ;; Install the serial metis compatibility library | |
2716 | (invoke "make" "-C" "libscotchmetis" "install"))) | |
2717 | (add-before 'check 'mpi-setup | |
2718 | ,%openmpi-setup) | |
1c25a52c PG |
2719 | (replace 'check |
2720 | (lambda _ | |
c491f7f8 | 2721 | (invoke "make" "ptcheck"))))))) |
1c25a52c PG |
2722 | (synopsis |
2723 | "Programs and libraries for graph algorithms (with MPI and 32-bit integers)"))) | |
2724 | ||
aa75ad00 EB |
2725 | (define-public metis |
2726 | (package | |
2727 | (name "metis") | |
2728 | (version "5.1.0") | |
2729 | (source | |
2730 | (origin | |
2731 | (method url-fetch) | |
2732 | (uri (string-append "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/" | |
2733 | "metis-" version ".tar.gz")) | |
2734 | (sha256 | |
2735 | (base32 | |
2736 | "1cjxgh41r8k6j029yxs8msp3z6lcnpm16g5pvckk35kc7zhfpykn")))) | |
2737 | (build-system cmake-build-system) | |
2738 | (inputs | |
2739 | `(("blas" ,openblas))) | |
2740 | (arguments | |
2741 | `(#:tests? #f ;no tests | |
2742 | #:configure-flags `("-DSHARED=ON" | |
2743 | ,(string-append "-DGKLIB_PATH=" (getcwd) | |
2744 | "/metis-" ,version "/GKlib")))) | |
2745 | (home-page "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview") | |
2746 | (synopsis "Graph partitioning and fill-reducing matrix ordering library") | |
2747 | (description | |
2748 | "METIS is a set of serial programs for partitioning graphs, partitioning | |
2749 | finite element meshes, and producing fill-reducing orderings for sparse | |
2750 | matrices. The algorithms implemented in METIS are based on the multilevel | |
2751 | recursive-bisection, multilevel k-way, and multi-constraint partitioning | |
2752 | schemes.") | |
2753 | (license license:asl2.0))) ;As of version 5.0.3 | |
2754 | ||
700ff222 EB |
2755 | (define-public p4est |
2756 | (package | |
2757 | (name "p4est") | |
4150da63 | 2758 | (version "2.0") |
700ff222 EB |
2759 | (source |
2760 | (origin | |
2761 | (method url-fetch) | |
2762 | (uri (string-append "http://p4est.github.io/release/p4est-" | |
2763 | version ".tar.gz")) | |
2764 | (sha256 | |
2765 | (base32 | |
4150da63 | 2766 | "16h267z256kxcxfjs390qqzv19hr58vrj4x8lndb7alnk2vca8n5")))) |
700ff222 EB |
2767 | (build-system gnu-build-system) |
2768 | (inputs | |
2769 | `(("fortran" ,gfortran) | |
2770 | ("blas" ,openblas) | |
2771 | ("lapack" ,lapack) | |
2772 | ("zlib" ,zlib))) | |
2773 | (arguments | |
2774 | `(#:configure-flags `(,(string-append "BLAS_LIBS=-L" | |
2775 | (assoc-ref %build-inputs "blas") | |
2776 | " -lopenblas") | |
2777 | ,(string-append "LAPACK_LIBS=-L" | |
2778 | (assoc-ref %build-inputs "lapack") | |
6df2a50a LC |
2779 | " -llapack")) |
2780 | #:phases (modify-phases %standard-phases | |
bbe46a4a EB |
2781 | (add-before 'check 'mpi-setup |
2782 | ,%openmpi-setup)))) | |
700ff222 EB |
2783 | (home-page "http://www.p4est.org") |
2784 | (synopsis "Adaptive mesh refinement on forests of octrees") | |
2785 | (description | |
2786 | "The p4est software library enables the dynamic management of a | |
2787 | collection of adaptive octrees, conveniently called a forest of octrees. | |
2788 | p4est is designed to work in parallel and scales to hundreds of thousands of | |
2789 | processor cores.") | |
2790 | (license license:gpl2+))) | |
2791 | ||
2792 | (define-public p4est-openmpi | |
2793 | (package (inherit p4est) | |
2794 | (name "p4est-openmpi") | |
2795 | (inputs | |
2796 | `(("mpi" ,openmpi) | |
2797 | ,@(package-inputs p4est))) | |
2798 | (arguments | |
2799 | (substitute-keyword-arguments (package-arguments p4est) | |
2800 | ((#:configure-flags cf) | |
2801 | ``("--enable-mpi" ,@,cf)))) | |
2802 | (synopsis "Parallel adaptive mesh refinement on forests of octrees"))) | |
2803 | ||
5698b8b8 JD |
2804 | (define-public gsegrafix |
2805 | (package | |
2806 | (name "gsegrafix") | |
2807 | (version "1.0.6") | |
2808 | (source | |
2809 | (origin | |
2810 | (method url-fetch) | |
2811 | (uri (string-append "mirror://gnu/" name "/" name "-" | |
2812 | version ".tar.gz")) | |
2813 | (sha256 | |
2814 | (base32 | |
2815 | "1b13hvx063zv970y750bx41wpx6hwd5ngjhbdrna8w8yy5kmxcda")))) | |
2816 | (build-system gnu-build-system) | |
2817 | (arguments | |
2818 | `(#:configure-flags '("LDFLAGS=-lm"))) | |
2819 | (inputs | |
2820 | `(("libgnomecanvas" ,libgnomecanvas) | |
2821 | ("libbonoboui" ,libbonoboui) | |
2822 | ("libgnomeui" ,libgnomeui) | |
2823 | ("libgnomeprintui" ,libgnomeprintui) | |
2824 | ("popt" ,popt))) | |
2825 | (native-inputs | |
2826 | `(("pkg-config" ,pkg-config))) | |
6fd52309 | 2827 | (home-page "https://www.gnu.org/software/gsegrafix/") |
5698b8b8 JD |
2828 | (synopsis "GNOME application to create scientific and engineering plots") |
2829 | (description "GSEGrafix is an application which produces high-quality graphical | |
2830 | plots for science and engineering. Plots are specified via simple ASCII | |
2831 | parameter files and data files and are presented in an anti-aliased GNOME | |
2832 | canvas. The program supports rectangular two-dimensional plots, histograms, | |
2833 | polar-axis plots and three-dimensional plots. Plots can be printed or saved | |
2834 | to BMP, JPEG or PNG image formats.") | |
2835 | (license license:gpl3+))) | |
8731e527 JD |
2836 | |
2837 | (define-public maxima | |
2838 | (package | |
2839 | (name "maxima") | |
ccc963d5 | 2840 | (version "5.43.0") |
8731e527 JD |
2841 | (source |
2842 | (origin | |
2843 | (method url-fetch) | |
2844 | (uri (string-append "mirror://sourceforge/maxima/Maxima-source/" | |
2845 | version "-source/" name "-" version ".tar.gz")) | |
2846 | (sha256 | |
2847 | (base32 | |
ccc963d5 | 2848 | "0xyahp4c6509haxh4n1swiqm3421gplkdisa0zypclh3252sbzfw")) |
fc1adab1 | 2849 | (patches (search-patches "maxima-defsystem-mkdir.patch")))) |
8731e527 | 2850 | (build-system gnu-build-system) |
df354a77 | 2851 | (inputs |
6b2eafaa | 2852 | `(("gcl" ,gcl) |
df354a77 | 2853 | ("gnuplot" ,gnuplot) ;for plots |
fc9c47bd | 2854 | ("sed" ,sed) |
f36afe4d | 2855 | ("tk" ,tk))) ;Tcl/Tk is used by 'xmaxima' |
df354a77 FB |
2856 | (native-inputs |
2857 | `(("texinfo" ,texinfo) | |
ccbc5758 KK |
2858 | ("perl" ,perl) |
2859 | ("python" ,python))) | |
8731e527 | 2860 | (arguments |
df354a77 FB |
2861 | `(#:configure-flags |
2862 | (list "--enable-gcl" | |
2863 | (string-append "--with-posix-shell=" | |
2864 | (assoc-ref %build-inputs "bash") | |
2865 | "/bin/sh") | |
2866 | (string-append "--with-wish=" | |
2867 | (assoc-ref %build-inputs "tk") | |
2868 | "/bin/wish" | |
2869 | (let ((v ,(package-version tk))) | |
2870 | (string-take v (string-index-right v #\.))))) | |
df354a77 | 2871 | ;; By default Maxima attempts to write temporary files to |
77af7b24 MW |
2872 | ;; '/tmp/nix-build-maxima-*', which won't exist at run time. |
2873 | ;; Work around that. | |
df354a77 | 2874 | #:make-flags (list "TMPDIR=/tmp") |
0093b126 KK |
2875 | #:phases |
2876 | (modify-phases %standard-phases | |
fc9c47bd KK |
2877 | (add-after 'unpack 'patch-paths |
2878 | (lambda* (#:key inputs #:allow-other-keys) | |
2879 | (let* ((sed (string-append (assoc-ref inputs "sed") "/bin/sed")) | |
2880 | (coreutils (assoc-ref inputs "coreutils")) | |
2881 | (dirname (string-append coreutils "/bin/dirname")) | |
ccc963d5 KK |
2882 | (head (string-append coreutils "/bin/head")) |
2883 | (perl (string-append (assoc-ref inputs "perl") "/bin/perl")) | |
2884 | (python (string-append (assoc-ref inputs "python") | |
2885 | "/bin/python3"))) | |
fc9c47bd KK |
2886 | (substitute* "src/maxima.in" |
2887 | (("sed ") (string-append sed " ")) | |
2888 | (("dirname") dirname) | |
2889 | (("head") head)) | |
ccc963d5 KK |
2890 | (substitute* "doc/info/Makefile.in" |
2891 | (("/usr/bin/env perl") perl)) | |
2892 | (substitute* "doc/info/build_html.sh.in" | |
2893 | (("python") python)) | |
fc9c47bd | 2894 | #t))) |
0093b126 KK |
2895 | (add-before 'check 'pre-check |
2896 | (lambda _ | |
2897 | (chmod "src/maxima" #o555) | |
2898 | #t)) | |
1472d19a KK |
2899 | (replace 'check |
2900 | (lambda _ | |
2901 | ;; This is derived from the testing code in the "debian/rules" file | |
2902 | ;; of Debian's Maxima package. | |
2903 | ;; If Maxima can successfully run this, the binary to be installed | |
2904 | ;; should be fine. | |
df129041 MW |
2905 | (invoke "sh" "-c" |
2906 | (string-append | |
2907 | "./maxima-local " | |
2908 | "--lisp=gcl " | |
2909 | "--batch-string=\"run_testsuite();\" " | |
2910 | "| grep -q \"No unexpected errors found\"")))) | |
0093b126 KK |
2911 | ;; Make sure the doc and emacs files are found in the |
2912 | ;; standard location. Also configure maxima to find gnuplot | |
2913 | ;; without having it on the PATH. | |
2914 | (add-after 'install 'post-install | |
2915 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
2916 | (let* ((gnuplot (assoc-ref inputs "gnuplot")) | |
2917 | (out (assoc-ref outputs "out")) | |
2918 | (datadir (string-append out "/share/maxima/" ,version)) | |
2919 | (binutils (string-append (assoc-ref inputs "binutils") | |
2920 | "/bin"))) | |
2921 | (with-directory-excursion out | |
2922 | (mkdir-p "share/emacs") | |
2923 | (mkdir-p "share/doc") | |
0093b126 KK |
2924 | (symlink |
2925 | (string-append datadir "/doc/") | |
2926 | (string-append out "/share/doc/maxima")) | |
2927 | (with-atomic-file-replacement | |
2928 | (string-append datadir "/share/maxima-init.lisp") | |
2929 | (lambda (in out) | |
2930 | (format out "~a ~s~a~%" | |
2931 | "(setf $gnuplot_command " | |
2932 | (string-append gnuplot "/bin/gnuplot") ")") | |
2933 | (dump-port in out)))) | |
2934 | ;; Ensure that Maxima will have access to the GNU binutils | |
2935 | ;; components at runtime. | |
2936 | (wrap-program (string-append out "/bin/maxima") | |
2937 | `("PATH" prefix (,binutils)))) | |
2938 | #t))))) | |
8731e527 JD |
2939 | (home-page "http://maxima.sourceforge.net") |
2940 | (synopsis "Numeric and symbolic expression manipulation") | |
2941 | (description "Maxima is a system for the manipulation of symbolic and | |
2942 | numerical expressions. It yields high precision numeric results by using | |
2943 | exact fractions, arbitrary precision integers, and variable precision floating | |
e881752c | 2944 | point numbers.") |
8731e527 JD |
2945 | ;; Some files are lgpl2.1+. Some are gpl2+. Some explicitly state gpl1+. |
2946 | ;; Others simply say "GNU General Public License" without stating a | |
2947 | ;; version (which implicitly means gpl1+). | |
2948 | ;; At least one file (src/maxima.asd) says "version 2." | |
2949 | ;; GPLv2 only is therefore the smallest subset. | |
f36afe4d | 2950 | (license license:gpl2))) |
ec322be2 | 2951 | |
9aafbc0c MW |
2952 | (define-public wxmaxima |
2953 | (package | |
2954 | (name "wxmaxima") | |
1e8609f2 | 2955 | (version "19.11.1") |
9aafbc0c MW |
2956 | (source |
2957 | (origin | |
c93b77ad KK |
2958 | (method git-fetch) |
2959 | (uri (git-reference | |
2960 | (url "https://github.com/wxMaxima-developers/wxmaxima.git") | |
2961 | (commit (string-append "Version-" version)))) | |
2962 | (file-name (git-file-name name version)) | |
9aafbc0c | 2963 | (sha256 |
1e8609f2 | 2964 | (base32 "16xizaddb27432n1083y89ir5zdqvllsgbwrzzk4jc2rw1ldxfsv")))) |
0181df53 | 2965 | (build-system cmake-build-system) |
5143517c | 2966 | (native-inputs |
0181df53 | 2967 | `(("gettext" ,gettext-minimal))) |
9aafbc0c MW |
2968 | (inputs |
2969 | `(("wxwidgets" ,wxwidgets) | |
de477809 SB |
2970 | ("maxima" ,maxima) |
2971 | ;; Runtime support. | |
2972 | ("adwaita-icon-theme" ,adwaita-icon-theme) | |
2973 | ("gtk+" ,gtk+) | |
2974 | ("shared-mime-info" ,shared-mime-info))) | |
9aafbc0c | 2975 | (arguments |
0181df53 KK |
2976 | `(#:tests? #f ; no check target |
2977 | #:phases | |
ac2ddcc6 | 2978 | (modify-phases %standard-phases |
ac2ddcc6 KK |
2979 | (add-after 'install 'wrap-program |
2980 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
2981 | (wrap-program (string-append (assoc-ref outputs "out") | |
2982 | "/bin/wxmaxima") | |
2983 | `("PATH" ":" prefix | |
2984 | (,(string-append (assoc-ref inputs "maxima") | |
2985 | "/bin"))) | |
2986 | ;; For GtkFileChooserDialog. | |
2987 | `("GSETTINGS_SCHEMA_DIR" = | |
2988 | (,(string-append (assoc-ref inputs "gtk+") | |
2989 | "/share/glib-2.0/schemas"))) | |
2990 | `("XDG_DATA_DIRS" ":" prefix | |
2991 | (;; Needed by gdk-pixbuf to know supported icon formats. | |
2992 | ,(string-append | |
2993 | (assoc-ref inputs "shared-mime-info") "/share") | |
2994 | ;; The default icon theme of GTK+. | |
2995 | ,(string-append | |
2996 | (assoc-ref inputs "adwaita-icon-theme") "/share")))) | |
2997 | #t))))) | |
9aafbc0c MW |
2998 | (home-page "https://andrejv.github.io/wxmaxima/") |
2999 | (synopsis "Graphical user interface for the Maxima computer algebra system") | |
3000 | (description | |
3001 | "wxMaxima is a graphical user interface for the Maxima computer algebra | |
3002 | system. It eases the use of Maxima by making most of its commands available | |
3003 | through a menu system and by providing input dialogs for commands that require | |
3004 | more than one argument. It also implements its own display engine that | |
3005 | outputs mathematical symbols directly instead of depicting them with ASCII | |
3006 | characters. | |
3007 | ||
3008 | wxMaxima also features 2D and 3D inline plots, simple animations, mixing of | |
3009 | text and mathematical calculations to create documents, exporting of input and | |
3010 | output to TeX, and a browser for Maxima's manual including command index and | |
3011 | full text searching.") | |
3012 | (license license:gpl2+))) | |
3013 | ||
b15e47f9 RW |
3014 | (define-public armadillo |
3015 | (package | |
3016 | (name "armadillo") | |
f133e244 | 3017 | (version "9.100.5") |
b15e47f9 RW |
3018 | (source (origin |
3019 | (method url-fetch) | |
3020 | (uri (string-append "mirror://sourceforge/arma/armadillo-" | |
7397cd9e | 3021 | version ".tar.xz")) |
b15e47f9 RW |
3022 | (sha256 |
3023 | (base32 | |
f133e244 | 3024 | "1ka1vd9fcmvp12qkcm4888dkfqwnalvv00x04wy29f3nx3qwczby")))) |
b15e47f9 | 3025 | (build-system cmake-build-system) |
e405c0bc | 3026 | (arguments `(#:tests? #f)) ; no test target |
b15e47f9 RW |
3027 | (inputs |
3028 | `(("openblas" ,openblas) | |
3029 | ("lapack" ,lapack) | |
3030 | ("arpack" ,arpack-ng))) | |
3031 | (home-page "http://arma.sourceforge.net/") | |
3032 | (synopsis "C++ linear algebra library") | |
3033 | (description | |
3034 | "Armadillo is a C++ linear algebra library, aiming towards a good balance | |
3035 | between speed and ease of use. It is useful for algorithm development | |
3036 | directly in C++, or quick conversion of research code into production | |
3037 | environments. It can be used for machine learning, pattern recognition, | |
3038 | signal processing, bioinformatics, statistics, econometrics, etc. The library | |
3039 | provides efficient classes for vectors, matrices and cubes, as well as 150+ | |
3040 | associated functions (eg. contiguous and non-contiguous submatrix views).") | |
fe418cc5 | 3041 | (license license:asl2.0))) |
b15e47f9 | 3042 | |
279663ef | 3043 | (define-public muparser |
d7cff656 LF |
3044 | ;; When switching download sites, muparser re-issued a 2.2.5 release with a |
3045 | ;; different hash. In order to make `guix package --upgrade` work correctly, | |
3046 | ;; we set a Guix packaging revision. | |
3047 | ;; When the next version of muparser is released, we can remove | |
3048 | ;; UPSTREAM-VERSION and REVISION and use the plain VERSION. | |
3049 | (let ((upstream-version "2.2.5") | |
3050 | (revision "2")) | |
3051 | (package | |
3052 | (name "muparser") | |
3053 | (version (string-append upstream-version "-" revision)) | |
3054 | (source | |
3055 | (origin | |
67f1db38 TGR |
3056 | (method git-fetch) |
3057 | (uri (git-reference | |
3058 | (url "https://github.com/beltoforion/muparser.git") | |
3059 | (commit (string-append "v" upstream-version)))) | |
3060 | (file-name (git-file-name name version)) | |
d7cff656 | 3061 | (sha256 |
67f1db38 | 3062 | (base32 "0f0g4995xngf1pp3zr4p6ai2f8v6f8bxwa0k8ayjjiv1l8h44m24")))) |
d7cff656 LF |
3063 | (build-system gnu-build-system) |
3064 | (arguments | |
3065 | `(#:configure-flags '("--enable-samples=no") | |
3066 | #:tests? #f)) ;no "check" target | |
3067 | (home-page "http://muparser.beltoforion.de/") | |
3068 | (synopsis "Fast parser library for mathematical expressions") | |
3069 | (description | |
3070 | "muParser is an extensible high performance math parser library. It is | |
3071 | based on transforming an expression into a bytecode and precalculating constant | |
3072 | parts of it.") | |
3073 | (license license:expat)))) | |
279663ef | 3074 | |
e73b49fb RW |
3075 | (define-public openblas |
3076 | (package | |
ba05be22 LC |
3077 | ;; TODO: Incorporate 'openblas/fixed-num-threads' changes on the next |
3078 | ;; rebuild cycle. | |
3079 | (replacement openblas/fixed-num-threads) | |
3080 | ||
e73b49fb | 3081 | (name "openblas") |
e7741236 | 3082 | (version "0.3.6") |
e73b49fb RW |
3083 | (source |
3084 | (origin | |
3085 | (method url-fetch) | |
a617fd55 MB |
3086 | (uri (string-append "mirror://sourceforge/openblas/v" version "/OpenBLAS%20" |
3087 | version "%20version.tar.gz")) | |
e73b49fb RW |
3088 | (file-name (string-append name "-" version ".tar.gz")) |
3089 | (sha256 | |
3090 | (base32 | |
e7741236 | 3091 | "1r2g9zzwq5dm8vjd19pxwggfvfzy56cvkmpmp5d014qr3svgmsap")))) |
e73b49fb RW |
3092 | (build-system gnu-build-system) |
3093 | (arguments | |
5789566a | 3094 | `(#:test-target "test" |
bd0b4379 RW |
3095 | ;; DYNAMIC_ARCH is only supported on x86. When it is disabled and no |
3096 | ;; TARGET is specified, OpenBLAS will tune itself to the build host, so | |
3097 | ;; we need to disable substitutions. | |
71923a91 AE |
3098 | #:substitutable? |
3099 | ,(let ((system (or (%current-target-system) (%current-system)))) | |
3100 | (or (string-prefix? "x86_64" system) | |
bd0b4379 | 3101 | (string-prefix? "i686" system) |
83a34647 EF |
3102 | (string-prefix? "mips" system) |
3103 | (string-prefix? "aarch64" system))) | |
e73b49fb RW |
3104 | #:make-flags |
3105 | (list (string-append "PREFIX=" (assoc-ref %outputs "out")) | |
3106 | "SHELL=bash" | |
5855756c | 3107 | "MAKE_NB_JOBS=0" ;use jobserver for submakes |
af5b817e RW |
3108 | ;; Build the library for all supported CPUs. This allows |
3109 | ;; switching CPU targets at runtime with the environment variable | |
3110 | ;; OPENBLAS_CORETYPE=<type>, where "type" is a supported CPU type. | |
71923a91 AE |
3111 | ;; Unfortunately, this is not supported on non-x86 architectures, |
3112 | ;; where it leads to failed builds. | |
3113 | ,@(let ((system (or (%current-target-system) (%current-system)))) | |
8a637e79 RW |
3114 | (cond |
3115 | ((or (string-prefix? "x86_64" system) | |
71923a91 | 3116 | (string-prefix? "i686" system)) |
8a637e79 RW |
3117 | '("DYNAMIC_ARCH=1")) |
3118 | ;; On MIPS we force the "SICORTEX" TARGET, as for the other | |
3119 | ;; two available MIPS targets special extended instructions | |
3120 | ;; for Loongson cores are used. | |
3121 | ((string-prefix? "mips" system) | |
3122 | '("TARGET=SICORTEX")) | |
83a34647 EF |
3123 | ;; On aarch64 force the generic 'armv8-a' target |
3124 | ((string-prefix? "aarch64" system) | |
3125 | '("TARGET=ARMV8")) | |
8a637e79 | 3126 | (else '())))) |
e73b49fb | 3127 | ;; no configure script |
493937ae DL |
3128 | #:phases |
3129 | (modify-phases %standard-phases | |
3130 | (delete 'configure) | |
3131 | (add-before 'build 'set-extralib | |
3132 | (lambda* (#:key inputs #:allow-other-keys) | |
3133 | ;; Get libgfortran found when building in utest. | |
3134 | (setenv "FEXTRALIB" | |
3135 | (string-append "-L" (assoc-ref inputs "fortran-lib") | |
3136 | "/lib")) | |
3137 | #t))))) | |
e73b49fb | 3138 | (inputs |
493937ae | 3139 | `(("fortran-lib" ,gfortran "lib"))) |
e73b49fb RW |
3140 | (native-inputs |
3141 | `(("cunit" ,cunit) | |
493937ae | 3142 | ("fortran" ,gfortran) |
e73b49fb RW |
3143 | ("perl" ,perl))) |
3144 | (home-page "http://www.openblas.net/") | |
3145 | (synopsis "Optimized BLAS library based on GotoBLAS") | |
3146 | (description | |
3147 | "OpenBLAS is a BLAS library forked from the GotoBLAS2-1.13 BSD version.") | |
3148 | (license license:bsd-3))) | |
3149 | ||
daa6036f | 3150 | (define-public openblas-ilp64 |
ba05be22 | 3151 | (package/inherit openblas |
daa6036f EB |
3152 | (name "openblas-ilp64") |
3153 | (supported-systems '("x86_64-linux" "aarch64-linux" "mips64el-linux")) | |
3154 | (arguments | |
3155 | (substitute-keyword-arguments (package-arguments openblas) | |
3156 | ((#:make-flags flags '()) | |
3157 | `(append (list "INTERFACE64=1" "LIBNAMESUFFIX=ilp64") | |
3158 | ,flags)))) | |
3159 | (synopsis "Optimized BLAS library based on GotoBLAS (ILP64 version)") | |
3160 | (license license:bsd-3))) | |
3161 | ||
ba05be22 LC |
3162 | (define openblas/fixed-num-threads |
3163 | ;; TODO: Move that to 'openblas' proper on the next rebuild cycle. | |
3164 | (package | |
3165 | (inherit openblas) | |
3166 | (version (match (string-split (package-version openblas) #\.) | |
3167 | ((numbers ... (= string-length len)) | |
3168 | (string-join (append numbers | |
3169 | (list (make-string len #\a))) | |
3170 | ".")))) | |
3171 | (arguments | |
3172 | (substitute-keyword-arguments (package-arguments openblas) | |
3173 | ((#:make-flags flags ''()) | |
3174 | ;; This is the maximum number of threads OpenBLAS will ever use (that | |
3175 | ;; is, if $OPENBLAS_NUM_THREADS is greater than that, then NUM_THREADS | |
3176 | ;; is used.) If we don't set it, the makefile sets it to the number | |
3177 | ;; of cores of the build machine, which is obviously wrong. | |
3178 | `(cons "NUM_THREADS=128" ,flags)))))) | |
3179 | ||
5a7deb11 LC |
3180 | (define* (make-blis implementation #:optional substitutable?) |
3181 | "Return a BLIS package with the given IMPLEMENTATION (see config/ in the | |
3182 | source tree for a list of implementations.) | |
3183 | ||
3184 | SUBSTITUTABLE? determines whether the package is made available as a | |
3185 | substitute. | |
3186 | ||
3187 | Currently the specialization must be selected at configure-time, but work is | |
3188 | underway to allow BLIS to select the right optimized kernels at run time: | |
3189 | <https://github.com/flame/blis/issues/129>." | |
3190 | (package | |
3191 | (name (if (string=? implementation "reference") | |
3192 | "blis" | |
3193 | (string-append "blis-" implementation))) | |
3194 | (version "0.2.2") | |
3195 | (home-page "https://github.com/flame/blis") | |
3196 | (source (origin | |
3197 | (method git-fetch) | |
3198 | (uri (git-reference (url home-page) (commit version))) | |
3199 | (sha256 | |
3200 | (base32 | |
3201 | "1wr79a50nm4abhw8w3sn96nmwp5mrzifcigk7khw9qcgyyyqayfh")) | |
3202 | (file-name (git-file-name "blis" version)))) | |
3203 | (build-system gnu-build-system) | |
3204 | (arguments | |
3205 | `(#:test-target "test" | |
3206 | ||
3207 | #:substitutable? ,substitutable? | |
3208 | ||
3209 | #:phases (modify-phases %standard-phases | |
3210 | (replace 'configure | |
3211 | (lambda* (#:key outputs #:allow-other-keys) | |
3212 | ;; This is a home-made 'configure' script. | |
3213 | (let ((out (assoc-ref outputs "out"))) | |
1ec17821 RW |
3214 | (invoke "./configure" "-p" out |
3215 | "-d" "opt" | |
3216 | "--disable-static" | |
3217 | "--enable-shared" | |
3218 | "--enable-threading=openmp" | |
5a7deb11 | 3219 | |
1ec17821 | 3220 | ,implementation)))) |
5a7deb11 LC |
3221 | (add-before 'check 'show-test-output |
3222 | (lambda _ | |
3223 | ;; By default "make check" is silent. Make it verbose. | |
3224 | (system "tail -F output.testsuite &") | |
3225 | #t))))) | |
3226 | (synopsis "High-performance basic linear algebra (BLAS) routines") | |
3227 | (description | |
3228 | "BLIS is a portable software framework for instantiating high-performance | |
3229 | BLAS-like dense linear algebra libraries. The framework was designed to | |
3230 | isolate essential kernels of computation that, when optimized, immediately | |
3231 | enable optimized implementations of most of its commonly used and | |
3232 | computationally intensive operations. While BLIS exports a new BLAS-like API, | |
3233 | it also includes a BLAS compatibility layer which gives application developers | |
3234 | access to BLIS implementations via traditional BLAS routine calls.") | |
3235 | (license license:bsd-3))) | |
3236 | ||
3237 | (define-public blis | |
3238 | ;; This is the "reference" implementation, which is the non-optimized but | |
3239 | ;; portable variant (no assembly). | |
3240 | (make-blis "reference" #t)) | |
3241 | ||
3242 | (define ignorance blis) | |
3243 | ||
3244 | (define-syntax-rule (blis/x86_64 processor) | |
3245 | "Expand to a package specialized for PROCESSOR." | |
3246 | (package | |
3247 | (inherit (make-blis processor)) | |
3248 | (supported-systems '("x86_64-linux")))) | |
3249 | ||
3250 | (define-public blis-sandybridge | |
3251 | ;; BLIS specialized for Sandy Bridge processors (launched 2011): | |
3252 | ;; <http://ark.intel.com/products/codename/29900/Sandy-Bridge>. | |
3253 | (blis/x86_64 "sandybridge")) | |
3254 | ||
3255 | (define-public blis-haswell | |
3256 | ;; BLIS specialized for Haswell processors (launched 2013): | |
3257 | ;; <http://ark.intel.com/products/codename/42174/Haswell>. | |
3258 | (blis/x86_64 "haswell")) | |
3259 | ||
3260 | (define-public blis-knl | |
3261 | ;; BLIS specialized for Knights Landing processor (launched 2016): | |
3262 | ;; <http://ark.intel.com/products/series/92650/Intel-Xeon-Phi-x200-Product-Family>. | |
3263 | (blis/x86_64 "knl")) | |
3264 | ||
3265 | ||
e1605e36 RW |
3266 | (define-public openlibm |
3267 | (package | |
3268 | (name "openlibm") | |
48d7ac17 | 3269 | (version "0.6.0") |
e1605e36 RW |
3270 | (source |
3271 | (origin | |
ca72dd2c TGR |
3272 | (method git-fetch) |
3273 | (uri (git-reference | |
3274 | (url "https://github.com/JuliaLang/openlibm.git") | |
3275 | (commit (string-append "v" version)))) | |
3276 | (file-name (git-file-name name version)) | |
e1605e36 | 3277 | (sha256 |
ca72dd2c | 3278 | (base32 "08wfchmmr5200fvmn1kwq9byc1fhsq46hn0y5k8scdl74771c7gh")))) |
e1605e36 RW |
3279 | (build-system gnu-build-system) |
3280 | (arguments | |
3281 | `(#:make-flags | |
3282 | (list (string-append "prefix=" (assoc-ref %outputs "out"))) | |
3283 | #:phases | |
3284 | ;; no configure script | |
dc1d3cde | 3285 | (modify-phases %standard-phases (delete 'configure)) |
e1605e36 RW |
3286 | #:tests? #f)) ;the tests are part of the default target |
3287 | (home-page "http://openlibm.org/") | |
3288 | (synopsis "Portable C mathematical library (libm)") | |
3289 | (description | |
3290 | "OpenLibm is an effort to have a high quality, portable, standalone C | |
3291 | mathematical library (libm). It can be used standalone in applications and | |
3292 | programming language implementations. The project was born out of a need to | |
e881752c | 3293 | have a good libm for the Julia programming language that worked consistently |
e1605e36 RW |
3294 | across compilers and operating systems, and in 32-bit and 64-bit |
3295 | environments.") | |
538c0e3b EF |
3296 | ;; Each architecture has its own make target, and there is none for mips. |
3297 | (supported-systems (delete "mips64el-linux" %supported-systems)) | |
e1605e36 RW |
3298 | ;; See LICENSE.md for details. |
3299 | (license (list license:expat | |
3300 | license:isc | |
3301 | license:bsd-2 | |
3302 | license:public-domain | |
3303 | license:lgpl2.1+)))) | |
3304 | ||
e62be58f RW |
3305 | (define-public openspecfun |
3306 | (package | |
3307 | (name "openspecfun") | |
59cd0ba4 | 3308 | (version "0.5.3") |
e62be58f RW |
3309 | (source |
3310 | (origin | |
90cea671 TGR |
3311 | (method git-fetch) |
3312 | (uri (git-reference | |
3313 | (url "https://github.com/JuliaLang/openspecfun.git") | |
3314 | (commit (string-append "v" version)))) | |
3315 | (file-name (git-file-name name version)) | |
e62be58f | 3316 | (sha256 |
90cea671 | 3317 | (base32 "0pfw6l3ch7isz403llx7inxlvavqh01jh1hb9dpidi86sjjx9kfh")))) |
e62be58f RW |
3318 | (build-system gnu-build-system) |
3319 | (arguments | |
59cd0ba4 | 3320 | '(#:tests? #f ; no "check" target |
e62be58f RW |
3321 | #:make-flags |
3322 | (list (string-append "prefix=" (assoc-ref %outputs "out"))) | |
59cd0ba4 TGR |
3323 | #:phases |
3324 | (modify-phases %standard-phases | |
3325 | (delete 'configure)))) ; no configure script | |
e62be58f | 3326 | (inputs |
19afbea1 | 3327 | `(("fortran" ,gfortran))) |
e62be58f RW |
3328 | (home-page "https://github.com/JuliaLang/openspecfun") |
3329 | (synopsis "Collection of special mathematical functions") | |
3330 | (description | |
3331 | "Openspecfun provides AMOS and Faddeeva. AMOS (from Netlib) is a | |
3332 | portable package for Bessel Functions of a Complex Argument and Nonnegative | |
3333 | Order; it contains subroutines for computing Bessel functions and Airy | |
3334 | functions. Faddeeva allows computing the various error functions of arbitrary | |
3335 | complex arguments (Faddeeva function, error function, complementary error | |
3336 | function, scaled complementary error function, imaginary error function, and | |
3337 | Dawson function); given these, one can also easily compute Voigt functions, | |
3338 | Fresnel integrals, and similar related functions as well.") | |
3339 | ;; Faddeeva is released under the Expat license; AMOS is included as | |
3340 | ;; public domain software. | |
3341 | (license (list license:expat license:public-domain)))) | |
3342 | ||
2742f87e RW |
3343 | (define-public suitesparse |
3344 | (package | |
3345 | (name "suitesparse") | |
bd5b5ac0 | 3346 | (version "4.5.5") |
2742f87e RW |
3347 | (source |
3348 | (origin | |
3349 | (method url-fetch) | |
3350 | (uri (string-append | |
3351 | "http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-" | |
3352 | version ".tar.gz")) | |
3353 | (sha256 | |
3354 | (base32 | |
bd5b5ac0 EB |
3355 | "1dnr6pmjzc2qmbkmb4shigx1l74ilf6abn7svyd6brxgvph8vadr")) |
3356 | (modules '((guix build utils))) | |
3357 | (snippet | |
3358 | ;; Remove bundled metis source | |
6cbee49d MW |
3359 | '(begin |
3360 | (delete-file-recursively "metis-5.1.0") | |
3361 | #t)))) | |
2742f87e RW |
3362 | (build-system gnu-build-system) |
3363 | (arguments | |
bd5b5ac0 | 3364 | '(#:tests? #f ;no "check" target |
2742f87e RW |
3365 | #:make-flags |
3366 | (list "CC=gcc" | |
3367 | "BLAS=-lblas" | |
3368 | "TBB=-ltbb" | |
bd5b5ac0 | 3369 | "MY_METIS_LIB=-lmetis" |
2742f87e RW |
3370 | (string-append "INSTALL_LIB=" |
3371 | (assoc-ref %outputs "out") "/lib") | |
3372 | (string-append "INSTALL_INCLUDE=" | |
bd5b5ac0 EB |
3373 | (assoc-ref %outputs "out") "/include") |
3374 | "library") | |
2742f87e | 3375 | #:phases |
2509522c | 3376 | (modify-phases %standard-phases |
bd5b5ac0 | 3377 | (delete 'configure)))) ;no configure script |
2742f87e RW |
3378 | (inputs |
3379 | `(("tbb" ,tbb) | |
bd5b5ac0 EB |
3380 | ("lapack" ,lapack) |
3381 | ("metis" ,metis))) | |
2742f87e RW |
3382 | (home-page "http://faculty.cse.tamu.edu/davis/suitesparse.html") |
3383 | (synopsis "Suite of sparse matrix software") | |
3384 | (description | |
3385 | "SuiteSparse is a suite of sparse matrix algorithms, including: UMFPACK, | |
3386 | multifrontal LU factorization; CHOLMOD, supernodal Cholesky; SPQR, | |
3387 | multifrontal QR; KLU and BTF, sparse LU factorization, well-suited for circuit | |
3388 | simulation; ordering methods (AMD, CAMD, COLAMD, and CCOLAMD); CSparse and | |
3389 | CXSparse, a concise sparse Cholesky factorization package; and many other | |
3390 | packages.") | |
3391 | ;; LGPLv2.1+: | |
3392 | ;; AMD, CAMD, BTF, COLAMD, CCOLAMD, CSparse, CXSparse, KLU, LDL | |
3393 | ;; GPLv2+: | |
3394 | ;; GPUQREngine, RBio, SuiteSparse_GPURuntime, SuiteSparseQR, UMFPACK | |
3395 | (license (list license:gpl2+ license:lgpl2.1+)))) | |
3396 | ||
ec322be2 FB |
3397 | (define-public atlas |
3398 | (package | |
3399 | (name "atlas") | |
3c98ac02 | 3400 | (version "3.10.3") |
ec322be2 FB |
3401 | (source (origin |
3402 | (method url-fetch) | |
de67e922 LF |
3403 | (uri (string-append "mirror://sourceforge/math-atlas/Stable/" |
3404 | version "/atlas" version ".tar.bz2")) | |
ec322be2 FB |
3405 | (sha256 |
3406 | (base32 | |
3c98ac02 | 3407 | "1dyjlq3fiparvm8ypwk6rsmjzmnwk81l88gkishphpvc79ryp216")))) |
ec322be2 FB |
3408 | (build-system gnu-build-system) |
3409 | (home-page "http://math-atlas.sourceforge.net/") | |
19afbea1 | 3410 | (inputs `(("gfortran" ,gfortran) |
ec322be2 FB |
3411 | ("lapack-tar" ,(package-source lapack)))) |
3412 | (outputs '("out" "doc")) | |
01480b9e FB |
3413 | ;; For the moment we drop support for MIPS at it fails to compile. See |
3414 | ;; https://lists.gnu.org/archive/html/guix-devel/2014-11/msg00516.html | |
3415 | (supported-systems (delete "mips64el-linux" %supported-systems)) | |
ec322be2 FB |
3416 | (arguments |
3417 | `(#:parallel-build? #f | |
3418 | #:parallel-tests? #f | |
f15615b1 LC |
3419 | |
3420 | ;; ATLAS tunes itself for the machine it is built on, as explained at | |
3421 | ;; <http://lists.gnu.org/archive/html/guix-devel/2014-10/msg00305.html>. | |
3422 | ;; For this reason, we want users to build it locally instead of using | |
3423 | ;; substitutes. | |
3424 | #:substitutable? #f | |
3425 | ||
ec322be2 | 3426 | #:modules ((srfi srfi-26) |
ec322be2 FB |
3427 | (guix build gnu-build-system) |
3428 | (guix build utils)) | |
40029cbe | 3429 | #:configure-flags |
ec322be2 FB |
3430 | `(;; Generate position independent code suitable for dynamic libraries |
3431 | ;; and use WALL timer to get more accurate timing. | |
3432 | "-Fa" "alg" "-fPIC" "-D" "c" "-DWALL" | |
3433 | ;; Set word width. | |
3434 | "-b" | |
3435 | ,,(if (string-match "64" (%current-system)) | |
3436 | "64" | |
3437 | "32") | |
3438 | ;; Disable parallel build as it gives errors: atlas_pthread.h is | |
3439 | ;; needed to compile C files before it is generated. | |
3440 | "-Ss" "pmake" "make -j 1" | |
af89a667 FB |
3441 | ;; Probe is failing for MIPS. We therefore define the system |
3442 | ;; architecture explicitly by setting (-A) MACHINETYPE = 49 | |
3443 | ;; 'MIPSR1xK' and (-V) ISA = 1 'none'. | |
3444 | ,,@(if (string-prefix? "mips" (%current-system)) | |
3445 | (list "-A" "49" "-V" "1") | |
3446 | (list)) | |
ec322be2 FB |
3447 | ;; Generate shared libraries. |
3448 | "--shared" | |
3449 | ;; Build a full LAPACK library. | |
3450 | ,(string-append "--with-netlib-lapack-tarfile=" | |
3451 | (assoc-ref %build-inputs "lapack-tar"))) | |
3452 | #:phases | |
e5b4b96b EF |
3453 | (modify-phases %standard-phases |
3454 | (add-after 'install 'install-doc | |
3455 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
3456 | (let ((doc (string-append (assoc-ref outputs "doc") | |
3457 | "/share/doc/atlas"))) | |
3458 | (mkdir-p doc) | |
cb6f44d4 RW |
3459 | (for-each (cut install-file <> doc) |
3460 | (find-files "../ATLAS/doc" ".*")) | |
3461 | #t))) | |
e5b4b96b | 3462 | (add-after 'check 'check-pt |
cb6f44d4 | 3463 | (lambda _ (invoke "make" "ptcheck"))) |
e5b4b96b EF |
3464 | ;; Fix files required to run configure. |
3465 | (add-before 'configure 'fix-/bin/sh | |
ec322be2 FB |
3466 | (lambda _ |
3467 | ;; Use `sh', not `/bin/sh'. | |
3468 | (substitute* (find-files "." "Makefile|configure|SpewMakeInc\\.c") | |
3469 | (("/bin/sh") | |
5b786db8 EF |
3470 | "sh")) |
3471 | #t)) | |
e5b4b96b EF |
3472 | ;; Fix /bin/sh in generated make files. |
3473 | (add-after 'configure 'fix-/bin/sh-in-generated-files | |
3474 | (lambda _ | |
3475 | (substitute* (find-files "." "^[Mm]ake\\.inc.*") | |
3476 | (("/bin/sh") | |
5b786db8 EF |
3477 | "sh")) |
3478 | #t)) | |
e5b4b96b EF |
3479 | ;; ATLAS configure program does not accepts the default flags |
3480 | ;; passed by the 'gnu-build-system'. | |
3481 | (replace 'configure | |
3482 | (lambda* (#:key native-inputs inputs outputs | |
3483 | (configure-flags '()) | |
3484 | #:allow-other-keys #:rest args) | |
3485 | (let* ((prefix (assoc-ref outputs "out")) | |
3486 | (bash (or (and=> (assoc-ref | |
3487 | (or native-inputs inputs) "bash") | |
3488 | (cut string-append <> "/bin/bash")) | |
3489 | "/bin/sh")) | |
3490 | (flags `(,(string-append "--prefix=" prefix) | |
3491 | ,@configure-flags)) | |
3492 | (abs-srcdir (getcwd)) | |
3493 | (srcdir (string-append "../" (basename abs-srcdir)))) | |
3494 | (format #t "source directory: ~s (relative from build: ~s)~%" | |
3495 | abs-srcdir srcdir) | |
3496 | (mkdir "../build") | |
3497 | (chdir "../build") | |
3498 | (format #t "build directory: ~s~%" (getcwd)) | |
3499 | (format #t "configure flags: ~s~%" flags) | |
cb6f44d4 RW |
3500 | (apply invoke bash |
3501 | (string-append srcdir "/configure") | |
3502 | flags))))))) | |
ec322be2 FB |
3503 | (synopsis "Automatically Tuned Linear Algebra Software") |
3504 | (description | |
3505 | "ATLAS is an automatically tuned linear algebra software library | |
3506 | providing C and Fortran77 interfaces to a portably efficient BLAS | |
3507 | implementation, as well as a few routines from LAPACK. | |
3508 | ||
f15615b1 LC |
3509 | Optimization occurs at build time. For this reason, the library is built on |
3510 | the machine where it is installed, without resorting to pre-built substitutes. | |
ec322be2 | 3511 | |
f15615b1 | 3512 | Before building the library, CPU throttling should be disabled. This can be |
d97c429a | 3513 | done in the BIOS, or, on GNU/Linux, with the following command: |
ec322be2 | 3514 | |
8e9ba611 | 3515 | @example |
d97c429a | 3516 | # cpupower --governor performance |
8e9ba611 | 3517 | @end example |
ec322be2 | 3518 | |
d97c429a | 3519 | Failure to do so will result in a library with poor performance.") |
ec322be2 | 3520 | (license license:bsd-3))) |
c12efc72 AE |
3521 | |
3522 | (define-public glm | |
3523 | (package | |
3524 | (name "glm") | |
3f55b7be | 3525 | (version "0.9.9.6") |
c12efc72 AE |
3526 | (source |
3527 | (origin | |
3528 | (method url-fetch) | |
5ea4b594 MB |
3529 | (uri (string-append "https://github.com/g-truc/glm/releases/download/" |
3530 | version "/glm-" version ".zip")) | |
c12efc72 | 3531 | (sha256 |
3f55b7be TGR |
3532 | (base32 "1l0pi1qi37mk6s0yrkrw07lspv4gcqnr9ryg3521hrl77ff37dwx")) |
3533 | (patches (search-patches "glm-restore-install-target.patch")))) | |
c12efc72 AE |
3534 | (build-system cmake-build-system) |
3535 | (native-inputs | |
3536 | `(("unzip" ,unzip))) | |
46bda5eb | 3537 | (home-page "https://glm.g-truc.net/") |
c12efc72 AE |
3538 | (synopsis "OpenGL Mathematics library") |
3539 | (description "OpenGL Mathematics (GLM) is a header-only C++ mathematics | |
3540 | library for graphics software based on the OpenGL Shading Language (GLSL) | |
3541 | specifications.") | |
3542 | (license license:expat))) | |
7f18257b AE |
3543 | |
3544 | (define-public lpsolve | |
3545 | (package | |
3546 | (name "lpsolve") | |
a89e0cf5 | 3547 | (version "5.5.2.5") |
7f18257b AE |
3548 | (source |
3549 | (origin | |
3550 | (method url-fetch) | |
3551 | (uri (string-append "mirror://sourceforge/lpsolve/lpsolve/" version | |
3552 | "/lp_solve_" version "_source.tar.gz")) | |
3553 | (sha256 | |
3554 | (base32 | |
a89e0cf5 | 3555 | "12pj1idjz31r7c2mb5w03vy1cmvycvbkx9z29s40qdmkp1i7q6i0")) |
7f18257b AE |
3556 | (modules '((guix build utils))) |
3557 | (snippet | |
6cbee49d MW |
3558 | '(begin |
3559 | (substitute* (list "lp_solve/ccc" "lpsolve55/ccc") | |
3560 | (("^c=cc") "c=gcc") | |
3561 | ;; Pretend to be on a 64 bit platform to obtain a common directory | |
3562 | ;; name for the build results on all architectures; nothing else | |
3563 | ;; seems to depend on it. | |
3564 | (("^PLATFORM=.*$") "PLATFORM=ux64\n") | |
3565 | ||
3566 | ;; The check for 'isnan' as it is written fails with | |
3567 | ;; "non-floating-point argument in call to function | |
3568 | ;; ‘__builtin_isnan’", which leads to the 'NOISNAN' cpp macro | |
3569 | ;; definition, which in turn leads to bad things. Fix the feature | |
3570 | ;; test. | |
3571 | (("isnan\\(0\\)") "isnan(0.)")) | |
3572 | #t)))) | |
7f18257b AE |
3573 | (build-system gnu-build-system) |
3574 | (arguments | |
6c96b545 | 3575 | `(#:tests? #f ; no check target |
7f18257b AE |
3576 | #:phases |
3577 | (modify-phases %standard-phases | |
6c96b545 | 3578 | (delete 'configure) ; no configure script |
7f18257b AE |
3579 | (replace 'build |
3580 | (lambda _ | |
6c96b545 TGR |
3581 | (with-directory-excursion "lpsolve55" |
3582 | (invoke "bash" "ccc")) | |
3583 | (with-directory-excursion "lp_solve" | |
3584 | (invoke "bash" "ccc")) | |
3585 | #t)) | |
7f18257b AE |
3586 | (replace 'install |
3587 | (lambda* (#:key outputs #:allow-other-keys) | |
3588 | (let* ((out (assoc-ref outputs "out")) | |
3589 | (bin (string-append out "/bin")) | |
3590 | (lib (string-append out "/lib")) | |
3591 | ;; This is where LibreOffice expects to find the header | |
3592 | ;; files, and where they are installed by Debian. | |
3593 | (include (string-append out "/include/lpsolve"))) | |
6c96b545 TGR |
3594 | (install-file "lpsolve55/bin/ux64/liblpsolve55.a" lib) |
3595 | (install-file "lpsolve55/bin/ux64/liblpsolve55.so" lib) | |
96c46210 LC |
3596 | (install-file "lp_solve/bin/ux64/lp_solve" bin) |
3597 | ||
7f18257b AE |
3598 | ;; Install a subset of the header files as on Debian |
3599 | ;; (plus lp_bit.h, which matches the regular expression). | |
96c46210 LC |
3600 | (for-each (lambda (name) |
3601 | (install-file name include)) | |
3602 | (find-files "." "lp_[HMSa-z].*\\.h$")) | |
7f18257b | 3603 | (with-directory-excursion "shared" |
96c46210 LC |
3604 | (for-each (lambda (name) |
3605 | (install-file name include)) | |
3606 | (find-files "." "\\.h$"))) | |
7f18257b AE |
3607 | #t)))))) |
3608 | (home-page "http://lpsolve.sourceforge.net/") | |
3609 | (synopsis "Mixed integer linear programming (MILP) solver") | |
3610 | (description | |
3611 | "lp_solve is a mixed integer linear programming solver based on the | |
3612 | revised simplex and the branch-and-bound methods.") | |
3613 | (license license:lgpl2.1+))) | |
a17d4564 EB |
3614 | |
3615 | (define-public dealii | |
3616 | (package | |
3617 | (name "dealii") | |
ba567cae | 3618 | (version "9.1.1") |
a17d4564 EB |
3619 | (source |
3620 | (origin | |
3621 | (method url-fetch) | |
3622 | (uri (string-append "https://github.com/dealii/dealii/releases/" | |
3623 | "download/v" version "/dealii-" version ".tar.gz")) | |
3624 | (sha256 | |
3625 | (base32 | |
ba567cae | 3626 | "0xhjv0gzswpjbc43xbrpwfc5848g508l01855nszx3g5gwzlhnzw")) |
a17d4564 EB |
3627 | (modules '((guix build utils))) |
3628 | (snippet | |
3629 | ;; Remove bundled sources: UMFPACK, TBB, muParser, and boost | |
6cbee49d MW |
3630 | '(begin |
3631 | (delete-file-recursively "bundled") | |
3632 | #t)))) | |
a17d4564 EB |
3633 | (build-system cmake-build-system) |
3634 | (inputs | |
3635 | `(("tbb" ,tbb) | |
3636 | ("zlib" ,zlib) | |
3637 | ("boost" ,boost) | |
3638 | ("p4est" ,p4est) | |
3639 | ("blas" ,openblas) | |
3640 | ("lapack" ,lapack) | |
3641 | ("arpack" ,arpack-ng) | |
3642 | ("muparser" ,muparser) | |
3643 | ("gfortran" ,gfortran) | |
3644 | ("suitesparse" ,suitesparse))) ;for UMFPACK | |
3645 | (arguments | |
3646 | `(#:build-type "DebugRelease" ;only supports Release, Debug, or DebugRelease | |
d84b09e9 EB |
3647 | #:configure-flags |
3648 | ;; Work around a bug in libsuitesparseconfig linking | |
3649 | ;; see https://github.com/dealii/dealii/issues/4745 | |
3650 | '("-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON"))) | |
a17d4564 EB |
3651 | (home-page "https://www.dealii.org") |
3652 | (synopsis "Finite element library") | |
3653 | (description | |
3654 | "Deal.II is a C++ program library targeted at the computational solution | |
3655 | of partial differential equations using adaptive finite elements. The main | |
3656 | aim of deal.II is to enable rapid development of modern finite element codes, | |
3657 | using among other aspects adaptive meshes and a wide array of tools often used | |
3658 | in finite element programs.") | |
3659 | (license license:lgpl2.1+))) | |
3660 | ||
3661 | (define-public dealii-openmpi | |
3662 | (package (inherit dealii) | |
3663 | (name "dealii-openmpi") | |
3664 | (inputs | |
3665 | `(("mpi" ,openmpi) | |
3666 | ;;Supported only with MPI: | |
4d44bcad | 3667 | ("hdf5" ,hdf5-parallel-openmpi) ;TODO: have petsc-openmpi propagate? |
a17d4564 EB |
3668 | ("p4est" ,p4est-openmpi) |
3669 | ("petsc" ,petsc-openmpi) | |
3670 | ("slepc" ,slepc-openmpi) | |
3671 | ("metis" ,metis) ;for MUMPS | |
3672 | ("scalapack" ,scalapack) ;for MUMPS | |
3673 | ("mumps" ,mumps-metis-openmpi) ;configure supports only metis orderings | |
3674 | ("arpack" ,arpack-ng-openmpi) | |
3675 | ,@(fold alist-delete (package-inputs dealii) | |
3676 | '("p4est" "arpack")))) | |
3677 | (arguments | |
3678 | (substitute-keyword-arguments (package-arguments dealii) | |
3679 | ((#:configure-flags cf) | |
40b114c0 EB |
3680 | `(cons "-DDEAL_II_WITH_MPI:BOOL=ON" |
3681 | ,cf)) | |
7e309e8a EB |
3682 | ((#:phases phases '%standard-phases) |
3683 | `(modify-phases ,phases | |
3684 | (add-before 'check 'mpi-setup | |
3685 | ,%openmpi-setup))))) | |
a17d4564 | 3686 | (synopsis "Finite element library (with MPI support)"))) |
194c7f95 AE |
3687 | |
3688 | (define-public flann | |
3689 | (package | |
3690 | (name "flann") | |
3691 | (version "1.8.4") | |
3692 | (source | |
3693 | (origin | |
3694 | (method url-fetch) | |
3695 | (uri | |
3696 | (string-append | |
3697 | "http://www.cs.ubc.ca/research/flann/uploads/FLANN/flann-" | |
3698 | version "-src.zip")) | |
3699 | (sha256 | |
3700 | (base32 | |
b5edc479 LC |
3701 | "022w8hph7bli5zbpnk3z1qh1c2sl5hm8fw2ccim651ynn0hr7fyz")) |
3702 | (patches (search-patches "flann-cmake-3.11.patch")))) | |
194c7f95 | 3703 | (build-system cmake-build-system) |
6b6aca9b LC |
3704 | (outputs '("out" |
3705 | "octave")) ;46 MiB .mex file that pulls Octave | |
194c7f95 AE |
3706 | (native-inputs |
3707 | `(("unzip" ,unzip))) | |
3708 | (inputs | |
3709 | `(("hdf5" ,hdf5) | |
5537603f | 3710 | ("octave" ,octave-cli) |
194c7f95 AE |
3711 | ("python" ,python-2) ; print syntax |
3712 | ;; ("python2-numpy" ,python2-numpy) ; only required for the tests | |
3713 | ("zlib" ,zlib))) | |
3714 | (arguments | |
39b30337 LC |
3715 | `(;; The 'share/flann/octave' contains a .mex file, which is an ELF file |
3716 | ;; taken 46 MiB unstripped, and 6 MiB stripped. | |
3717 | #:strip-directories '("lib" "lib64" "libexec" | |
3718 | "bin" "sbin" "share/flann/octave") | |
3719 | ||
9684e30b LC |
3720 | ;; Save 12 MiB by not installing .a files. Passing |
3721 | ;; '-DBUILD_STATIC_LIBS=OFF' has no effect. | |
3722 | #:phases (modify-phases %standard-phases | |
6b6aca9b LC |
3723 | (add-before 'configure 'set-octave-directory |
3724 | (lambda* (#:key outputs #:allow-other-keys) | |
3725 | ;; Install the .mex file in the "octave" output. | |
3726 | (let ((out (assoc-ref outputs "octave"))) | |
3727 | (substitute* "src/matlab/CMakeLists.txt" | |
3728 | (("share/flann/octave") | |
3729 | (string-append out "/share/flann/octave"))) | |
3730 | #t))) | |
9684e30b LC |
3731 | (add-after 'install 'remove-static-libraries |
3732 | (lambda* (#:key outputs #:allow-other-keys) | |
3733 | (let* ((out (assoc-ref outputs "out")) | |
3734 | (lib (string-append out "/lib"))) | |
3735 | (for-each delete-file | |
3736 | (find-files lib "\\.a$")) | |
3737 | #t)))) | |
3738 | ||
39b30337 | 3739 | #:tests? #f)) ; The test data are downloaded from the Internet. |
194c7f95 AE |
3740 | (home-page "http://www.cs.ubc.ca/research/flann/") |
3741 | (synopsis "Library for approximate nearest neighbors computation") | |
3742 | (description "FLANN is a library for performing fast approximate | |
3743 | nearest neighbor searches in high dimensional spaces. It implements a | |
3744 | collection of algorithms and a system for automatically choosing the best | |
3745 | algorithm and optimum parameters depending on the dataset. | |
3746 | ||
3747 | FLANN is written in C++ and contains bindings for C, Octave and Python.") | |
3748 | (license (license:non-copyleft "file://COPYING" | |
3749 | "See COPYING in the distribution.")))) | |
d8c97beb EF |
3750 | |
3751 | (define-public wcalc | |
3752 | (package | |
3753 | (name "wcalc") | |
3754 | (version "2.5") | |
3755 | (source | |
3756 | (origin | |
3757 | (method url-fetch) | |
de67e922 LF |
3758 | (uri (string-append "mirror://sourceforge/w-calc/Wcalc/" version "/" |
3759 | "wcalc-" version ".tar.bz2")) | |
d8c97beb EF |
3760 | (sha256 |
3761 | (base32 | |
3762 | "1vi8dl6rccqiq1apmpwawyg2ywx6a1ic1d3cvkf2hlwk1z11fb0f")))) | |
3763 | (build-system gnu-build-system) | |
3764 | (inputs | |
3765 | `(("mpfr" ,mpfr) | |
3766 | ("readline" ,readline))) | |
3767 | (home-page "http://w-calc.sourceforge.net/index.php") | |
3768 | (synopsis "Flexible command-line scientific calculator") | |
3769 | (description "Wcalc is a very capable calculator. It has standard functions | |
3770 | (sin, asin, and sinh for example, in either radians or degrees), many | |
3771 | pre-defined constants (pi, e, c, etc.), support for using variables, \"active\" | |
3772 | variables, a command history, hex/octal/binary input and output, unit | |
3773 | conversions, embedded comments, and an expandable expression entry field. It | |
3774 | evaluates expressions using the standard order of operations.") | |
3775 | (license license:gpl2+))) | |
45147b0c FH |
3776 | |
3777 | (define-public xaos | |
3778 | (package | |
3779 | (name "xaos") | |
3780 | (version "3.6") | |
3781 | (source (origin | |
3782 | (method url-fetch) | |
de67e922 LF |
3783 | (uri (string-append "mirror://sourceforge/xaos/XaoS/" version |
3784 | "/xaos-" version ".tar.gz")) | |
45147b0c FH |
3785 | (sha256 |
3786 | (base32 | |
3787 | "15cd1cx1dyygw6g2nhjqq3bsfdj8sj8m4va9n75i0f3ryww3x7wq")))) | |
3788 | (build-system gnu-build-system) | |
b94a6ca0 | 3789 | (native-inputs `(("gettext" ,gettext-minimal))) |
45147b0c FH |
3790 | (inputs `(("libx11" ,libx11) |
3791 | ("zlib" ,zlib) | |
3792 | ("libpng" ,libpng) | |
3793 | ("gsl" ,gsl))) | |
3794 | (arguments | |
3795 | `(#:tests? #f ;no "check" target | |
3796 | #:make-flags '("LOCALEDIR=$DATAROOTDIR/locale"))) | |
3797 | (synopsis "Real-time fractal zoomer") | |
3798 | (description "GNU XaoS is a graphical program that generates fractal | |
3799 | patterns and allows you to zoom in and out of them infinitely in a fluid, | |
3800 | continuous manner. It also includes tutorials that help to explain how fractals | |
3801 | are built. It can generate many different fractal types such as the Mandelbrot | |
3802 | set.") | |
6fd52309 | 3803 | (home-page "https://www.gnu.org/software/xaos/") |
45147b0c | 3804 | (license license:gpl2+))) |
528bb464 EB |
3805 | |
3806 | (define-public hypre | |
3807 | (package | |
3808 | (name "hypre") | |
be099727 | 3809 | (version "2.15.1") |
fabcbf32 TGR |
3810 | (source |
3811 | (origin | |
3812 | (method git-fetch) | |
3813 | (uri (git-reference | |
3814 | (url "https://github.com/LLNL/hypre.git") | |
3815 | (commit (string-append "v" version)))) | |
3816 | (file-name (git-file-name name version)) | |
3817 | (sha256 | |
be099727 | 3818 | (base32 "1lvh4ybqkriyqfg2zmic6mrg1981qv1i9vry1fdgsabn81hb71g4")) |
fabcbf32 TGR |
3819 | (modules '((guix build utils))) |
3820 | (snippet | |
3821 | '(begin | |
3822 | ;; Remove use of __DATE__ and __TIME__ for reproducibility; | |
be099727 | 3823 | ;; substitute the release date. |
fabcbf32 TGR |
3824 | (substitute* "src/utilities/HYPRE_utilities.h" |
3825 | (("Date Compiled: .*$") | |
be099727 | 3826 | "Date Compiled: Oct 19 2018 15:23:00 +0000\"\n")) |
fabcbf32 | 3827 | #t)))) |
528bb464 | 3828 | (build-system gnu-build-system) |
be099727 TGR |
3829 | (outputs '("out" ; 6.1 MiB of headers and libraries |
3830 | "doc")) ; 4.8 MiB of documentation | |
528bb464 EB |
3831 | (native-inputs |
3832 | `(("doc++" ,doc++) | |
3833 | ("netpbm" ,netpbm) | |
be099727 | 3834 | ("perl" ,perl) ; needed to run 'ppmquant' during tests |
8b35c8cd RW |
3835 | ("texlive" ,(texlive-union (list texlive-xypic |
3836 | texlive-cm | |
9b405aea | 3837 | texlive-latex-hyperref |
9b405aea | 3838 | texlive-bibtex))) |
528bb464 EB |
3839 | ("ghostscript" ,ghostscript))) |
3840 | (inputs | |
3841 | `(("blas" ,openblas) | |
3842 | ("lapack" ,lapack))) | |
3843 | (arguments | |
3844 | `(#:modules ((srfi srfi-1) | |
3845 | ,@%gnu-build-system-modules) | |
3846 | #:configure-flags '("--enable-shared" | |
3847 | "--disable-fortran" | |
3848 | "--without-MPI" | |
3849 | "--with-openmp" | |
3850 | "--with-fei" | |
3851 | "--with-lapack" | |
3852 | "--with-blas") | |
3853 | #:phases | |
3854 | (modify-phases %standard-phases | |
9b405aea PN |
3855 | (add-before 'build 'set-HOME |
3856 | (lambda _ | |
3857 | ;; FIXME: texlive-union does not find the built | |
3858 | ;; metafonts, so it tries to generate them in HOME. | |
3859 | (setenv "HOME" "/tmp") | |
3860 | #t)) | |
528bb464 EB |
3861 | (add-before 'configure 'chdir-src |
3862 | (lambda _ (chdir "src"))) | |
3863 | (replace 'configure | |
3864 | (lambda* (#:key build target configure-flags | |
3865 | #:allow-other-keys #:rest args) | |
3866 | (let* ((configure (assoc-ref %standard-phases 'configure))) | |
3867 | (apply configure | |
3868 | (append args | |
3869 | (list #:configure-flags | |
3870 | (cons (string-append | |
3871 | "--host=" (or target build)) | |
3872 | configure-flags))))))) | |
3873 | (add-after 'build 'build-docs | |
3874 | (lambda _ | |
9b405aea | 3875 | (invoke "make" "-Cdocs" "pdf" "html"))) |
528bb464 EB |
3876 | (replace 'check |
3877 | (lambda _ | |
3878 | (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/hypre/lib")) | |
3879 | (setenv "PATH" (string-append "." ":" (getenv "PATH"))) | |
6b1c7ac8 RW |
3880 | (invoke "make" "check" "CHECKRUN=") |
3881 | (for-each (lambda (filename) | |
3882 | (let ((size (stat:size (stat filename)))) | |
3883 | (when (positive? size) | |
3884 | (error (format #f "~a size ~d; error indication~%" | |
3885 | filename size))))) | |
3886 | (find-files "test" ".*\\.err$")) | |
3887 | #t)) | |
528bb464 EB |
3888 | (add-after 'install 'install-docs |
3889 | (lambda* (#:key outputs #:allow-other-keys) | |
3890 | ;; Custom install because docs/Makefile doesn't honor ${docdir}. | |
3891 | (let* ((doc (assoc-ref outputs "doc")) | |
3892 | (docdir (string-append doc "/share/doc/hypre-" ,version))) | |
528bb464 EB |
3893 | (with-directory-excursion "docs" |
3894 | (for-each (lambda (base) | |
3895 | (install-file (string-append base ".pdf") docdir) | |
be099727 | 3896 | (copy-recursively base docdir)) ; html docs |
528bb464 EB |
3897 | '("HYPRE_usr_manual" |
3898 | "HYPRE_ref_manual"))) | |
3899 | #t)))))) | |
3900 | (home-page "http://www.llnl.gov/casc/hypre/") | |
3901 | (synopsis "Library of solvers and preconditioners for linear equations") | |
3902 | (description | |
3903 | "HYPRE is a software library of high performance preconditioners and | |
3904 | solvers for the solution of large, sparse linear systems of equations. It | |
3905 | features multigrid solvers for both structured and unstructured grid | |
3906 | problems.") | |
3907 | (license license:lgpl2.1))) | |
3908 | ||
3909 | (define-public hypre-openmpi | |
3910 | (package (inherit hypre) | |
3911 | (name "hypre-openmpi") | |
3912 | (inputs | |
3913 | `(("mpi" ,openmpi) | |
3914 | ,@(package-inputs hypre))) | |
3915 | (arguments | |
3916 | (substitute-keyword-arguments (package-arguments hypre) | |
3917 | ((#:configure-flags flags) | |
3918 | ``("--with-MPI" | |
6df2a50a LC |
3919 | ,@(delete "--without-MPI" ,flags))) |
3920 | ((#:phases phases) | |
3921 | `(modify-phases ,phases | |
bbe46a4a EB |
3922 | (add-before 'check 'mpi-setup |
3923 | ,%openmpi-setup))))) | |
528bb464 EB |
3924 | (synopsis "Parallel solvers and preconditioners for linear equations") |
3925 | (description | |
3926 | "HYPRE is a software library of high performance preconditioners and | |
3927 | solvers for the solution of large, sparse linear systems of equations on | |
3928 | parallel computers. It features parallel multigrid solvers for both | |
3929 | structured and unstructured grid problems."))) | |
6c90e183 EB |
3930 | |
3931 | (define-public matio | |
3932 | (package | |
3933 | (name "matio") | |
3934 | (version "1.5.6") | |
3935 | (source | |
3936 | (origin | |
3937 | (method url-fetch) | |
de67e922 | 3938 | (uri (string-append "mirror://sourceforge/matio/matio/" version "/" |
6c90e183 EB |
3939 | "matio-" version ".tar.gz")) |
3940 | (sha256 | |
3941 | (base32 | |
3942 | "0y2qymgxank8wdiwc68ap8bxdzrhvyw86i29yh3xgn4z1njfd9ir")))) | |
3943 | (build-system gnu-build-system) | |
3944 | (inputs | |
3945 | `(("zlib" ,zlib) | |
3946 | ("hdf5" ,hdf5))) | |
3947 | (home-page "http://matio.sourceforge.net/") | |
3948 | (synopsis "Library for reading and writing MAT files") | |
3949 | (description "Matio is a library for reading and writing MAT files. It | |
3950 | supports compressed MAT files, as well as newer (version 7.3) MAT files.") | |
3951 | (license license:bsd-2))) | |
d721c83a | 3952 | |
517318ad LF |
3953 | (define-public vc |
3954 | (package | |
3955 | (name "vc") | |
9d731fb6 | 3956 | (version "1.4.1") |
517318ad LF |
3957 | (source |
3958 | (origin (method url-fetch) | |
3959 | (uri (string-append "https://github.com/VcDevel/Vc/releases/" | |
3960 | "download/" version "/Vc-" version ".tar.gz")) | |
3961 | (sha256 | |
3962 | (base32 | |
9d731fb6 | 3963 | "17qili8bf8r78cng65yf4qmgna8kiqjqbgcqbric6v9j6nkhkrk8")))) |
517318ad LF |
3964 | (build-system cmake-build-system) |
3965 | (arguments | |
3966 | '(#:configure-flags | |
33d82486 MB |
3967 | '("-DBUILD_TESTING=ON" |
3968 | ;; By default, Vc will optimize for the CPU of the build machine. | |
3969 | ;; Setting this to "none" makes it create portable binaries. See | |
3970 | ;; "cmake/OptimizeForArchitecture.cmake". | |
9d731fb6 MB |
3971 | "-DTARGET_ARCHITECTURE=none") |
3972 | #:phases (modify-phases %standard-phases | |
3973 | (add-after 'unpack 'copy-testdata | |
3974 | (lambda* (#:key inputs native-inputs #:allow-other-keys) | |
3975 | (let ((testdata (assoc-ref (or native-inputs inputs) | |
3976 | "testdata"))) | |
3977 | (copy-recursively testdata "tests/testdata") | |
3978 | #t)))))) | |
3979 | (native-inputs | |
3980 | `(("virtest" ,virtest) | |
3981 | ||
3982 | ;; This is a submodule in the git project, but not part of the | |
3983 | ;; released sources. See the git branch for the commit to take. | |
3984 | ("testdata" ,(let ((commit "9ada1f34d6a41f1b5553d6223f277eae72c039d3")) | |
3985 | (origin | |
3986 | (method git-fetch) | |
3987 | (uri (git-reference | |
3988 | (url "https://github.com/VcDevel/vc-testdata") | |
3989 | (commit "9ada1f34d6a41f1b5553d6223f277eae72c039d3"))) | |
3990 | (file-name (git-file-name "vc-testdata" | |
3991 | (string-take commit 7))) | |
3992 | (sha256 | |
3993 | (base32 | |
3994 | "1hkhqib03qlcq412ym2dciynfxcdr2ygqhnplz4l1vissr1wnqn2"))))))) | |
517318ad LF |
3995 | (synopsis "SIMD vector classes for C++") |
3996 | (description "Vc provides portable, zero-overhead C++ types for explicitly | |
3997 | data-parallel programming. It is a library designed to ease explicit | |
3998 | vectorization of C++ code. Its types enable explicitly stating data-parallel | |
3999 | operations on multiple values. The parallelism is therefore added via the type | |
4000 | system. Vc has an intuitive API and provides portability between different | |
4001 | compilers and compiler versions as well as portability between different vector | |
4002 | instruction sets. Thus, an application written with Vc can be compiled for: | |
4003 | @enumerate | |
4004 | @item AVX and AVX2 | |
d1e4ad1b | 4005 | @item SSE2 up to SSE4.2 or SSE4a |
517318ad LF |
4006 | @item Scalar |
4007 | @item MIC | |
4008 | @item NEON (in development) | |
4009 | @item NVIDIA GPUs / CUDA (in development) | |
4010 | @end enumerate\n") | |
4011 | (home-page "https://github.com/VcDevel/Vc") | |
a8ead6f9 EF |
4012 | ;; "No support_???.cpp file exists for this architecture." |
4013 | (supported-systems '("x86_64-linux" "i686-linux")) | |
517318ad | 4014 | (license license:bsd-3))) |
54052a54 | 4015 | |
4016 | (define-public reducelcs | |
4017 | ;; This is the last commit which is available upstream, no | |
4018 | ;; release happened since 2010. | |
4019 | (let ((commit "474f88deb968061abe8cf11c959e02319b8ae5c0") | |
4020 | (revision "1")) | |
4021 | (package | |
4022 | (name "reducelcs") | |
4023 | (version (string-append "1.0-" revision "." (string-take commit 7))) | |
4024 | (source | |
4025 | (origin | |
4026 | (method git-fetch) | |
4027 | (uri (git-reference | |
4028 | (url "https://github.com/gdv/Reduce-Expand-for-LCS") | |
4029 | (commit commit))) | |
4030 | (file-name (string-append name "-" version "-checkout")) | |
4031 | (sha256 | |
4032 | (base32 | |
4033 | "1rllzcfwc042c336mhq262a8ha90x6afq30kvk60r7i4761j4yjm")))) | |
4034 | (build-system gnu-build-system) | |
4035 | (inputs | |
4036 | `(("openlibm" ,openlibm))) | |
4037 | (arguments | |
4038 | `(#:tests? #f ; no tests | |
4039 | #:phases | |
4040 | (modify-phases %standard-phases | |
4041 | (delete 'configure) ; No configure script exists. | |
4042 | (replace 'install ; No install phase exists. | |
4043 | (lambda* (#:key outputs #:allow-other-keys) | |
4044 | (let* ((out (assoc-ref outputs "out")) | |
4045 | (bin (string-append out "/bin"))) | |
4046 | (install-file "Approximation" bin) | |
4047 | (install-file "CollectResults" bin) | |
4048 | (install-file "GenerateInstances" bin) | |
4049 | #t)))))) | |
4050 | (synopsis "Approximate Longest Commons Subsequence computation tool") | |
4051 | (description | |
4052 | "@code{reduceLCS} is an implementation of the Reduce-Expand | |
4053 | algorithm for LCS. It is a fast program to compute the approximate | |
4054 | Longest Commons Subsequence of a set of strings.") | |
4055 | (home-page "https://github.com/gdv/Reduce-Expand-for-LCS") | |
c000b6b1 | 4056 | (license license:gpl3+)))) |
479c4273 JD |
4057 | |
4058 | (define-public jacal | |
4059 | (package | |
4060 | (name "jacal") | |
4061 | (version "1c4") | |
4062 | (source (origin | |
4063 | (method url-fetch) | |
4064 | (uri (string-append | |
4065 | "http://groups.csail.mit.edu/mac/ftpdir/scm/jacal-" | |
4066 | version ".zip")) | |
4067 | (sha256 (base32 | |
4068 | "055zrn12a1dmy0dqkwrkq3fklbhg3yir6vn0lacp4mvbg8573a3q")) | |
4069 | (patches (search-patches "jacal-fix-texinfo.patch")))) | |
4070 | (build-system gnu-build-system) | |
4071 | (arguments | |
4072 | `(#:phases | |
4073 | (modify-phases %standard-phases | |
4074 | (add-before 'build 'pre-build | |
4075 | ;; Don't use upstream's script - it really doesn't fit into | |
4076 | ;; Guix's functional paradigm. | |
4077 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
4078 | (substitute* "Makefile" | |
4079 | (("^install: install-script") "install: ")))) | |
4080 | (add-after 'install 'post-install | |
4081 | ;; Instead, we provide our own simplified script. | |
4082 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
4083 | (let ((wrapper (string-append (assoc-ref outputs "out") | |
4084 | "/bin/jacal"))) | |
4085 | (format (open wrapper (logior O_WRONLY O_CREAT)) | |
4086 | (string-append "#!~a\nexec ~a/bin/scm -ip1 " | |
4087 | "-e '(slib:load \"~a/lib/jacal/math\") " | |
4088 | "(math)' \"$@\"\n") | |
4089 | (which "bash") | |
4090 | (assoc-ref inputs "scm") | |
4091 | (assoc-ref outputs "out")) | |
4092 | (chmod wrapper #o555)))) | |
4093 | (replace 'configure | |
9cd82b1c RW |
4094 | (lambda* (#:key outputs #:allow-other-keys) |
4095 | (invoke "./configure" | |
4096 | (string-append "--prefix=" | |
4097 | (assoc-ref outputs "out")))))))) | |
479c4273 JD |
4098 | (inputs `(("scm" ,scm))) |
4099 | (native-inputs `(("unzip" ,unzip) | |
4100 | ("texinfo" ,texinfo))) | |
4101 | (synopsis "Symbolic mathematics system") | |
4102 | (description "GNU JACAL is an interactive symbolic mathematics program based on | |
4103 | Scheme. It manipulate and simplify a range of mathematical expressions such | |
4104 | as equations, scalars, vectors, and matrices.") | |
6fd52309 | 4105 | (home-page "https://www.gnu.org/software/jacal/") |
479c4273 JD |
4106 | (license license:gpl3+))) |
4107 | ||
313844d9 TF |
4108 | (define-public z3 |
4109 | (package | |
4110 | (name "z3") | |
d49375c7 | 4111 | (version "4.8.6") |
fb525bfd | 4112 | (home-page "https://github.com/Z3Prover/z3") |
313844d9 | 4113 | (source (origin |
fb525bfd MB |
4114 | (method git-fetch) |
4115 | (uri (git-reference (url home-page) | |
4116 | (commit (string-append "z3-" version)))) | |
2d7b99b3 | 4117 | (file-name (git-file-name name version)) |
313844d9 TF |
4118 | (sha256 |
4119 | (base32 | |
d49375c7 | 4120 | "1sywcqj5y8yp28m4cdvzsgw74kd6zr1s3y1x17ky8pr9prvpvl6x")))) |
fa574a6d | 4121 | (build-system gnu-build-system) |
313844d9 | 4122 | (arguments |
fa574a6d | 4123 | `(#:phases |
313844d9 | 4124 | (modify-phases %standard-phases |
ad6c6a5b EF |
4125 | (add-after 'unpack 'fix-compatability |
4126 | ;; Versions after 4.8.3 have immintrin.h IFDEFed for Windows only. | |
4127 | (lambda _ | |
4128 | (substitute* "src/util/mpz.cpp" | |
4129 | (("#include <immintrin.h>") "")) | |
4130 | #t)) | |
cf684d87 TF |
4131 | (add-before 'configure 'bootstrap |
4132 | (lambda _ | |
32d5360f | 4133 | (invoke "python" "scripts/mk_make.py"))) |
fa574a6d AB |
4134 | ;; work around gnu-build-system's setting --enable-fast-install |
4135 | ;; (z3's `configure' is a wrapper around the above python file, | |
4136 | ;; which fails when passed --enable-fast-install) | |
4137 | (replace 'configure | |
4138 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
4139 | (invoke "./configure" | |
4140 | (string-append "--prefix=" (assoc-ref outputs "out"))))) | |
4141 | (add-after 'configure 'change-directory | |
4142 | (lambda _ | |
4143 | (chdir "build") | |
4144 | #t)) | |
cf684d87 | 4145 | (add-before 'check 'make-test-z3 |
313844d9 | 4146 | (lambda _ |
cf684d87 | 4147 | ;; Build the test suite executable. |
32d5360f RW |
4148 | (invoke "make" "test-z3" "-j" |
4149 | (number->string (parallel-job-count))))) | |
cf684d87 TF |
4150 | (replace 'check |
4151 | (lambda _ | |
4152 | ;; Run all the tests that don't require arguments. | |
32d5360f | 4153 | (invoke "./test-z3" "/a")))))) |
313844d9 | 4154 | (native-inputs |
fa574a6d AB |
4155 | `(("which" ,which) |
4156 | ("python" ,python-wrapper))) | |
313844d9 TF |
4157 | (synopsis "Theorem prover") |
4158 | (description "Z3 is a theorem prover and @dfn{satisfiability modulo | |
cf684d87 | 4159 | theories} (SMT) solver. It provides a C/C++ API, as well as Python bindings.") |
313844d9 | 4160 | (license license:expat))) |
3d5d87a3 | 4161 | |
6d433d6e EB |
4162 | (define-public elpa |
4163 | (package | |
4164 | (name "elpa") | |
4165 | (version "2018.11.001") | |
4166 | (source (origin | |
4167 | (method url-fetch) | |
4168 | (uri (string-append "http://elpa.mpcdf.mpg.de/html/Releases/" | |
4169 | version "/elpa-" version ".tar.gz")) | |
4170 | (sha256 | |
4171 | (base32 | |
4172 | "05hv3v5i6xmziaizw350ff72y1c3k662r85fm3xfdrkclj5zw9yc")))) | |
4173 | (build-system gnu-build-system) | |
4174 | (native-inputs | |
4175 | `(("fortran" ,gfortran) | |
4176 | ("perl" ,perl))) ;for configure and deps | |
4177 | (inputs | |
4178 | `(("blas" ,openblas))) | |
4179 | (arguments | |
4180 | `(#:configure-flags | |
4181 | `("--enable-openmp" | |
4182 | "--with-mpi=no" | |
4183 | ;; ELPA unfortunately does not support runtime dispatch, so we can | |
4184 | ;; only enable the "generic" kernels. See the "Cross compilation" | |
4185 | ;; section of INSTALL.md. | |
4186 | "--enable-generic" | |
4187 | "--disable-sse" "--disable-sse-assembly" ;Require SSE3 | |
4188 | "--disable-avx" "--disable-avx2" "--disable-avx512" | |
4189 | ,(string-append "CFLAGS=-O3 " | |
4190 | "-funsafe-loop-optimizations -funsafe-math-optimizations " | |
4191 | "-ftree-vect-loop-version -ftree-vectorize " | |
4192 | ,(let ((system (or (%current-target-system) | |
4193 | (%current-system)))) | |
4194 | (cond | |
4195 | ((or (string-prefix? "x86_64" system) | |
4196 | (string-prefix? "i686" system)) | |
4197 | "-msse2") | |
4198 | (else ""))))) | |
4199 | #:parallel-tests? #f ;tests are multi-threaded, via BLAS | |
4200 | #:phases | |
4201 | (modify-phases %standard-phases | |
4202 | (add-before 'configure 'patch-header-generation | |
4203 | (lambda _ | |
4204 | (substitute* "configure" | |
4205 | (("^ *make.*top_srcdir=\"\\$srcdir\"" &) | |
4206 | (string-append & " CPP=\"$CPP\""))) | |
4207 | #t)) | |
4208 | (add-before 'check 'setup-tests | |
4209 | (lambda _ | |
4210 | ;; Decrease test time and RAM use by computing fewer eigenvalues. | |
4211 | ;; The flags are (MATRIX-SIZE, EIGENVALUES, BLOCK-SIZE), where | |
4212 | ;; the default is (500, 250, 16) for C tests and (5000, 150, 16) | |
4213 | ;; for Fortran. This also causes several tests to pass that | |
4214 | ;; otherwise would otherwise fail with matrix size 5000; possibly | |
4215 | ;; due to floating point tolerances that are too tight. | |
4216 | (setenv "TEST_FLAGS" "1500 50 16") ;from elpa.spec | |
4217 | (setenv "OMP_NUM_THREADS" (number->string (parallel-job-count))) | |
4218 | (substitute* "Makefile" | |
4219 | ;; Test scripts are generated, patch the shebang | |
4220 | (("#!/bin/bash") (string-append "#!" (which "sh")))) | |
4221 | #t))))) | |
4222 | (home-page "http://elpa.mpcdf.mpg.de") | |
4223 | (synopsis "Eigenvalue solvers for symmetric matrices") | |
4224 | (description | |
4225 | "The ELPA library provides efficient and scalable direct eigensolvers for | |
4226 | symmetric matrices.") | |
4227 | (license license:lgpl3))) | |
4228 | ||
4229 | (define-public elpa-openmpi | |
4230 | (package (inherit elpa) | |
4231 | (name "elpa-openmpi") | |
4232 | (inputs | |
4233 | `(("mpi" ,openmpi) | |
4234 | ("scalapack" ,scalapack) | |
4235 | ,@(package-inputs elpa))) | |
4236 | (arguments | |
4237 | (substitute-keyword-arguments (package-arguments elpa) | |
4238 | ((#:configure-flags cf '()) | |
4239 | `(cons "--with-mpi=yes" (delete "--with-mpi=no" ,cf))) | |
4240 | ((#:phases phases '%standard-phases) | |
4241 | `(modify-phases ,phases | |
4242 | (add-before 'check 'mpi-setup | |
4243 | (lambda _ | |
4244 | ;; Tests use 2 mpi tasks by default, use our remaining build | |
4245 | ;; cores as OpenMP threads. | |
4246 | (setenv "OMP_NUM_THREADS" (number->string | |
4247 | (max (quotient (parallel-job-count) 2) | |
4248 | 1))) | |
4249 | (,%openmpi-setup))))))) | |
4250 | (synopsis "Eigenvalue solvers for symmetric matrices (with MPI support)"))) | |
4251 | ||
e01397b4 EB |
4252 | (define-public elemental |
4253 | (package | |
4254 | (name "elemental") | |
4255 | (version "0.87.7") | |
4256 | (source (origin | |
5c0b6d1b EF |
4257 | (method git-fetch) |
4258 | (uri (git-reference | |
4259 | (url "https://github.com/elemental/Elemental.git") | |
4260 | (commit (string-append "v" version)))) | |
4261 | (file-name (git-file-name name version)) | |
e01397b4 EB |
4262 | (sha256 |
4263 | (base32 | |
5c0b6d1b | 4264 | "1687xpjjzig27y2pnqv7hv09smpijyfdpz7qjgmcxf4shfajlfkc")))) |
e01397b4 EB |
4265 | (build-system cmake-build-system) |
4266 | (home-page "http://libelemental.org") | |
4267 | (native-inputs | |
4268 | `(("gfortran" ,gfortran))) | |
4269 | (inputs | |
4270 | `(("blas" ,openblas) | |
4271 | ("gfortran:lib" ,gfortran "lib") | |
4272 | ("gmp" ,gmp) | |
4273 | ("lapack" ,lapack) | |
4274 | ("metis" ,metis) | |
4275 | ("mpc" ,mpc) | |
4276 | ("mpfr" ,mpfr) | |
4277 | ("mpi" ,openmpi) | |
4278 | ("qd" ,qd))) | |
4279 | (arguments | |
4280 | `(#:build-type "Release" ;default RelWithDebInfo not supported | |
4281 | #:configure-flags `("-DEL_DISABLE_PARMETIS:BOOL=YES" | |
4282 | "-DEL_AVOID_COMPLEX_MPI:BOOL=NO" | |
4283 | "-DEL_CACHE_WARNINGS:BOOL=YES" | |
4284 | "-DEL_TESTS:BOOL=YES" | |
4285 | "-DCMAKE_INSTALL_LIBDIR=lib" | |
4286 | "-DGFORTRAN_LIB=gfortran") | |
4287 | #:phases (modify-phases %standard-phases | |
3b42e2be EF |
4288 | (add-before 'check 'mpi-setup |
4289 | ,%openmpi-setup) | |
e01397b4 EB |
4290 | (add-before 'check 'setup-tests |
4291 | (lambda _ | |
4292 | ;; Parallelism is done at the MPI layer. | |
4293 | (setenv "OMP_NUM_THREADS" "1") | |
4294 | #t)) | |
4295 | (add-after 'install 'remove-tests | |
4296 | (lambda* (#:key outputs #:allow-other-keys) | |
4297 | ;; Tests are installed, with no easy configuration | |
4298 | ;; switch to prevent this, so delete them. | |
4299 | (delete-file-recursively | |
3b42e2be | 4300 | (string-append (assoc-ref outputs "out") "/bin")) |
e01397b4 EB |
4301 | #t))))) |
4302 | (synopsis "Dense and sparse-direct linear algebra and optimization") | |
4303 | (description "Elemental is a modern C++ library for distributed-memory | |
4304 | dense and sparse-direct linear algebra, conic optimization, and lattice | |
4305 | reduction.") | |
4306 | (license license:bsd-2))) | |
5b05dce7 JN |
4307 | |
4308 | (define-public mcrl2 | |
4309 | (package | |
4310 | (name "mcrl2") | |
3bc74090 | 4311 | (version "201908.0") |
5b05dce7 JN |
4312 | (source (origin |
4313 | (method url-fetch) | |
185152e3 JN |
4314 | (uri (string-append |
4315 | "https://www.mcrl2.org/download/release/mcrl2-" | |
4316 | version ".tar.gz")) | |
5b05dce7 JN |
4317 | (sha256 |
4318 | (base32 | |
3bc74090 | 4319 | "1i4xgl2d5fgiz1mwi50cyfkrrcpm8nxfayfjgmhq7chs58wlhfsz")))) |
5b05dce7 JN |
4320 | (inputs |
4321 | `(("boost" ,boost) | |
4322 | ("glu" ,glu) | |
4323 | ("mesa" ,mesa) | |
077d66ed | 4324 | ("qtbase" ,qtbase))) |
5b05dce7 | 4325 | (build-system cmake-build-system) |
ed0c5d3c | 4326 | (synopsis "Toolset for the mCRL2 formal specification language") |
5b05dce7 | 4327 | (description |
ed0c5d3c TGR |
4328 | "@dfn{mCRL2} (micro Common Representation Language 2) is a formal |
4329 | specification language for describing concurrent discrete event systems. Its | |
4330 | toolset supports analysis and automatic verification, linearisation, simulation, | |
4331 | state-space exploration and generation, and tools to optimise and analyse | |
5b05dce7 JN |
4332 | specifications. Also, state spaces can be manipulated, visualised and |
4333 | analysed.") | |
b3882709 | 4334 | (home-page "https://mcrl2.org") |
5b05dce7 | 4335 | (license license:boost1.0))) |
41835f94 | 4336 | |
e03b9126 JN |
4337 | (define-public mcrl2-minimal |
4338 | (package | |
4339 | (inherit mcrl2) | |
4340 | (name "mcrl2-minimal") | |
4341 | (inputs | |
4342 | `(("boost" ,boost))) | |
4343 | (arguments | |
4344 | '(#:configure-flags '("-DMCRL2_ENABLE_GUI_TOOLS=OFF"))))) | |
4345 | ||
910deec6 NV |
4346 | (define-public tcalc |
4347 | (package | |
4348 | (name "tcalc") | |
4349 | (version "2.0") | |
4350 | (source | |
4351 | (origin | |
4352 | (method url-fetch) | |
4353 | (uri (string-append "https://sites.google.com/site/mohammedisam2000/tcalc/tcalc-" | |
4354 | version ".tar.gz")) | |
4355 | (sha256 | |
4356 | (base32 | |
4357 | "0jq806m4dqfia85nppfm75mml9w57g0cgv4cdw9bp3zymda83s0m")))) | |
4358 | (build-system gnu-build-system) | |
4359 | (synopsis "The terminal calculator") | |
4360 | (description | |
4361 | "The terminal calculator is a small program to help users of the GNU/Linux | |
4362 | terminal do calculations simply and quickly. The formula to be calculated can | |
4363 | be fed to @command{tcalc} through the command line.") | |
4364 | (home-page "https://sites.google.com/site/mohammedisam2000/tcalc") | |
4365 | (license license:gpl3+))) | |
b26e4f26 EB |
4366 | |
4367 | (define-public sundials | |
4368 | (package | |
4369 | (name "sundials") | |
4370 | (version "3.1.1") | |
4371 | (source | |
4372 | (origin | |
4373 | (method url-fetch) | |
4374 | (uri (string-append "https://computation.llnl.gov/projects/sundials/download/" | |
4375 | "sundials-" version ".tar.gz")) | |
4376 | (sha256 | |
4377 | (base32 | |
4378 | "090s8ymhd0g1s1d44fa73r5yi32hb4biwahhbfi327zd64yn8kd2")))) | |
4379 | (build-system cmake-build-system) | |
4380 | (native-inputs | |
4381 | `(("python" ,python-2))) ;for tests; syntax incompatible with python 3 | |
4382 | (inputs | |
4383 | `(("fortran" ,gfortran) ;for fcmix | |
4384 | ("blas" ,openblas) | |
4385 | ("suitesparse" ,suitesparse))) ;TODO: Add hypre | |
4386 | (arguments | |
4387 | `(#:configure-flags `("-DEXAMPLES_ENABLE_C:BOOL=ON" | |
4388 | "-DEXAMPLES_ENABLE_CXX:BOOL=ON" | |
4389 | "-DEXAMPLES_ENABLE_F77:BOOL=ON" | |
4390 | "-DEXAMPLES_ENABLE_F90:BOOL=ON" | |
4391 | "-DEXAMPLES_INSTALL:BOOL=OFF" | |
4392 | ||
4393 | "-DFCMIX_ENABLE:BOOL=ON" | |
4394 | ||
4395 | "-DKLU_ENABLE:BOOL=ON" | |
4396 | ,(string-append "-DKLU_INCLUDE_DIR=" | |
4397 | (assoc-ref %build-inputs "suitesparse") | |
4398 | "/include") | |
4399 | ,(string-append "-DKLU_LIBRARY_DIR=" | |
4400 | (assoc-ref %build-inputs "suitesparse") | |
4401 | "/lib")))) | |
4402 | (home-page "https://computation.llnl.gov/projects/sundials") | |
4403 | (synopsis "Suite of nonlinear and differential/algebraic equation solvers") | |
4404 | (description "SUNDIALS is a family of software packages implemented with | |
4405 | the goal of providing robust time integrators and nonlinear solvers that can | |
4406 | easily be incorporated into existing simulation codes.") | |
4407 | (license license:bsd-3))) | |
4408 | ||
4409 | (define-public sundials-openmpi | |
4410 | (package (inherit sundials) | |
4411 | (name "sundials-openmpi") | |
4412 | (inputs | |
4413 | `(("mpi" ,openmpi) | |
4414 | ("petsc" ,petsc-openmpi) ;support in SUNDIALS requires MPI | |
4415 | ,@(package-inputs sundials))) | |
4416 | (arguments | |
4417 | (substitute-keyword-arguments (package-arguments sundials) | |
4418 | ((#:configure-flags flags '()) | |
4419 | `(cons* "-DMPI_ENABLE:BOOL=ON" | |
4420 | "-DPETSC_ENABLE:BOOL=ON" | |
4421 | (string-append "-DPETSC_INCLUDE_DIR=" | |
4422 | (assoc-ref %build-inputs "petsc") | |
4423 | "/include") | |
4424 | (string-append "-DPETSC_LIBRARY_DIR=" | |
4425 | (assoc-ref %build-inputs "petsc") | |
4426 | "/lib") | |
4427 | ,flags)) | |
4428 | ((#:phases phases '%standard-phases) | |
4429 | `(modify-phases ,phases | |
bbe46a4a EB |
4430 | (add-before 'check 'mpi-setup |
4431 | ,%openmpi-setup))))) | |
b26e4f26 | 4432 | (synopsis "SUNDIALS with OpenMPI support"))) |
a6b9ebc2 EB |
4433 | |
4434 | (define-public combinatorial-blas | |
4435 | (package | |
4436 | (name "combinatorial-blas") | |
4437 | (version "1.6.2") | |
4438 | (source | |
4439 | (origin | |
4440 | (method url-fetch) | |
4441 | (uri (string-append "http://eecs.berkeley.edu/~aydin/CombBLAS_FILES/" | |
4442 | "CombBLAS_beta_" | |
4443 | (match (string-split version #\.) | |
4444 | ((major minor patch) | |
4445 | (string-append major minor "_" patch))) ;e.g. "16_2" | |
4446 | ".tgz")) | |
4447 | (sha256 | |
4448 | (base32 | |
4449 | "1a9wbgdqyy1whhfc0yl0yqkax3amnqa6iihhq48d063gc0jwfd9a")) | |
4450 | (patches (search-patches "combinatorial-blas-awpm.patch" | |
4451 | "combinatorial-blas-io-fix.patch")))) | |
4452 | (build-system cmake-build-system) | |
4453 | (inputs | |
4454 | `(("mpi" ,openmpi) | |
4455 | ("test-data" ,(origin | |
4456 | (method url-fetch) | |
4457 | (uri (string-append "https://people.eecs.berkeley.edu/~aydin/" | |
4458 | "CombBLAS_FILES/testdata_combblas1.6.1.tgz")) | |
4459 | (sha256 | |
4460 | (base32 | |
4461 | "01y2781cy3fww7znmidrp85mf8zx0c905w5vzvk1mgrmhhynim87")))))) | |
4462 | (arguments | |
4463 | `(#:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES" | |
4464 | "-DCMAKE_CXX_FLAGS=-DUSE_FUNNEL") | |
4465 | #:parallel-tests? #f ;tests use 'mpiexec -n4' | |
4466 | #:phases | |
4467 | (modify-phases %standard-phases | |
4468 | (add-before 'check 'mpi-setup | |
4469 | ,%openmpi-setup) | |
4470 | (add-before 'check 'test-setup | |
4471 | (lambda* (#:key inputs #:allow-other-keys) | |
4472 | (setenv "OMP_NUM_THREADS" "2") | |
4473 | (invoke "tar" "xf" (assoc-ref inputs "test-data"))))))) | |
4474 | (home-page "https://people.eecs.berkeley.edu/~aydin/CombBLAS/html/") | |
4475 | (synopsis "Linear algebra primitives for graph analytics") | |
4476 | (description "The Combinatorial BLAS (CombBLAS) is an extensible | |
4477 | distributed-memory parallel graph library offering a small but powerful set of | |
4478 | linear algebra primitives specifically targeting graph analytics.") | |
4479 | (license (list | |
4480 | license:gpl2+ ;include/psort/(funnel|sort)*.h | |
4481 | license:x11 ;usort and psort | |
4482 | license:bsd-3)))) ;CombBLAS and MersenneTwister.h | |
3847d1f2 RW |
4483 | |
4484 | (define-public dune-common | |
4485 | (package | |
4486 | (name "dune-common") | |
4487 | (version "2.6.0") | |
4488 | (source | |
4489 | (origin | |
4490 | (method url-fetch) | |
4491 | (uri (string-append "https://dune-project.org/download/" | |
4492 | version "/dune-common-" version ".tar.gz")) | |
4493 | (sha256 | |
4494 | (base32 | |
4495 | "019wcr1qf7jwyxx1y5y290wdlglylskvbb2m01ljkzcza2xnlmhw")))) | |
4496 | (build-system cmake-build-system) | |
4497 | (arguments | |
4498 | `(#:phases | |
4499 | (modify-phases %standard-phases | |
4500 | (add-after 'build 'build-tests | |
4501 | (lambda* (#:key make-flags #:allow-other-keys) | |
4502 | (apply invoke "make" "build_tests" make-flags))) | |
4503 | ;; These tests fail because they require a fully functional MPI | |
4504 | ;; environment. | |
4505 | (add-after 'unpack 'disable-failing-tests | |
4506 | (lambda _ | |
4507 | (setenv "ARGS" | |
4508 | (string-append "--exclude-regex '(" | |
4509 | (string-join | |
4510 | (list | |
4511 | "remoteindicestest" | |
4512 | "remoteindicestest-mpi-2" | |
4513 | "syncertest" | |
4514 | "syncertest-mpi-2" | |
4515 | "variablesizecommunicatortest" | |
4516 | "variablesizecommunicatortest-mpi-2" | |
4517 | "arithmetictestsuitetest" | |
4518 | "assertandreturntest" | |
4519 | "assertandreturntest_ndebug" | |
4520 | "concept" | |
4521 | "debugaligntest" | |
4522 | "mpicollectivecommunication" | |
4523 | "mpicollectivecommunication-mpi-2" | |
4524 | "mpiguardtest" | |
4525 | "mpiguardtest-mpi-2" | |
4526 | "mpihelpertest" | |
4527 | "mpihelpertest-mpi-2" | |
4528 | "mpihelpertest2" | |
4529 | "mpihelpertest2-mpi-2") | |
4530 | "|") | |
4531 | ")'")) | |
4532 | #t))))) | |
4533 | (inputs | |
4534 | `(("gmp" ,gmp) | |
4535 | ("metis" ,metis) | |
4536 | ("openmpi" ,openmpi) | |
4537 | ("openblas" ,openblas) | |
4538 | ("python" ,python) | |
4539 | ("superlu" ,superlu))) | |
4540 | (native-inputs | |
4541 | `(("gfortran" ,gfortran) | |
4542 | ("pkg-config" ,pkg-config))) | |
4543 | (home-page "https://dune-project.org/") | |
4544 | (synopsis "Distributed and Unified Numerics Environment") | |
4545 | (description "DUNE, the Distributed and Unified Numerics Environment is a | |
4546 | modular toolbox for solving @dfn{partial differential equations} (PDEs) with | |
4547 | grid-based methods. It supports the easy implementation of methods like | |
4548 | @dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite | |
4549 | Differences} (FD).") | |
4550 | ;; GPL version 2 with "runtime exception" to make it behave like LGPLv2. | |
4551 | (license license:gpl2))) | |
242dbd8e RW |
4552 | |
4553 | (define-public dune-geometry | |
4554 | (package | |
4555 | (name "dune-geometry") | |
4556 | (version "2.6.0") | |
4557 | (source | |
4558 | (origin | |
4559 | (method url-fetch) | |
4560 | (uri (string-append "https://dune-project.org/download/" | |
4561 | version "/dune-geometry-" version ".tar.gz")) | |
4562 | (sha256 | |
4563 | (base32 | |
4564 | "0hlaaxjyv9j05blasvb67sy02hd0w4g9znf68gdh3l731dd1aqbn")))) | |
4565 | (build-system cmake-build-system) | |
4566 | (arguments | |
4567 | `(#:phases | |
4568 | (modify-phases %standard-phases | |
4569 | (add-after 'build 'build-tests | |
4570 | (lambda* (#:key make-flags #:allow-other-keys) | |
4571 | (apply invoke "make" "build_tests" make-flags)))))) | |
4572 | (inputs | |
4573 | `(("dune-common" ,dune-common) | |
4574 | ("openmpi" ,openmpi) | |
4575 | ;; Optional | |
4576 | ("openblas" ,openblas) | |
4577 | ("gmp" ,gmp) | |
4578 | ("python" ,python))) | |
4579 | (native-inputs | |
4580 | `(("gfortran" ,gfortran) | |
4581 | ("pkg-config" ,pkg-config))) | |
4582 | (home-page "https://dune-project.org/") | |
4583 | (synopsis "Distributed and Unified Numerics Environment") | |
4584 | (description "DUNE, the Distributed and Unified Numerics Environment is a | |
4585 | modular toolbox for solving @dfn{partial differential equations} (PDEs) with | |
4586 | grid-based methods. It supports the easy implementation of methods like | |
4587 | @dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite | |
4588 | Differences} (FD). | |
4589 | ||
4590 | This package contains the basic DUNE geometry classes.") | |
4591 | ;; GPL version 2 with "runtime exception" | |
4592 | (license license:gpl2))) | |
ef6e69fd RW |
4593 | |
4594 | (define-public dune-grid | |
4595 | (package | |
4596 | (name "dune-grid") | |
4597 | (version "2.6.0") | |
4598 | (source | |
4599 | (origin | |
4600 | (method url-fetch) | |
4601 | (uri (string-append "https://dune-project.org/download/" | |
4602 | version "/dune-grid-" version ".tar.gz")) | |
4603 | (sha256 | |
4604 | (base32 | |
4605 | "1jp4vscm9yb9xg0lh7apzccfkhvgbnk652yahigmh3cvzpl4acd0")))) | |
4606 | (build-system cmake-build-system) | |
4607 | (arguments | |
4608 | `(#:phases | |
4609 | (modify-phases %standard-phases | |
4610 | (add-after 'build 'build-tests | |
4611 | (lambda* (#:key make-flags #:allow-other-keys) | |
4612 | (apply invoke "make" "build_tests" make-flags))) | |
4613 | ;; These tests fail because they require a fully functional MPI | |
4614 | ;; environment. | |
4615 | (add-after 'unpack 'disable-failing-tests | |
4616 | (lambda _ | |
4617 | (setenv "ARGS" | |
4618 | (string-append "--exclude-regex '(" | |
4619 | (string-join | |
4620 | (list | |
4621 | "scsgmappertest" | |
4622 | "conformvolumevtktest" | |
4623 | "gnuplottest" | |
4624 | "nonconformboundaryvtktest" | |
4625 | "subsamplingvtktest" | |
4626 | "vtktest" | |
4627 | "vtktest-mpi-2" | |
4628 | "vtksequencetest" | |
4629 | "gmshtest-onedgrid" | |
4630 | "test-dgf-yasp" | |
4631 | "test-dgf-yasp-offset" | |
4632 | "test-dgf-oned" | |
4633 | "test-geogrid-yaspgrid" | |
4634 | "test-gridinfo" | |
4635 | "test-identitygrid" | |
4636 | "testiteratorranges" | |
4637 | "test-hierarchicsearch" | |
4638 | "test-parallel-ug-mpi-2" | |
4639 | "test-yaspgrid-backuprestore-equidistant" | |
4640 | "test-yaspgrid-backuprestore-equidistant-mpi-2" | |
4641 | "test-yaspgrid-backuprestore-equidistantoffset" | |
4642 | "test-yaspgrid-backuprestore-equidistantoffset-mpi-2" | |
4643 | "test-yaspgrid-backuprestore-tensor" | |
4644 | "test-yaspgrid-backuprestore-tensor-mpi-2" | |
4645 | "test-yaspgrid-tensorgridfactory" | |
4646 | "test-yaspgrid-tensorgridfactory-mpi-2" | |
4647 | "test-yaspgrid-yaspfactory-1d" | |
4648 | "test-yaspgrid-yaspfactory-1d-mpi-2" | |
4649 | "test-yaspgrid-yaspfactory-2d" | |
4650 | "test-yaspgrid-yaspfactory-2d-mpi-2" | |
4651 | "test-yaspgrid-yaspfactory-3d" | |
4652 | "test-yaspgrid-yaspfactory-3d-mpi-2" | |
4653 | "globalindexsettest" | |
4654 | "persistentcontainertest" | |
4655 | "structuredgridfactorytest" | |
4656 | "tensorgridfactorytest" | |
4657 | "vertexordertest") | |
4658 | "|") | |
4659 | ")'")) | |
4660 | #t))))) | |
4661 | (inputs | |
4662 | `(("dune-common" ,dune-common) | |
4663 | ("dune-geometry" ,dune-geometry) | |
4664 | ("gmp" ,gmp) | |
4665 | ("metis" ,metis) | |
4666 | ("openblas" ,openblas) | |
4667 | ("openmpi" ,openmpi) | |
4668 | ("python" ,python))) | |
4669 | (native-inputs | |
4670 | `(("gfortran" ,gfortran) | |
4671 | ("pkg-config" ,pkg-config))) | |
4672 | (home-page "https://dune-project.org/") | |
4673 | (synopsis "Distributed and Unified Numerics Environment") | |
4674 | (description "DUNE, the Distributed and Unified Numerics Environment is a | |
4675 | modular toolbox for solving @dfn{partial differential equations} (PDEs) with | |
4676 | grid-based methods. It supports the easy implementation of methods like | |
4677 | @dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite | |
4678 | Differences} (FD). | |
4679 | ||
4680 | This package contains the basic DUNE grid classes.") | |
4681 | ;; GPL version 2 with "runtime exception" | |
4682 | (license license:gpl2))) | |
ea51d357 RW |
4683 | |
4684 | (define-public dune-istl | |
4685 | (package | |
4686 | (name "dune-istl") | |
4687 | (version "2.6.0") | |
4688 | (source | |
4689 | (origin | |
4690 | (method url-fetch) | |
4691 | (uri (string-append "https://dune-project.org/download/" | |
4692 | version "/dune-istl-" version ".tar.gz")) | |
4693 | (sha256 | |
4694 | (base32 | |
4695 | "0l2gyrvys5w6wsmk0ckbb7295s80b7yk7qrl7x66akv2jv1nzq2w")))) | |
4696 | (build-system cmake-build-system) | |
4697 | (arguments | |
4698 | `(#:phases | |
4699 | (modify-phases %standard-phases | |
4700 | (add-after 'build 'build-tests | |
4701 | (lambda* (#:key make-flags #:allow-other-keys) | |
4702 | (apply invoke "make" "build_tests" make-flags))) | |
4703 | ;; These tests fail because they require a fully functional MPI | |
4704 | ;; environment. | |
4705 | (add-after 'unpack 'disable-failing-tests | |
4706 | (lambda _ | |
4707 | (setenv "ARGS" | |
4708 | (string-append "--exclude-regex '(" | |
4709 | (string-join | |
4710 | (list | |
4711 | "galerkintest" | |
4712 | "hierarchytest" | |
4713 | "pamgtest" | |
4714 | "pamg_comm_repart_test" | |
4715 | "matrixredisttest" | |
4716 | "vectorcommtest" | |
4717 | "matrixmarkettest") | |
4718 | "|") | |
4719 | ")'")) | |
4720 | #t))))) | |
4721 | (inputs | |
4722 | `(("dune-common" ,dune-common) | |
4723 | ("openmpi" ,openmpi) | |
4724 | ;; Optional | |
4725 | ("metis" ,metis) | |
4726 | ("superlu" ,superlu) | |
4727 | ("openblas" ,openblas) | |
4728 | ("gmp" ,gmp) | |
4729 | ("python" ,python))) | |
4730 | (native-inputs | |
4731 | `(("gfortran" ,gfortran) | |
4732 | ("pkg-config" ,pkg-config))) | |
4733 | (home-page "https://dune-project.org/") | |
4734 | (synopsis "Distributed and Unified Numerics Environment") | |
4735 | (description "DUNE, the Distributed and Unified Numerics Environment is a | |
4736 | modular toolbox for solving @dfn{partial differential equations} (PDEs) with | |
4737 | grid-based methods. | |
4738 | ||
4739 | This is the iterative solver template library which provides generic sparse | |
4740 | matrix/vector classes and a variety of solvers based on these classes. A | |
4741 | special feature is the use of templates to exploit the recursive block | |
4742 | structure of finite element matrices at compile time. Available solvers | |
4743 | include Krylov methods, (block-) incomplete decompositions and | |
4744 | aggregation-based algebraic multigrid.") | |
4745 | ;; GPL version 2 with "runtime exception" | |
4746 | (license license:gpl2))) | |
5a70aa7d RW |
4747 | |
4748 | (define-public dune-localfunctions | |
4749 | (package | |
4750 | (name "dune-localfunctions") | |
4751 | (version "2.6.0") | |
4752 | (source | |
4753 | (origin | |
4754 | (method url-fetch) | |
4755 | (uri (string-append "https://dune-project.org/download/" | |
4756 | version "/dune-localfunctions-" version ".tar.gz")) | |
4757 | (sha256 | |
4758 | (base32 | |
4759 | "19c6zjinwwpy8jh4v4prhphyd438rapd4x80fj93apmwgw04nrhl")))) | |
4760 | (build-system cmake-build-system) | |
4761 | (arguments | |
4762 | `(#:phases | |
4763 | (modify-phases %standard-phases | |
4764 | (add-after 'build 'build-tests | |
4765 | (lambda* (#:key make-flags #:allow-other-keys) | |
4766 | (apply invoke "make" "build_tests" make-flags)))))) | |
4767 | (inputs | |
4768 | `(("dune-common" ,dune-common) | |
4769 | ("dune-geometry" ,dune-geometry) | |
4770 | ("openmpi" ,openmpi) | |
4771 | ;; Optional | |
4772 | ("metis" ,metis) | |
4773 | ("superlu" ,superlu) | |
4774 | ("gmp" ,gmp))) | |
4775 | (native-inputs | |
4776 | `(("gfortran" ,gfortran) | |
4777 | ("pkg-config" ,pkg-config))) | |
4778 | (home-page "https://dune-project.org/") | |
4779 | (synopsis "Distributed and Unified Numerics Environment") ; TODO | |
4780 | (description "This DUNE module provides interface and implementation for | |
4781 | shape functions defined on the DUNE reference elements. In addition to the | |
4782 | shape function, interpolation operators and special keys are provided which | |
4783 | can be used to assemble global function spaces on finite-element grids. | |
4784 | ||
4785 | This package provides an interface and implementation for shape functions | |
4786 | defined on the DUNE reference elements. In addition to the shape function, | |
4787 | interpolation operators and special keys are provided which can be used to | |
4788 | assemble global function spaces on finite-element grids.") | |
4789 | ;; GPL version 2 with "runtime exception" | |
4790 | (license license:gpl2))) | |
ab03d899 RW |
4791 | |
4792 | (define-public dune-alugrid | |
4793 | (package | |
4794 | (name "dune-alugrid") | |
4795 | (version "2.6.0") | |
4796 | (source | |
4797 | (origin | |
4798 | (method url-fetch) | |
4799 | (uri (string-append "https://dune-project.org/download/" | |
4800 | version "/dune-alugrid-" version ".tar.gz")) | |
4801 | (sha256 | |
4802 | (base32 | |
4803 | "1l9adgyjpra8mvwm445s0lpjshnb63jag85fb2hisbjn6bm320yj")))) | |
4804 | (build-system cmake-build-system) | |
4805 | (arguments | |
4806 | `(#:tests? #f ; 7 of 8 tests fail because they need a full MPI | |
4807 | ; environment | |
4808 | #:phases | |
4809 | (modify-phases %standard-phases | |
4810 | (add-after 'unpack 'patch-include | |
4811 | (lambda _ | |
4812 | (substitute* "dune/alugrid/test/test-alugrid.cc" | |
4813 | (("doc/grids/gridfactory/testgrids") | |
4814 | "doc/dune-grid/grids/gridfactory/testgrids")) | |
4815 | #t)) | |
4816 | (add-after 'build 'build-tests | |
4817 | (lambda* (#:key inputs make-flags #:allow-other-keys) | |
4818 | (setenv "CPLUS_INCLUDE_PATH" | |
97149c57 | 4819 | (string-append (assoc-ref inputs "dune-grid") "/share")) |
ab03d899 RW |
4820 | (apply invoke "make" "build_tests" make-flags)))))) |
4821 | (inputs | |
4822 | `(("dune-common" ,dune-common) | |
4823 | ("dune-geometry" ,dune-geometry) | |
4824 | ("dune-grid" ,dune-grid) | |
4825 | ("openmpi" ,openmpi) | |
4826 | ;; Optional | |
4827 | ("metis" ,metis) | |
4828 | ("openblas" ,openblas) | |
4829 | ("python" ,python) | |
4830 | ("superlu" ,superlu) | |
4831 | ("gmp" ,gmp) | |
4832 | ("zlib" ,zlib))) | |
4833 | (native-inputs | |
4834 | `(("gfortran" ,gfortran) | |
4835 | ("pkg-config" ,pkg-config))) | |
4836 | (home-page "https://dune-project.org/") | |
4837 | (synopsis "Distributed and Unified Numerics Environment") | |
4838 | (description "ALUGrid is an adaptive, loadbalancing, unstructured | |
4839 | implementation of the DUNE grid interface supporting either simplices or | |
4840 | cubes.") | |
4841 | (license license:gpl2+))) | |
0e50630f RW |
4842 | |
4843 | (define-public dune-typetree | |
4844 | (package | |
4845 | (name "dune-typetree") | |
4846 | (version "2.6.0") | |
4847 | (source | |
4848 | (origin | |
4849 | (method git-fetch) | |
4850 | (uri (git-reference | |
4851 | (url "https://gitlab.dune-project.org/staging/dune-typetree.git") | |
4852 | (commit (string-append "v" version)))) | |
4853 | (file-name (git-file-name name version)) | |
4854 | (sha256 | |
4855 | (base32 | |
4856 | "0mnv6w2f22lz3j4bdpdjq55vjm8xxfx9v4vvhg9bd36xpsbjpjp9")))) | |
4857 | (build-system cmake-build-system) | |
4858 | (arguments | |
4859 | `(#:phases | |
4860 | (modify-phases %standard-phases | |
4861 | (add-after 'build 'build-tests | |
4862 | (lambda* (#:key make-flags #:allow-other-keys) | |
4863 | (apply invoke "make" "build_tests" make-flags)))))) | |
4864 | (inputs | |
4865 | `(("dune-common" ,dune-common) | |
4866 | ("openmpi" ,openmpi) | |
4867 | ;; Optional | |
4868 | ("openblas" ,openblas) | |
4869 | ("python" ,python) | |
4870 | ("metis" ,metis) | |
4871 | ("superlu" ,superlu) | |
4872 | ("gmp" ,gmp))) | |
4873 | (native-inputs | |
4874 | `(("gfortran" ,gfortran) | |
4875 | ("pkg-config" ,pkg-config))) | |
4876 | (home-page "https://dune-project.org/") | |
4877 | (synopsis "Distributed and Unified Numerics Environment") | |
4878 | (description "TypeTree is a template library for constructing and | |
4879 | operating on statically typed trees of objects.") | |
4880 | ;; Either GPL version 2 with "runtime exception" or LGPLv3+. | |
4881 | (license (list license:lgpl3+ license:gpl2)))) | |
85b9371c RW |
4882 | |
4883 | (define-public dune-functions | |
4884 | (package | |
4885 | (name "dune-functions") | |
4886 | (version "2.6.0") | |
4887 | (source | |
4888 | (origin | |
4889 | (method git-fetch) | |
4890 | (uri (git-reference | |
4891 | (url "https://gitlab.dune-project.org/staging/dune-functions.git") | |
4892 | (commit (string-append "v" version)))) | |
4893 | (file-name (git-file-name name version)) | |
4894 | (sha256 | |
4895 | (base32 | |
4896 | "1an8gb477n8j0kzpbrv7nr1snh8pxip0gsxq6w63jc83gg3dj200")))) | |
4897 | (build-system cmake-build-system) | |
4898 | (arguments `(#:tests? #f)) ; FIXME: tests require dune-uugrid | |
4899 | (inputs | |
4900 | `(("dune-common" ,dune-common) | |
4901 | ("dune-istl" ,dune-istl) | |
4902 | ("dune-localfunctions" ,dune-localfunctions) | |
4903 | ("dune-grid" ,dune-grid) | |
4904 | ("dune-geometry" ,dune-geometry) | |
4905 | ("dune-typetree" ,dune-typetree) | |
4906 | ("openmpi" ,openmpi) | |
4907 | ("openblas" ,openblas) | |
4908 | ("metis" ,metis) | |
4909 | ("python" ,python) | |
4910 | ("superlu" ,superlu) | |
4911 | ("gmp" ,gmp))) | |
4912 | (native-inputs | |
4913 | `(("gfortran" ,gfortran) | |
4914 | ("pkg-config" ,pkg-config))) | |
4915 | (home-page "https://dune-project.org/") | |
4916 | (synopsis "Distributed and Unified Numerics Environment") | |
4917 | (description "The dune-functions module provides an abstraction layer for | |
4918 | global finite element functions. Its two main concepts are functions | |
4919 | implemented as callable objects, and bases of finite element spaces.") | |
4920 | ;; Either GPL version 2 with "runtime exception" or LGPLv3+. | |
4921 | (license (list license:lgpl3+ license:gpl2)))) | |
4714b00e RW |
4922 | |
4923 | (define-public dune-pdelab | |
4924 | (package | |
4925 | (name "dune-pdelab") | |
4926 | (version "2.6.0-rc1") | |
4927 | (source | |
4928 | (origin | |
4929 | (method git-fetch) | |
4930 | (uri (git-reference | |
4931 | (url "https://gitlab.dune-project.org/pdelab/dune-pdelab") | |
4932 | (commit (string-append "v" version)))) | |
4933 | (file-name (git-file-name name version)) | |
4934 | (sha256 | |
4935 | (base32 | |
4936 | "07g0s9448z65vjrq88g5rv3340iifil85k170n8kbqchsvi4ny5v")))) | |
4937 | (build-system cmake-build-system) | |
4938 | (arguments '(#:tests? #f)) ; XXX: the tests cannot be compiled | |
4939 | (inputs | |
4940 | `(("dune-common" ,dune-common) | |
4941 | ("dune-istl" ,dune-istl) | |
4942 | ("dune-localfunctions" ,dune-localfunctions) | |
4943 | ("dune-geometry" ,dune-geometry) | |
4944 | ("dune-grid" ,dune-grid) | |
4945 | ("dune-typetree" ,dune-typetree) | |
4946 | ("dune-functions" ,dune-functions) | |
4947 | ("openmpi" ,openmpi) | |
4948 | ;; Optional | |
4949 | ("openblas" ,openblas) | |
4950 | ("eigen" ,eigen) | |
4951 | ("metis" ,metis) | |
4952 | ("python" ,python) | |
4953 | ("superlu" ,superlu) | |
4954 | ("gmp" ,gmp))) | |
4955 | (native-inputs | |
4956 | `(("gfortran" ,gfortran) | |
4957 | ("pkg-config" ,pkg-config))) | |
4958 | (home-page "https://dune-project.org/") | |
4959 | (synopsis "Differential equations solver toolbox") | |
4960 | (description "PDELab is a partial differential equations solver toolbox | |
4961 | built on top of DUNE, the Distributed and Unified Numerics Environment.") | |
4962 | ;; Either GPL version 2 with "runtime exception" or LGPLv3+. | |
4963 | (license (list license:lgpl3+ license:gpl2)))) | |
413f6126 AI |
4964 | |
4965 | (define-public mlucas | |
4966 | (package | |
4967 | (name "mlucas") | |
4968 | (version "18") | |
4969 | (source | |
4970 | (origin | |
4971 | (method url-fetch) | |
4972 | (uri (string-append | |
4973 | "https://mersenneforum.org/mayer/src/C/mlucas_v" version ".txz")) | |
4974 | (sha256 | |
a36efdbc | 4975 | (base32 "0h4xj6pyyac79ka5ibqjilfa3s9j3yxnzgpwc57b54kfh2bj3447")))) |
413f6126 AI |
4976 | (build-system gnu-build-system) |
4977 | (inputs | |
4978 | `(("python2" ,python-2))) | |
4979 | (arguments | |
a36efdbc | 4980 | `(#:tests? #f ; no tests |
413f6126 AI |
4981 | #:phases |
4982 | (modify-phases %standard-phases | |
4983 | (replace 'configure | |
4984 | (lambda _ | |
4985 | (chdir "src") | |
4986 | (call-with-output-file "Makefile" | |
4987 | (lambda (port) | |
4988 | (format port "CC = gcc | |
4989 | CFLAGS = -O3 ~a -DUSE_THREADS | |
4990 | LDLIBS = -lm -lpthread -lrt | |
4991 | Mlucas: $(addsuffix .o,$(basename $(wildcard *.c))) | |
4992 | " | |
4993 | ,(let ((system (or (%current-target-system) | |
4994 | (%current-system)))) | |
4995 | (cond | |
4996 | ((string-prefix? "x86_64" system) "-DUSE_SSE2") | |
4997 | (else "")))))) | |
4998 | #t)) | |
4999 | (replace 'install | |
5000 | (lambda* (#:key outputs #:allow-other-keys) | |
5001 | (let ((bin (string-append (assoc-ref outputs "out") "/bin"))) | |
5002 | (install-file "Mlucas" bin) | |
5003 | (install-file "primenet.py" bin)) | |
5004 | #t))))) | |
5005 | (home-page "https://www.mersenne.org") | |
5006 | (synopsis "Great Internet Mersenne Prime Search (GIMPS) distributed computing client") | |
5007 | (description "Mlucas performs Lucas-Lehmer primality testing of Mersenne | |
5008 | numbers in search of a world-record prime. You may use it to test any | |
5009 | suitable number as you wish, but it is preferable that you do so in a | |
5010 | coordinated fashion, as part of the Great Internet Mersenne Prime | |
5011 | Search (GIMPS). Mlucas also includes a simple Python script for assignment | |
5012 | management via the GIMPS project's Primenet server.") | |
5013 | (license license:gpl2+))) | |
6f8c4195 NG |
5014 | |
5015 | (define-public nauty | |
5016 | (package | |
5017 | (name "nauty") | |
1ff64c50 | 5018 | (version "2.6r12") |
6f8c4195 NG |
5019 | (source (origin |
5020 | (method url-fetch) | |
5021 | (uri (string-append | |
5022 | "https://pallini.di.uniroma1.it/" | |
5023 | "nauty" (string-join (string-split version #\.) "") | |
5024 | ".tar.gz")) | |
5025 | (sha256 | |
5026 | (base32 | |
1ff64c50 | 5027 | "1p4mxf8q5wm47nxyskxbqwa5p1vvkycv1zgswvnk9nsn6vff0al6")))) |
6f8c4195 NG |
5028 | (build-system gnu-build-system) |
5029 | (outputs '("out" "lib")) | |
5030 | (arguments | |
5031 | `(#:test-target "checks" | |
5032 | #:phases | |
5033 | (modify-phases %standard-phases | |
5034 | ;; Default make target does not build all available | |
5035 | ;; executables. Create them now. | |
5036 | (add-after 'build 'build-extra-programs | |
5037 | (lambda _ | |
5038 | (for-each (lambda (target) (invoke "make" target)) | |
5039 | '("blisstog" "bliss2dre" "checks6" "sumlines")) | |
5040 | #t)) | |
5041 | ;; Upstream does not provide any install target. | |
5042 | (replace 'install | |
5043 | (lambda* (#:key outputs #:allow-other-keys) | |
5044 | (let* ((out (assoc-ref outputs "out")) | |
5045 | (lib-output (assoc-ref outputs "lib")) | |
5046 | (bin (string-append out "/bin")) | |
5047 | (doc (string-append out "/share/doc/nauty/")) | |
5048 | (include (string-append lib-output "/include/nauty")) | |
5049 | (lib (string-append lib-output "/lib/nauty"))) | |
5050 | (for-each (lambda (f) (install-file f bin)) | |
5051 | '("dreadnaut" "NRswitchg" "addedgeg" "amtog" "biplabg" | |
5052 | "blisstog" "bliss2dre" "catg" "checks6" "complg" | |
5053 | "converseg" "copyg" "countg" "cubhamg" "deledgeg" | |
5054 | "delptg" "directg" "dretodot" "dretog" "genbg" | |
5055 | "genbgL" "geng" "genquarticg" "genrang" "genspecialg" | |
5056 | "gentourng" "gentreeg" "hamheuristic" "labelg" | |
5057 | "linegraphg" "listg" "multig" "newedgeg" "pickg" | |
5058 | "planarg" "ranlabg" "shortg" "showg" "subdivideg" | |
5059 | "sumlines" "twohamg" "vcolg" "watercluster2")) | |
5060 | (for-each (lambda (f) (install-file f include)) | |
5061 | (find-files "." "\\.h$")) | |
5062 | (for-each (lambda (f) (install-file f lib)) | |
5063 | (find-files "." "\\.a$")) | |
5064 | (for-each (lambda (f) (install-file f doc)) | |
5065 | (append '("formats.txt" "README" "schreier.txt") | |
5066 | (find-files "." "\\.pdf$"))))))))) | |
5067 | (inputs | |
5068 | `(("gmp" ,gmp))) ;for sumlines | |
5069 | (home-page "https://pallini.di.uniroma1.it/") | |
5070 | (synopsis "Library for graph automorphisms") | |
5071 | (description "@code{nauty} (No AUTomorphisms, Yes?) is a set of | |
5072 | procedures for computing automorphism groups of graphs and digraphs. | |
5073 | ||
5074 | @code{nauty} computes graph information in the form of a set of | |
5075 | generators, the size of the group, and the orbits of the group; it can | |
5076 | also produce a canonical label. The @code{nauty} suite is written in | |
5077 | C and comes with a command-line interface, a collection of | |
5078 | command-line tools, and an Application Programming Interface (API). | |
5079 | ||
5080 | This package provides the static libraries required to run programs | |
5081 | compiled against the nauty library.") | |
5082 | (license license:asl2.0))) | |
26433471 AE |
5083 | |
5084 | (define-public ppl | |
5085 | (package | |
5086 | (name "ppl") | |
5087 | (version "1.2") | |
5088 | (source | |
5089 | (origin | |
5090 | (method url-fetch) | |
5091 | (uri (string-append "https://www.bugseng.com/products/ppl/download/" | |
5092 | "ftp/releases/" version | |
5093 | "/ppl-" version ".tar.gz")) | |
5094 | (sha256 | |
5095 | (base32 | |
5096 | "1j5aji1g2vmdvc0gqz45n2ll2l2f6czca04wiyfl5g3sm3a6vhvb")))) | |
5097 | (build-system gnu-build-system) | |
5098 | (native-inputs | |
5099 | `(("m4", m4))) | |
5100 | (inputs | |
5101 | `(("glpk" ,glpk) | |
5102 | ("gmp", gmp))) | |
5103 | (home-page "https://www.bugseng.com/parma-polyhedra-library") | |
5104 | (synopsis | |
5105 | "Parma Polyhedra Library for computations with polyhedra") | |
5106 | (description | |
5107 | "The Parma Polyhedra Library (PPL) provides numerical abstractions | |
5108 | especially targeted at applications in the field of analysis and | |
5109 | verification of complex systems. These abstractions include convex | |
5110 | polyhedra, defined as the intersection of a finite number of (open or | |
5111 | closed) halfspaces, each described by a linear inequality (strict or | |
5112 | non-strict) with rational coefficients; some special classes of polyhedra | |
5113 | shapes that offer interesting complexity/precision tradeoffs; and grids | |
5114 | which represent regularly spaced points that satisfy a set of linear | |
5115 | congruence relations. The library also supports finite powersets and | |
5116 | products of (any kind of) polyhedra and grids, a mixed integer linear | |
5117 | programming problem solver using an exact-arithmetic version of the simplex | |
5118 | algorithm, a parametric integer programming solver, and primitives for | |
5119 | termination analysis via the automatic synthesis of linear ranking | |
5120 | functions.") | |
5121 | (license license:gpl3+))) | |
4cb5d251 SS |
5122 | |
5123 | (define-public speedcrunch | |
5124 | (package | |
5125 | (name "speedcrunch") | |
5126 | (version "0.12.0") | |
5127 | (source | |
5128 | (origin | |
5129 | (method git-fetch) | |
5130 | (uri (git-reference | |
5131 | (url "https://bitbucket.org/heldercorreia/speedcrunch.git") | |
5132 | (commit (string-append "release-" version)))) | |
5133 | (file-name (git-file-name name version)) | |
5134 | (sha256 | |
5135 | (base32 | |
5136 | "0vh7cd1915bjqzkdp3sk25ngy8cq624mkh8c53c5bnzk357kb0fk")))) | |
5137 | (build-system cmake-build-system) | |
5138 | (inputs `(("qtbase" ,qtbase))) | |
5139 | (native-inputs `(("qttools" ,qttools))) | |
5140 | (arguments | |
5141 | `(#:phases | |
5142 | (modify-phases %standard-phases | |
5143 | (add-after 'unpack 'chdir-to-src | |
5144 | (lambda _ (chdir "src") #t))))) | |
5145 | (synopsis "High-precision scientific calculator") | |
5146 | (description | |
5147 | "SpeedCrunch is a high-precision scientific calculator. It features a | |
5148 | syntax-highlighted scrollable display and is designed to be fully used via | |
5149 | keyboard. Some distinctive features are auto-completion of functions and | |
5150 | variables, a formula book, and quick insertion of constants from various | |
5151 | fields of knowledge.") | |
5152 | (home-page "http://speedcrunch.org/") | |
5153 | (license license:gpl2+))) | |
5154 | ||
3b7828cc RS |
5155 | (define-public minisat |
5156 | ;; This is the last commit which is available upstream, no | |
5157 | ;; release happened since 2010. | |
5158 | (let ((commit "37dc6c67e2af26379d88ce349eb9c4c6160e8543") | |
5159 | (revision "1")) | |
5160 | (package | |
5161 | (name "minisat") | |
5162 | (version (string-append "2.2.0-" revision "." (string-take commit 7))) | |
5163 | (source | |
5164 | (origin | |
5165 | (method git-fetch) | |
5166 | (uri (git-reference | |
5167 | (url "https://github.com/niklasso/minisat.git") | |
5168 | (commit commit))) | |
5169 | (file-name (string-append name "-" version "-checkout")) | |
5170 | (sha256 | |
5171 | (base32 | |
5172 | "091hf3qkm197s5r7xcr3m07xsdwyz2rqk1hc9kj0hn13imz09irq")) | |
5173 | (patches | |
5174 | (search-patches "minisat-friend-declaration.patch" | |
5175 | "minisat-install.patch")))) | |
5176 | (build-system gnu-build-system) | |
5177 | (arguments | |
5178 | '(#:make-flags (list (string-append "prefix=" %output)) | |
5179 | #:tests? #f ;no check target | |
5180 | #:phases | |
5181 | (modify-phases %standard-phases | |
5182 | (delete 'configure)))) | |
5183 | (inputs | |
5184 | `(("zlib:static" ,zlib "static") | |
5185 | ("zlib" ,zlib))) | |
5186 | (synopsis | |
5187 | "Small, yet efficient, SAT solver") | |
5188 | (description | |
5189 | "MiniSat is a minimalistic, open-source SAT solver, developed to help | |
5190 | researchers and developers alike to get started on SAT.") | |
5191 | (home-page | |
5192 | "http://minisat.se/MiniSat.html") | |
5193 | (license license:expat)))) |