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