1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2020 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
4 ;;; Copyright © 2014, 2016, 2017 John Darrington <jmd@gnu.org>
5 ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Eric Bavier <bavier@posteo.net>
6 ;;; Copyright © 2014 Federico Beffa <beffa@fbengineering.ch>
7 ;;; Copyright © 2014 Mathieu Lirzin <mathieu.lirzin@openmailbox.org>
8 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
10 ;;; Copyright © 2015, 2018 Mark H Weaver <mhw@netris.org>
11 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
12 ;;; Copyright © 2015 Fabian Harfert <fhmgufs@web.de>
13 ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
14 ;;; Copyright © 2016, 2018, 2020 Kei Kebreau <kkebreau@posteo.net>
15 ;;; Copyright © 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
16 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
17 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
18 ;;; Copyright © 2017, 2018, 2019, 2020 Paul Garlick <pgarlick@tourbillion-technology.com>
19 ;;; Copyright © 2017 ng0 <ng0@n0.is>
20 ;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
21 ;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
22 ;;; Copyright © 2017, 2019 Arun Isaac <arunisaac@systemreboot.net>
23 ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
24 ;;; Copyright © 2017 Dave Love <me@fx@gnu.org>
25 ;;; Copyright © 2018, 2019 Jan Nieuwenhuizen <janneke@gnu.org>
26 ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
27 ;;; Copyright © 2018 Nadya Voronova <voronovank@gmail.com>
28 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
29 ;;; Copyright © 2018, 2020 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2018 Eric Brown <brown@fastmail.com>
31 ;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
32 ;;; Copyright © 2018 Amin Bandali <bandali@gnu.org>
33 ;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
34 ;;; Copyright © 2019 Steve Sprang <scs@stevesprang.com>
35 ;;; Copyright © 2019 Robert Smith <robertsmith@posteo.net>
36 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
37 ;;; Copyright © 2020 Felix Gruber <felgru@posteo.net>
38 ;;; Copyright © 2020 R Veera Kumar <vkor@vkten.in>
39 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
40 ;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
42 ;;; This file is part of GNU Guix.
44 ;;; GNU Guix is free software; you can redistribute it and/or modify it
45 ;;; under the terms of the GNU General Public License as published by
46 ;;; the Free Software Foundation; either version 3 of the License, or (at
47 ;;; your option) any later version.
49 ;;; GNU Guix is distributed in the hope that it will be useful, but
50 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
51 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
52 ;;; GNU General Public License for more details.
54 ;;; You should have received a copy of the GNU General Public License
55 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
57 (define-module (gnu packages maths)
58 #:use-module (ice-9 regex)
59 #:use-module (ice-9 match)
60 #:use-module (gnu packages)
61 #:use-module ((guix licenses) #:prefix license:)
62 #:use-module (guix packages)
63 #:use-module (guix download)
64 #:use-module (guix git-download)
65 #:use-module (guix utils)
66 #:use-module ((guix build utils) #:select (alist-replace))
67 #:use-module (guix build-system cmake)
68 #:use-module (guix build-system glib-or-gtk)
69 #:use-module (guix build-system gnu)
70 #:use-module (guix build-system python)
71 #:use-module (guix build-system ruby)
72 #:use-module (gnu packages algebra)
73 #:use-module (gnu packages audio)
74 #:use-module (gnu packages autotools)
75 #:use-module (gnu packages base)
76 #:use-module (gnu packages bison)
77 #:use-module (gnu packages boost)
78 #:use-module (gnu packages check)
79 #:use-module (gnu packages cmake)
80 #:use-module (gnu packages compression)
81 #:use-module (gnu packages curl)
82 #:use-module (gnu packages cyrus-sasl)
83 #:use-module (gnu packages dbm)
84 #:use-module (gnu packages documentation)
85 #:use-module (gnu packages elf)
86 #:use-module (gnu packages file)
87 #:use-module (gnu packages flex)
88 #:use-module (gnu packages fltk)
89 #:use-module (gnu packages fontutils)
90 #:use-module (gnu packages gettext)
91 #:use-module (gnu packages gcc)
92 #:use-module (gnu packages gd)
93 #:use-module (gnu packages ghostscript)
94 #:use-module (gnu packages glib)
95 #:use-module (gnu packages graphviz)
96 #:use-module (gnu packages gtk)
97 #:use-module (gnu packages icu4c)
98 #:use-module (gnu packages image)
99 #:use-module (gnu packages java)
100 #:use-module (gnu packages less)
101 #:use-module (gnu packages lisp)
102 #:use-module (gnu packages linux)
103 #:use-module (gnu packages logging)
104 #:use-module (gnu packages lua)
105 #:use-module (gnu packages gnome)
106 #:use-module (gnu packages guile)
107 #:use-module (gnu packages xorg)
108 #:use-module (gnu packages gl)
109 #:use-module (gnu packages imagemagick)
110 #:use-module (gnu packages m4)
111 #:use-module (gnu packages mpi)
112 #:use-module (gnu packages multiprecision)
113 #:use-module (gnu packages netpbm)
114 #:use-module (gnu packages onc-rpc)
115 #:use-module (gnu packages pcre)
116 #:use-module (gnu packages popt)
117 #:use-module (gnu packages perl)
118 #:use-module (gnu packages pkg-config)
119 #:use-module (gnu packages pulseaudio)
120 #:use-module (gnu packages python)
121 #:use-module (gnu packages python-web)
122 #:use-module (gnu packages python-xyz)
123 #:use-module (gnu packages qt)
124 #:use-module (gnu packages readline)
125 #:use-module (gnu packages ruby)
126 #:use-module (gnu packages tbb)
127 #:use-module (gnu packages scheme)
128 #:use-module (gnu packages shells)
129 #:use-module (gnu packages tcl)
130 #:use-module (gnu packages texinfo)
131 #:use-module (gnu packages tex)
132 #:use-module (gnu packages tls)
133 #:use-module (gnu packages version-control)
134 #:use-module (gnu packages wxwidgets)
135 #:use-module (gnu packages xml)
136 #:use-module (srfi srfi-1))
144 (uri (string-append "mirror://gnu/" name "/" name "-" version ".tar.gz"))
146 "1q1887ryqdr9sn0522hc7p16kqwlxxyz5dkmma8ar2nxplhgll7q"))))
147 (build-system gnu-build-system)
148 (inputs `(("gtk+" ,gtk+)
149 ("libxml2" ,libxml2)))
150 (native-inputs `(("pkg-config" ,pkg-config)))
151 (synopsis "Natural deduction first-order logic interface")
152 (description "Aris is a program for performing logical proofs. It supports
153 propositional and predicate logic, as well as Boolean algebra and
154 arithmetical logic. In addition to its predefined inference and equivalence
155 rules, Aris also supports references to older proofs. Its use of standard
156 logical symbols and its natural deduction interface make it easy to use for
158 (license license:gpl3+)
159 (home-page "https://www.gnu.org/software/aris/")))
161 (define-public c-graph
167 (uri (string-append "mirror://gnu/c-graph/c-graph-" version
170 "092412jzxy6wdvpk96pfj499hpmaww8xllavbvlqspfpr7ips9id"))))
171 (build-system gnu-build-system)
173 `(("fortran" ,gfortran)))
174 (synopsis "Visualizing and demonstrating convolution")
176 "GNU C-Graph is a tool for demonstrating the theory of convolution.
177 Thus, it can serve as an excellent aid to students of signal and systems
178 theory in visualizing the convolution process. Rather than forcing the
179 student to write code, the program offers an intuitive interface with
180 interactive dialogs to guide them.")
181 (license license:gpl3+)
182 (home-page "https://www.gnu.org/software/c-graph/")))
191 (uri (string-append "https://github.com/stcorp/coda/releases/download/"
192 version "/coda-" version ".tar.gz"))
194 (base32 "1fbxd2afm7dshd92p10yy8dwbr9gc1h1fmnnnmr7d0c5lnw80245"))
195 (patches (search-patches "coda-use-system-libs.patch"))
196 (modules '((guix build utils)))
198 ;; Make sure we don't use the bundled software.
200 (for-each (lambda (d)
201 (delete-file-recursively (string-append "libcoda/" d)))
202 '("zlib" "pcre" "expat"))
205 `(("fortran" ,gfortran)
207 ("python-numpy" ,python-numpy)))
214 (build-system gnu-build-system)
216 '(#:configure-flags '("--with-hdf4" "--with-hdf5" "--enable-python"
217 "LIBS= -lz -lpcre -lexpat")))
218 (synopsis "A common interface to various earth observation data formats")
220 "The Common Data Access toolbox (CODA) provides a set of interfaces for
221 reading remote sensing data from earth observation data files. It consists of
222 command line applications and interfaces to the C, Fortran, Python, and Java
223 programming languages.")
224 (home-page "https://stcorp.nl/coda")
225 (license license:gpl2+)))
233 (uri (string-append "http://www.qhull.org/download/qhull-"
234 (car (string-split version #\.))
238 "0dm4b2xr3asy6w74khq2zg4gf26zsy3qf9sq7pf7lmrvbj911c3q"))))
239 (build-system cmake-build-system)
240 (synopsis "Calculate convex hulls and related structures")
242 "@code{Qhull} computes the convex hull, Delaunay triangulation, Voronoi
243 diagram, halfspace intersection about a point, furthest-site Delaunay
244 triangulation, and furthest-site Voronoi diagram. The source code runs in 2-d,
245 3-d, 4-d, and higher dimensions. @code{Qhull} implements the Quickhull
246 algorithm for computing the convex hull. It handles roundoff errors from
247 floating point arithmetic. It computes volumes, surface areas, and
248 approximations to the convex hull.
250 @code{Qhull} does not support triangulation of non-convex surfaces, mesh
251 generation of non-convex objects, medium-sized inputs in 9-D and higher, alpha
252 shapes, weighted Voronoi diagrams, Voronoi volumes, or constrained Delaunay
254 (home-page "http://qhull.org")
255 (license (license:non-copyleft "file://COPYING.txt"
256 "See COPYING in the distribution."))))
258 (define-public python-cvxopt
260 (name "python-cvxopt")
265 (url "https://github.com/cvxopt/cvxopt.git")
267 (file-name (git-file-name name version))
270 "1kiy2m62xgs2d5id6dnnwy4vap85cd70p7pgkb9nh23qf9xnak7b"))))
271 (build-system python-build-system)
274 (modify-phases %standard-phases
275 (add-after 'unpack 'find-libraries
276 (lambda* (#:key inputs #:allow-other-keys)
277 (setenv "CVXOPT_BLAS_LIB" "openblas")
278 (setenv "CVXOPT_BUILD_FFTW" "1")
279 (setenv "CVXOPT_BUILD_GLPK" "1")
280 (setenv "CVXOPT_BUILD_GSL" "1")
287 ("openblas" ,openblas)
288 ("suitesparse" ,suitesparse)))
289 (home-page "https://www.cvxopt.org")
290 (synopsis "Python library for convex optimization")
292 "CVXOPT is a package for convex optimization based on the Python
293 programming language. Its main purpose is to make the development of software
294 for convex optimization applications straightforward by building on Python’s
295 extensive standard library and on the strengths of Python as a high-level
296 programming language.")
297 (license license:gpl3+)))
299 (define-public python2-cvxopt
300 (package-with-python2 python-cvxopt))
308 (uri (string-append "mirror://gnu/units/units-" version
311 "0mk562g7dnidjgfgvkxxpvlba66fh1ykmfd9ylzvcln1vxmi6qj2"))))
312 (build-system gnu-build-system)
314 `(("readline" ,readline)
315 ("python" ,python-wrapper) ;for 'units_cur' script
316 ("python-requests" ,python-requests)))
318 `(#:phases (modify-phases %standard-phases
319 (add-after 'install 'wrap-units_cur
320 (lambda* (#:key outputs #:allow-other-keys)
321 (let* ((out (assoc-ref outputs "out"))
322 (bin (string-append out "/bin")))
323 (wrap-program (string-append bin "/units_cur")
324 `("PYTHONPATH" ":" prefix
325 ,(search-path-as-string->list (getenv "PYTHONPATH"))))
327 (synopsis "Conversion between thousands of scales")
329 "GNU Units converts numeric quantities between units of measure. It
330 can handle scale changes through adaptive usage of standard scale
331 prefixes (micro-, kilo-, etc.). It can also handle nonlinear
332 conversions such as Fahrenheit to Celsius. Its interpreter is powerful
333 enough to be used effectively as a scientific calculator.")
334 (license license:gpl3+)
335 (home-page "https://www.gnu.org/software/units/")))
337 (define-public double-conversion
339 (name "double-conversion")
341 (home-page "https://github.com/google/double-conversion")
344 (uri (git-reference (url home-page)
345 (commit (string-append "v" version))))
346 (file-name (git-file-name name version))
349 "0csy4pjw1p8rp6g5qxi2h0ychhhp1fldv7gb761627fs2mclw9gv"))))
350 (build-system cmake-build-system)
352 '(#:test-target "test"
353 #:configure-flags '("-DBUILD_SHARED_LIBS=ON"
354 "-DBUILD_TESTING=ON")))
355 (synopsis "Conversion routines for IEEE doubles")
357 "The double-conversion library provides binary-decimal and decimal-binary
358 routines for IEEE doubles. The library consists of efficient conversion
359 routines that have been extracted from the V8 JavaScript engine.")
360 (license license:bsd-3)))
362 (define-public dionysus
368 (uri (string-append "mirror://gnu/dionysus/dionysus-" version
372 "194pzs1mlsj4ww6v37qq3961h5hckm5h805cv0r14xj3g9wfx2sk"))))
373 (build-system gnu-build-system)
374 (inputs `(("tcl" ,tcl))) ;for 'tclsh'
375 (synopsis "Local search for universal constants and scientific values")
377 "GNU Dionysus is a convenient system for quickly retrieving the values of
378 mathematical constants used in science and engineering. Values can be
379 searched using a simple command-line tool, choosing from three databases:
380 universal constants, atomic numbers, and constants related to
382 (license license:gpl3+)
383 (home-page "https://www.gnu.org/software/dionysus/")))
394 "http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/"
395 "dSFMT-src-" version ".tar.gz"))
398 "03kaqbjbi6viz0n33dk5jlf6ayxqlsq4804n7kwkndiga9s4hd42"))
399 (modules '((guix build utils)))
400 ;; Don't distribute html documentation with bundled jquery.
403 (delete-file-recursively "html") #t))
404 ;; Add patches borrowed from Julia.
410 "https://raw.githubusercontent.com/JuliaLang/julia/"
411 "v1.3.0/deps/patches/dSFMT.c.patch"))
413 "09mhv11bms8jsmkmdqvlcgljwhzw3b6n9nncpi2b6dla9798hw2y"))
414 (file-name "dSFMT.c.patch"))
418 "https://raw.githubusercontent.com/JuliaLang/julia/"
419 "v1.3.0/deps/patches/dSFMT.h.patch"))
421 "1py5rd0yxic335lzka23f6x2dhncrpizpyrk57gi2f28c0p98y5n"))
422 (file-name "dSFMT.h.patch"))))))
423 (build-system gnu-build-system)
426 (modify-phases %standard-phases
427 (delete 'configure) ; no configure script
429 ;; Upstream Makefile does not build a shared library. Borrow from Julia
430 ;; https://github.com/JuliaLang/julia/blob/v1.3.0/deps/dsfmt.mk
433 "gcc" "-DNDEBUG" "-DDSFMT_MEXP=19937"
434 "-fPIC" "-DDSFMT_DO_NOT_USE_OLD_NAMES"
435 "-O3" "-finline-functions" "-fomit-frame-pointer"
436 "-fno-strict-aliasing" "--param" "max-inline-insns-single=1800"
437 "-Wmissing-prototypes" "-Wall" "-std=c99" "-shared" "dSFMT.c"
438 "-o" "libdSFMT.so")))
439 (replace 'install ; no "install" target
440 (lambda* (#:key outputs #:allow-other-keys)
441 (let* ((out (assoc-ref outputs "out"))
442 (lib (string-append out "/lib"))
443 (inc (string-append out "/include"))
444 (doc (string-append out "/share/doc/" ,name "-" ,version)))
445 (install-file "libdSFMT.so" lib)
446 (install-file "dSFMT.h" inc)
447 (install-file "LICENSE.txt" doc)
449 (synopsis "Double precision SIMD-oriented Fast Mersenne Twister")
451 "The dSMFT package speeds up Fast Mersenne Twister generation by avoiding
452 the expensive conversion of integer to double (floating point). dSFMT directly
453 generates double precision floating point pseudorandom numbers which have the
454 IEEE Standard for Binary Floating-Point Arithmetic (ANSI/IEEE Std 754-1985)
455 format. dSFMT is only available on the CPUs which use IEEE 754 format double
456 precision floating point numbers.")
457 (home-page "http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/")
458 (license license:bsd-3)))
466 (uri (string-append "mirror://gnu/gsl/gsl-"
470 "1a460zj9xmbgvcymkdhqh313c4l29mn9cffbi5vf33x3qygk70mp"))))
471 (build-system gnu-build-system)
473 (let ((system (%current-system)))
475 ((string-prefix? "aarch64" system)
476 ;; Some sparse matrix tests are failing on AArch64:
477 ;; https://lists.gnu.org/archive/html/bug-gsl/2020-04/msg00001.html
478 '(#:phases (modify-phases %standard-phases
479 (add-before 'check 'disable-failing-tests
481 (substitute* "spmatrix/test.c"
482 ((".*test_complex.*") "\n"))
484 ((string-prefix? "i686" system)
485 ;; There are rounding issues with these tests on i686:
486 ;; https://lists.gnu.org/archive/html/bug-gsl/2016-10/msg00000.html
487 ;; https://lists.gnu.org/archive/html/bug-gsl/2020-04/msg00000.html
488 '(#:phases (modify-phases %standard-phases
489 (add-before 'check 'disable-failing-tests
491 (substitute* "linalg/test.c"
492 ((".*gsl_test\\(test_LU_decomp.*") "\n")
493 ((".*gsl_test\\(test_LUc_decomp.*") "\n")
494 ((".*gsl_test\\(test_cholesky_decomp.*") "\n")
495 ((".*gsl_test\\(test_COD_lssolve2.*") "\n"))
496 (substitute* "spmatrix/test.c"
497 ((".*test_all.*") "\n")
498 ((".*test_float.*") "\n")
499 ((".*test_complex.*") "\n"))
502 (home-page "https://www.gnu.org/software/gsl/")
503 (synopsis "Numerical library for C and C++")
505 "The GNU Scientific Library is a library for numerical analysis in C
506 and C++. It includes a wide range of mathematical routines, with over 1000
507 functions in total. Subject areas covered by the library include:
508 differential equations, linear algebra, Fast Fourier Transforms and random
510 (license license:gpl3+)))
519 (uri (string-append "mirror://gnu/glpk/glpk-"
523 "040sfaa9jclg2nqdh83w71sv9rc1sznpnfiripjdyr48cady50a2"))))
524 (build-system gnu-build-system)
528 `(#:configure-flags '("--with-gmp")))
529 (home-page "https://www.gnu.org/software/glpk/")
530 (synopsis "GNU Linear Programming Kit, supporting the MathProg language")
532 "GLPK is a C library for solving large-scale linear programming (LP),
533 mixed integer programming (MIP), and other related problems. It supports the
534 GNU MathProg modeling language, a subset of the AMPL language, and features a
535 translator for the language. In addition to the C library, a stand-alone
536 LP/MIP solver is included in the package.")
537 (license license:gpl3+)))
546 (uri (string-append "https://github.com/4ti2/4ti2/releases/download/"
548 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
550 "/4ti2-" version ".tar.gz"))
552 (base32 "0rj92x6p9m3la5gasjbj7sa569im527ffmka5y2sv1amgd3fflrh"))))
553 (build-system gnu-build-system)
555 `(("which" ,(@ (gnu packages base) which)))) ; for the tests
559 (home-page "http://www.4ti2.de/")
560 (synopsis "Mathematical tool suite for problems on linear spaces")
562 "4ti2 implements algorithms for solving algebraic, geometric and
563 combinatorial problems on linear spaces. Among others, it solves systems
564 of linear equations, computes extreme rays of polyhedral cones, solves
565 integer programming problems and computes Markov bases for statistics.")
566 (license license:gpl2+)))
568 (define-public cddlib
575 (uri (string-append "ftp://ftp.math.ethz.ch/users/fukudak/cdd/cddlib-"
576 (string-delete #\. version) ".tar.gz"))
579 "00zdgiqb91vx6gd2103h3ijij0llspsxc6zz3iw2bll39fvkl4xq"))))
580 (build-system gnu-build-system)
583 (home-page "https://www.inf.ethz.ch/personal/fukudak/cdd_home/index.html")
584 (synopsis "Library for convex hulls and extreme rays of polyhedra")
586 "The C-library cddlib implements the Double Description Method of
587 Motzkin et al. for generating all vertices (i.e. extreme points) and extreme
588 rays of a general convex polyhedron given by a system of linear inequalities
589 in arbitrary dimension. It can also be used for the converse operation of
590 computing convex hulls.")
591 (license license:gpl2+)))
593 (define-public lrslib
600 (uri (string-append "http://cgm.cs.mcgill.ca/~avis/C/lrslib/archive/"
602 (string-delete #\. version) ".tar.gz"))
605 "034fa45r9hwx6ljmgpxk2872q34nklkalpdkc6s9hqw57rivi36k"))))
606 (build-system gnu-build-system)
610 `(#:tests? #f ; no check phase
611 #:make-flags `("CC=gcc"
612 ,(string-append "prefix=" (assoc-ref %outputs "out"))
615 (modify-phases %standard-phases
618 (substitute* "makefile"
619 (("-L \\.") "-L . -Wl,-rpath='$$ORIGIN/../lib'"))
621 (home-page "http://cgm.cs.mcgill.ca/~avis/C/lrs.html")
622 (synopsis "Convex hulls of polyhedra with exact arithmetic")
624 "The C code of lrslib implements the reverse search algorithm for
625 vertex enumeration and convex hull problems. Its input file format is
626 compatible with cddlib. All computations are done exactly in either
627 multiple precision or fixed integer arithmetic. Output is not stored
628 in memory, so even problems with very large output sizes can sometimes
630 (license license:gpl2+)))
639 (uri (string-append "https://www.math.u-bordeaux.fr/~aenge/software/"
640 "vinci/vinci-" version ".tar.gz"))
643 "1aq0qc1y27iw9grhgnyji3290wwfznsrk3sg6ynqpxwjdda53h4m"))))
644 (build-system gnu-build-system)
646 `(("lrslib" ,lrslib)))
648 `(#:tests? #f ; no check phase
650 (modify-phases %standard-phases
652 ;; register the lrs location in the config file
653 (lambda* (#:key inputs #:allow-other-keys)
654 (let* ((lrs (assoc-ref inputs "lrslib"))
655 (lrsexec (string-append lrs "/bin/lrs")))
656 (substitute* "vinci.h"
657 (("#define LRS_EXEC \"lrs\"")
658 (string-append "#define LRS_EXEC \"" lrsexec "\""))))
661 (lambda* (#:key outputs #:allow-other-keys)
662 (let* ((out (assoc-ref outputs "out"))
663 (bin (string-append out "/bin")))
664 (install-file "vinci" bin))
667 "https://www.math.u-bordeaux.fr/~aenge/?category=software&page=vinci")
668 (synopsis "Volume computation for polytopes")
670 "Vinci implements a number of volume computation algorithms for convex
671 polytopes in arbitrary dimension. The polytopes can be given by their
672 V-representation (as the convex hull of a finite number of vertices), by
673 their H-representation (as the bounded intersection of a finite number of
674 halfspaces) or by their double description with both representations.")
675 (license license:gpl2+)))
677 (define-public arpack-ng
681 (home-page "https://github.com/opencollab/arpack-ng")
684 (uri (git-reference (url home-page) (commit version)))
685 (file-name (git-file-name name version))
688 "1wljl96yqxc9v8r49c37lscwkdp58kaacfb9p6s6nvpm31haax4y"))))
689 (build-system gnu-build-system)
691 `(("autoconf" ,autoconf)
692 ("automake" ,automake)
693 ("libtool" ,libtool)))
696 ("fortran" ,gfortran)))
697 (synopsis "Fortran subroutines for solving eigenvalue problems")
699 "ARPACK-NG is a collection of Fortran77 subroutines designed to solve
700 large scale eigenvalue problems.")
701 (license (license:non-copyleft "file://COPYING"
702 "See COPYING in the distribution."))))
704 (define-public arpack-ng-3.3.0
708 (name (package-name arpack-ng))
709 (home-page (package-home-page arpack-ng))
713 (uri (string-append home-page "/archive/" version ".tar.gz"))
714 (file-name (string-append name "-" version ".tar.gz"))
717 "1cz53wqzcf6czmcpfb3vb61xi0rn5bwhinczl65hpmbrglg82ndd"))))))
719 (define-public arpack-ng-openmpi
720 (package (inherit arpack-ng)
721 (name "arpack-ng-openmpi")
724 ,@(package-inputs arpack-ng)))
726 (substitute-keyword-arguments (package-arguments arpack-ng)
727 ((#:configure-flags _ '())
729 ((#:phases phases '%standard-phases)
730 `(modify-phases ,phases
731 (add-before 'check 'mpi-setup
733 (synopsis "Fortran subroutines for solving eigenvalue problems with MPI")))
735 (define-public lapack
742 (uri (string-append "http://www.netlib.org/lapack/lapack-"
746 "1155qixp26c12yrxc76z9mlfw2h3xxymxxv5znpgzh5gaykpndgj"))))
747 (build-system cmake-build-system)
748 (home-page "http://www.netlib.org/lapack/")
749 (inputs `(("fortran" ,gfortran)
750 ("python" ,python-wrapper)))
752 `(#:configure-flags (list
753 "-DBUILD_SHARED_LIBS:BOOL=YES"
755 ;; Build the 'LAPACKE_clatms' functions.
756 "-DLAPACKE_WITH_TMG=ON"
757 "-DBUILD_TESTING=ON")))
758 (synopsis "Library for numerical linear algebra")
760 "LAPACK is a Fortran 90 library for solving the most commonly occurring
761 problems in numerical linear algebra.")
762 (license (license:non-copyleft "file://LICENSE"
763 "See LICENSE in the distribution."))))
765 (define-public scalapack
772 (uri (string-append "http://www.netlib.org/scalapack/scalapack-"
776 "0p1r61ss1fq0bs8ynnx7xq4wwsdvs32ljvwjnx6yxr8gd6pawx0c"))
777 (patches (search-patches "scalapack-blacs-mpi-deprecations.patch"))))
778 (build-system cmake-build-system)
781 ("fortran" ,gfortran)
782 ("lapack" ,lapack))) ;for testing only
784 `(#:configure-flags `("-DBUILD_SHARED_LIBS:BOOL=YES")
785 #:phases (modify-phases %standard-phases
786 (add-before 'check 'mpi-setup
788 (home-page "http://www.netlib.org/scalapack/")
789 (synopsis "Library for scalable numerical linear algebra")
791 "ScaLAPACK is a Fortran 90 library of high-performance linear algebra
792 routines on parallel distributed memory machines. ScaLAPACK solves dense and
793 banded linear systems, least squares problems, eigenvalue problems, and
794 singular value problems.")
795 (license (license:non-copyleft "file://LICENSE"
796 "See LICENSE in the distribution."))))
798 (define-public gnuplot
804 (uri (string-append "mirror://sourceforge/gnuplot/gnuplot/"
808 (base32 "1vglp4la40f5dpj0zdj63zprrkyjgzy068p35bz5dqxjyczm1zlp"))))
809 (build-system gnu-build-system)
810 (inputs `(("readline" ,readline)
816 `(("pkg-config" ,pkg-config)
817 ("texlive" ,texlive-tiny)))
818 (arguments `(#:configure-flags (list (string-append
819 "--with-texdir=" %output
820 "/texmf-local/tex/latex/gnuplot"))))
821 (home-page "http://www.gnuplot.info")
822 (synopsis "Command-line driven graphing utility")
823 (description "Gnuplot is a portable command-line driven graphing
824 utility. It was originally created to allow scientists and students to
825 visualize mathematical functions and data interactively, but has grown to
826 support many non-interactive uses such as web scripting. It is also used as a
827 plotting engine by third-party applications like Octave.")
828 ;; X11 Style with the additional restriction that derived works may only be
829 ;; distributed as patches to the original.
830 (license (license:fsf-free
831 "http://gnuplot.cvs.sourceforge.net/gnuplot/gnuplot/Copyright"))))
841 (url "https://github.com/OkoSanto/GCTP.git")
842 (commit (string-append "v" version))))
843 (file-name (git-file-name name version))
845 (base32 "11wqmd443b4nksdbzp1msdws3av948nmwq1xz80w6hka3ss2aigd"))))
847 `(("fortran" ,gfortran)))
848 (build-system gnu-build-system)
849 (synopsis "General Cartographic Transformation Package (GCTP)")
851 "The General Cartographic Transformation Package (GCTP) is a system of
852 software routines designed to permit the transformation of coordinate pairs
853 from one map projection to another. The GCTP is the standard computer
854 software used by the National Mapping Division for map projection
856 (home-page "https://github.com/OkoSanto/GCTP")
857 (license license:public-domain))) ;https://www2.usgs.gov/laws/info_policies.html
866 (uri (string-append "https://support.hdfgroup.org/ftp/HDF/releases/HDF"
867 version "/src/hdf-" version ".tar.bz2"))
869 (base32 "0n29klrrbwan9307np0d9hr128dlpc4nnlf57a140080ll3jmp8l"))
870 (patches (search-patches "hdf4-architectures.patch"
871 "hdf4-reproducibility.patch"
872 "hdf4-shared-fortran.patch"
873 "hdf4-tirpc.patch"))))
874 (build-system gnu-build-system)
876 `(("gfortran" ,gfortran)
881 ("libjpeg" ,libjpeg-turbo)
882 ("libtirpc" ,libtirpc)))
884 `(#:parallel-tests? #f
885 #:configure-flags (list "--enable-shared"
886 (string-append "CPPFLAGS=-I"
887 (assoc-ref %build-inputs "libtirpc")
890 (modify-phases %standard-phases
891 ;; This is inspired by two of Debian's patches.
892 (add-before 'configure 'add-more-aarch64-support
894 (substitute* '("mfhdf/ncgen/ncgen.l"
895 "mfhdf/ncgen/ncgenyy.c"
896 "mfhdf/libsrc/netcdf.h.in")
897 (("AIX5L64") "__aarch64__"))
899 (add-before 'configure 'patchbuild
902 '("mfhdf/hdfimport/testutil.sh.in" "hdf/util/testutil.sh.in")
904 (("/bin/mkdir") "mkdir"))
905 (substitute* (find-files "." "^Makefile\\.in$")
906 (("@HDF_BUILD_XDR_TRUE@XDR_ADD = \
907 -R\\$\\(abs_top_builddir\\)/mfhdf/xdr/\\.libs") "")
908 (("@HDF_BUILD_SHARED_TRUE@AM_LDFLAGS = \
909 -R\\$\\(abs_top_builddir\\)/mfhdf/libsrc/\\.libs \
910 -R\\$\\(abs_top_builddir\\)/hdf/src/\\.libs \\$\\(XDR_ADD\\)") ""))
912 (add-after 'configure 'patch-settings
914 ;; libhdf4.settings contains the full path of the
915 ;; compilers used, and its contents are included in
916 ;; .so-files. We truncate the hashes to avoid
917 ;; unnecessary store references to those compilers:
918 (substitute* "libhdf4.settings"
919 (("(/gnu/store/)([a-Z0-9]*)" all prefix hash)
920 (string-append prefix (string-take hash 10) "...")))
923 (home-page "https://www.hdfgroup.org/products/hdf4/")
925 "Library and multi-object file format for storing and managing data")
926 (description "HDF4 is a library and multi-object file format for storing
927 and managing data between machines. HDF4 is an older hierarchical data format,
928 incompatible with HDF5.")
930 (license:non-copyleft
931 "https://www.hdfgroup.org/ftp/HDF/HDF_Current/src/unpacked/COPYING"))))
933 (define-public hdf4-alt
938 (substitute-keyword-arguments (package-arguments hdf4)
939 ((#:configure-flags flags) `(cons* "--disable-netcdf" ,flags))))
941 "HDF4 without netCDF API, can be combined with the regular netCDF library")))
950 (uri (list (string-append "https://support.hdfgroup.org/ftp/HDF5/releases/"
951 "hdf5-" (version-major+minor version)
952 "/hdf5-" version "/src/hdf5-"
954 (string-append "https://support.hdfgroup.org/ftp/HDF5/"
956 (match (string-split version #\.)
958 (string-append major minor)))
959 "/src/hdf5-" version ".tar.bz2")))
961 (base32 "03glk4w4wyb1jyb443g53y3y1ncnf6mj2cqwm6avfr2awkgb3cg5"))
962 (patches (search-patches "hdf5-config-date.patch"
963 "hdf5-1.8-mpi-deprecations.patch"))))
964 (build-system gnu-build-system)
968 `(("gfortran" ,gfortran)
969 ("perl" ,perl))) ;part of the test machinery needs Perl
970 (outputs '("out" ; core library
971 "fortran")) ; fortran interface
973 `(;; Some of the users, notably Flann, need the C++ interface.
974 #:configure-flags '("--enable-cxx"
976 "--enable-fortran2003"
978 ;; Build a thread-safe library. Unfortunately,
979 ;; 'configure' invites you to either turn off C++,
980 ;; Fortran, and the high-level interface (HL), or
981 ;; to pass '--enable-unsupported'. Debian
982 ;; packagers chose to pass '--enable-unsupported'
983 ;; and we follow their lead here.
984 "--enable-threadsafe"
986 "--enable-unsupported")
987 ;; Use -fPIC to allow the R bindings to link with the static libraries
988 #:make-flags (list "CFLAGS=-fPIC"
991 (modify-phases %standard-phases
992 (add-before 'configure 'patch-configure
993 (lambda* (#:key outputs #:allow-other-keys)
994 (substitute* "configure"
996 (substitute* "fortran/src/Makefile.in"
997 (("libhdf5_fortran_la_LDFLAGS =")
998 (string-append "libhdf5_fortran_la_LDFLAGS = -Wl-rpath="
999 (assoc-ref outputs "fortran") "/lib")))
1000 (substitute* "hl/fortran/src/Makefile.in"
1001 (("libhdf5hl_fortran_la_LDFLAGS =")
1002 (string-append "libhdf5hl_fortran_la_LDFLAGS = -Wl,-rpath="
1003 (assoc-ref outputs "fortran") "/lib")))
1005 (add-after 'configure 'patch-settings
1007 ;; libhdf5.settings contains the full path of the
1008 ;; compilers used, and its contents are included in
1009 ;; libhdf5.so. We truncate the hashes to avoid
1010 ;; unnecessary store references to those compilers:
1011 (substitute* "src/libhdf5.settings"
1012 (("(/gnu/store/)([a-Z0-9]*)" all prefix hash)
1013 (string-append prefix (string-take hash 10) "..."))
1014 ;; Don't record the build-time kernel version to make the
1015 ;; settings file reproducible.
1016 (("Uname information:.*")
1017 "Uname information: Linux\n"))
1019 (add-after 'install 'patch-references
1020 (lambda* (#:key inputs outputs #:allow-other-keys)
1021 (let ((bin (string-append (assoc-ref outputs "out") "/bin"))
1022 (zlib (assoc-ref inputs "zlib")))
1023 (substitute* (find-files bin "h5p?cc")
1025 (string-append "-L" zlib "/lib " lib)))
1027 (add-after 'install 'split
1028 (lambda* (#:key inputs outputs #:allow-other-keys)
1029 ;; Move all fortran-related files
1030 (let* ((out (assoc-ref outputs "out"))
1031 (bin (string-append out "/bin"))
1032 (lib (string-append out "/lib"))
1033 (inc (string-append out "/include"))
1034 (ex (string-append out "/share/hdf5_examples/fortran"))
1035 (fort (assoc-ref outputs "fortran"))
1036 (fbin (string-append fort "/bin"))
1037 (flib (string-append fort "/lib"))
1038 (finc (string-append fort "/include"))
1039 (fex (string-append fort "/share/hdf5_examples/fortran")))
1044 ;; Note: When built with --enable-parallel, the 'h5fc' file
1045 ;; doesn't exist, hence this condition.
1046 (when (file-exists? (string-append bin "/h5fc"))
1047 (rename-file (string-append bin "/h5fc")
1048 (string-append fbin "/h5fc")))
1049 (for-each (lambda (file)
1051 (string-append flib "/" (basename file))))
1052 (find-files lib ".*fortran.*"))
1053 (for-each (lambda (file)
1055 (string-append finc "/" (basename file))))
1056 (find-files inc ".*mod"))
1057 (for-each (lambda (file)
1059 (string-append fex "/" (basename file))))
1060 (find-files ex ".*"))
1061 (delete-file-recursively ex))
1063 (home-page "https://www.hdfgroup.org")
1064 (synopsis "Management suite for extremely large and complex data")
1065 (description "HDF5 is a suite that makes possible the management of
1066 extremely large and complex data collections.")
1067 (license (license:x11-style
1068 "https://www.hdfgroup.org/ftp/HDF5/current/src/unpacked/COPYING"))))
1070 (define-public hdf5-1.10
1071 (package (inherit hdf5)
1076 (uri (list (string-append "https://support.hdfgroup.org/ftp/HDF5/releases/"
1077 "hdf5-" (version-major+minor version)
1078 "/hdf5-" version "/src/hdf5-"
1080 (string-append "https://support.hdfgroup.org/ftp/HDF5/"
1082 (apply string-append
1083 (take (string-split version #\.) 2))
1084 "/src/hdf5-" version ".tar.bz2")))
1086 (base32 "1gf38x51128hn00744358w27xgzjk0ff4wra4yxh2lk804ck1mh9"))
1087 (patches (search-patches "hdf5-config-date.patch"))))))
1089 (define-public hdf-java
1097 "https://www.hdfgroup.org/ftp/HDF5/releases/HDF-JAVA/hdfjni-"
1098 version "/src/CMake-hdfjava-" version ".tar.gz"))
1100 (base32 "0m1gp2aspcblqzmpqbdpfp6giskws85ds6p5gz8sx7asyp7wznpr"))
1101 (modules '((guix build utils)))
1102 (snippet ; Make sure we don't use the bundled sources and binaries.
1104 (for-each delete-file
1105 (list "SZip.tar.gz" "ZLib.tar.gz" "JPEG8d.tar.gz"
1106 "HDF4.tar.gz" "HDF5.tar.gz"))
1107 (delete-file-recursively ,(string-append "hdfjava-" version "/lib"))
1109 (build-system gnu-build-system)
1111 `(("jdk" ,icedtea "jdk")
1112 ("automake" ,automake) ; For up to date 'config.guess' and 'config.sub'.
1114 ("hamcrest-core" ,java-hamcrest-core)
1115 ("junit" ,java-junit)
1116 ("slf4j-simple" ,java-slf4j-simple)))
1121 ("libjpeg" ,libjpeg-turbo)
1122 ("slf4j-api" ,java-slf4j-api)))
1125 (list (string-append "--target=" ,(or (%current-target-system) (%current-system)))
1126 (string-append "--with-jdk=" (assoc-ref %build-inputs "jdk") "/include,"
1127 (assoc-ref %build-inputs "jdk") "/lib" )
1128 (string-append "--with-hdf4=" (assoc-ref %build-inputs "hdf4") "/lib")
1129 (string-append "--with-hdf5=" (assoc-ref %build-inputs "hdf5") "/lib"))
1132 (list (string-append "HDFLIB=" (assoc-ref %build-inputs "hdf4") "/lib")
1133 (string-append "HDF5LIB=" (assoc-ref %build-inputs "hdf5") "/lib")
1134 (string-append "ZLIB=" (assoc-ref %build-inputs "zlib") "/lib/libz.so")
1135 (string-append "JPEGLIB="
1136 (assoc-ref %build-inputs "libjpeg") "/lib/libjpeg.so")
1140 (modify-phases %standard-phases
1141 (add-before 'configure 'chdir-to-source
1142 (lambda _ (chdir ,(string-append "hdfjava-" version)) #t))
1143 (add-before 'configure 'patch-build
1144 (lambda* (#:key inputs outputs #:allow-other-keys)
1145 (substitute* "configure"
1146 (("COPT=\"") "COPT=\"-O2 ") ; CFLAGS is ignored in Makefiles
1147 (("/bin/cat") (which "cat")))
1148 ;; Set classpath for compilation
1149 (substitute* '("hdf/hdf5lib/Makefile.in"
1150 "hdf/hdf5lib/exceptions/Makefile.in"
1151 "hdf/hdflib/Makefile.in")
1152 (("\\$\\(TOP\\)/lib/slf4j-api-1\\.7\\.5\\.jar")
1153 (string-append (assoc-ref inputs "slf4j-api")
1154 "/share/java/slf4j-api.jar")))
1155 ;; Replace outdated config.sub and config.guess:
1156 (with-directory-excursion "config"
1157 (for-each (lambda (file)
1159 (string-append (assoc-ref inputs "automake")
1161 ,(version-major+minor (package-version automake))
1163 '("config.sub" "config.guess")))
1165 ;; Fix embedded version number
1166 (let ((hdf5version (list ,@(string-split (package-version hdf5) #\.))))
1167 (substitute* "hdf/hdf5lib/H5.java"
1169 (string-join hdf5version ", "))))
1171 (mkdir-p (string-append (assoc-ref outputs "out")))
1172 ;; Set classpath for tests
1173 (let* ((build-dir (getcwd))
1174 (lib (string-append build-dir "/lib"))
1175 (jhdf (string-append lib "/jhdf.jar"))
1176 (jhdf5 (string-append lib "/jhdf5.jar"))
1179 (string-append (assoc-ref inputs i)
1180 "/share/java/" i ".jar"))
1181 '("junit" "hamcrest-core" "slf4j-api" "slf4j-simple")))
1183 (string-join `("." ,build-dir ,jhdf ,jhdf5 ,@testjars) ":")))
1185 (substitute* '("test/hdf5lib/Makefile.in"
1186 "test/hdf5lib/junit.sh.in"
1187 "examples/runExample.sh.in")
1189 (string-append (assoc-ref inputs "coreutils")
1192 (string-append (assoc-ref inputs "coreutils")
1194 (("CLASSPATH=[^\n]*")
1195 (string-append "CLASSPATH=" class-path)))
1196 (setenv "CLASSPATH" class-path))
1198 (add-before 'check 'build-examples
1200 (apply invoke `("javac"
1201 ,@(find-files "examples" ".*\\.java"))))))
1203 #:parallel-build? #f
1205 #:parallel-tests? #f ))
1206 (home-page "https://support.hdfgroup.org/products/java")
1207 (synopsis "Java interface for the HDF4 and HDF5 libraries")
1208 (description "Java HDF Interface (JHI) and Java HDF5 Interface (JHI5) use
1209 the Java Native Interface to wrap the HDF4 and HDF5 libraries, which are
1212 ;; BSD-style license:
1213 (license (license:x11-style
1214 "https://support.hdfgroup.org/ftp/HDF5/hdf-java\
1215 /current/src/unpacked/COPYING"))))
1217 (define-public hdf-eos2
1224 (uri "ftp://edhs1.gsfc.nasa.gov\
1225 /edhs/hdfeos/latest_release/HDF-EOS2.19v1.00.tar.Z")
1227 (base32 "0c9fcz25s292ldap12wxmlrvnyz99z24p63d8fwx51bf8s0s1zrz"))
1228 (patches (search-patches "hdf-eos2-remove-gctp.patch"
1229 "hdf-eos2-build-shared.patch"
1230 "hdf-eos2-fortrantests.patch"))))
1231 (build-system gnu-build-system)
1233 `(("gfortran" ,gfortran)))
1235 `(("hdf4" ,hdf4-alt) ; assume most HDF-EOS2 users won't use the HDF4 netCDF API
1236 ;; XXX: These inputs are really dependencies of hdf4.
1238 ("libjpeg" ,libjpeg-turbo)
1239 ("libtirpc" ,libtirpc)
1243 `( #:configure-flags '("--enable-install-include" "--enable-shared"
1244 "CC=h4cc -Df2cFortran" "LIBS=-lgctp")
1245 #:parallel-tests? #f))
1246 (home-page "https://hdfeos.org/software/library.php#HDF-EOS2")
1247 (synopsis "HDF4-based data format for NASA's Earth Observing System")
1248 (description "HDF-EOS2 is a software library built on HDF4 which supports
1249 the construction of data structures used in NASA's Earth Observing
1250 System (Grid, Point and Swath).")
1252 ;; Source files carry a permissive license header.
1253 (license (license:non-copyleft home-page))))
1255 (define-public hdf-eos5
1261 (uri (string-append "ftp://edhs1.gsfc.nasa.gov\
1262 /edhs/hdfeos5/latest_release/HDF-EOS5." version ".tar.Z"))
1265 "1p83333nzzy8rn5chxlm0hrkjjnhh2w1ji8ac0f9q4xzg838i58i"))
1266 (patches (search-patches "hdf-eos5-build-shared.patch"
1267 "hdf-eos5-remove-gctp.patch"
1268 "hdf-eos5-fix-szip.patch"
1269 "hdf-eos5-fortrantests.patch"))))
1271 `(("gfortran" ,gfortran)))
1272 (build-system gnu-build-system)
1278 `(#:configure-flags '("--enable-install-include" "--enable-shared"
1279 "CC=h5cc -Df2cFortran" "LIBS=-lgctp")
1280 #:parallel-tests? #f))
1281 (synopsis "HDF5-based data format for NASA's Earth Observing System")
1283 "HDF-EOS5 is a software library built on HDF5 to support the construction
1284 of data structures used in NASA's Earth Observing System (Grid, Point and
1286 (home-page "http://www.hdfeos.org/software/library.php#HDF-EOS5")
1288 ;; Source files carry a permissive license header.
1289 (license (license:non-copyleft home-page))))
1291 (define-public hdf5-parallel-openmpi
1292 (package (inherit hdf5)
1293 (name "hdf5-parallel-openmpi")
1296 ,@(package-inputs hdf5)))
1298 (substitute-keyword-arguments (package-arguments hdf5)
1299 ((#:configure-flags flags)
1300 ``("--enable-parallel"
1301 ,@(delete "--enable-cxx"
1302 (delete "--enable-threadsafe" ,flags))))
1304 `(modify-phases ,phases
1305 (add-after 'build 'mpi-setup
1307 (add-before 'check 'patch-tests
1309 ;; OpenMPI's mpirun will exit with non-zero status if it
1310 ;; detects an "abnormal termination", i.e. any process not
1311 ;; calling MPI_Finalize(). Since the test is explicitly
1312 ;; avoiding MPI_Finalize so as not to have at_exit and thus
1313 ;; H5C_flush_cache from being called, mpirun will always
1314 ;; complain, so turn this test off.
1315 (substitute* "testpar/Makefile"
1316 (("(^TEST_PROG_PARA.*)t_pflush1(.*)" front back)
1317 (string-append front back "\n")))
1318 (substitute* "tools/h5diff/testph5diff.sh"
1319 (("/bin/sh") (which "sh")))
1321 (synopsis "Management suite for data with parallel IO support")))
1323 (define-public h5check
1330 (uri (string-append "https://www.hdfgroup.org/ftp/HDF5/tools/"
1331 "h5check/src/h5check-" version ".tar.gz"))
1334 "1gm76jbwhz9adbxgn14zx8cj33dmjdr2g5xcy0m9c2gakp8w59kj"))))
1335 (build-system gnu-build-system)
1336 (inputs `(("hdf5" ,hdf5))) ;h5cc for tests
1337 (home-page "https://www.hdfgroup.org/products/hdf5_tools/h5check.html")
1338 (synopsis "HDF5 format checker")
1339 (description "@code{h5check} is a validation tool for verifying that an
1340 HDF5 file is encoded according to the HDF File Format Specification.")
1341 (license (license:x11-style "file://COPYING"))))
1349 (uri (string-append "mirror://sourceforge/itpp/itpp/"
1354 "14ddy2xnb6sgp4hiax9v5sv4pr4l4dd4ps76nfha3nrpr1ikhcqm"))))
1355 (build-system cmake-build-system)
1356 (arguments `(#:tests? #f)) ; Tests require googletest *sources*
1357 (inputs `(("lapack" ,lapack)
1359 ;; FIXME: Even though the fonts are available dvips complains:
1360 ;; "Font cmmi10 not found; characters will be left blank."
1362 `(("texlive" ,texlive-tiny)
1363 ("ghostscript" ,ghostscript)
1364 ("doxygen" ,doxygen)))
1365 (home-page "http://itpp.sourceforge.net")
1366 (synopsis "C++ library of maths, signal processing and communication classes")
1367 (description "IT++ is a C++ library of mathematical, signal processing and
1368 communication classes and functions. Its main use is in simulation of
1369 communication systems and for performing research in the area of
1370 communications. The kernel of the library consists of generic vector and
1371 matrix classes, and a set of accompanying routines. Such a kernel makes IT++
1372 similar to MATLAB, GNU Octave or SciPy.")
1373 (license license:gpl3+)))
1375 (define-public netcdf
1382 (uri (string-append "ftp://ftp.unidata.ucar.edu/pub/netcdf/"
1383 "netcdf-" version ".tar.gz"))
1386 "1blc7ik5yin7i0ls2kag0a9xjk12m0dzx6v1x88az3ras3scci2d"))
1387 (patches (search-patches "netcdf-date-time.patch"
1388 "netcdf-tst_h_par.patch"))))
1389 (build-system gnu-build-system)
1392 ("doxygen" ,doxygen)
1393 ("graphviz" ,graphviz)))
1395 `(("hdf4" ,hdf4-alt)
1398 ("libjpeg" ,libjpeg-turbo)))
1400 `(#:configure-flags '("--enable-doxygen" "--enable-dot" "--enable-hdf4")
1402 #:phases (modify-phases %standard-phases
1403 (add-before 'configure 'fix-source-date
1405 ;; As we ${SOURCE_DATE_EPOCH} evaluates to "1" in the build
1406 ;; environment, `date -u -d ${SOURCE_DATE_EPOCH}` will evaluate
1407 ;; to '1st hour of the current day', and therefore makes the
1408 ;; package not reproducible.
1409 (substitute* "./configure"
1410 (("date -u -d \"\\$\\{SOURCE_DATE_EPOCH\\}\"")
1411 "date --date='@0'"))
1413 (add-after 'configure 'patch-settings
1415 ;; libnetcdf.settings contains the full filename of the compilers
1416 ;; used to build the library. We truncate the hashes of those
1417 ;; filenames to avoid unnecessary references to the corresponding
1419 (substitute* "libnetcdf.settings"
1420 (("(/gnu/store/)([a-Z0-9]*)" all prefix hash)
1421 (string-append prefix (string-take hash 10) "...")))
1424 #:parallel-tests? #f)) ;various race conditions
1425 (home-page "https://www.unidata.ucar.edu/software/netcdf/")
1426 (synopsis "Library for scientific data")
1427 (description "NetCDF is an interface for scientific data access and a
1428 software library that provides an implementation of the interface. The netCDF
1429 library defines a machine-independent format for representing scientific data.
1430 Together, the interface, library, and format support the creation, access, and
1431 sharing of scientific data.")
1432 (license (license:x11-style "file://COPYRIGHT"))))
1434 (define-public netcdf-parallel-openmpi
1435 (package (inherit netcdf)
1436 (name "netcdf-parallel-openmpi")
1439 ,@(alist-replace "hdf5" (list hdf5-parallel-openmpi)
1440 (package-inputs netcdf))))
1441 ;; TODO: Replace pkg-config references in nc-config with absolute references
1443 (substitute-keyword-arguments (package-arguments netcdf)
1444 ((#:configure-flags flags)
1445 `(cons* "CC=mpicc" "CXX=mpicxx"
1446 "--enable-parallel-tests"
1447 ;; Shared libraries not supported with parallel IO.
1448 "--disable-shared" "--with-pic"
1451 (define-public netcdf-fortran
1453 (name "netcdf-fortran")
1458 "ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-fortran-"
1462 "0xaxdcg1p83zmypwml3swsnr3ccn38inwldyr1l3wa4dbwbrblxj"))))
1463 (build-system gnu-build-system)
1465 `(#:parallel-tests? #f))
1467 `(("netcdf" ,netcdf)))
1469 `(("gfortran" ,gfortran)))
1470 (synopsis "Fortran interface for the netCDF library")
1471 (description (package-description netcdf))
1472 (home-page (package-home-page netcdf))
1473 (license (package-license netcdf))))
1475 (define-public nlopt
1481 (uri (string-append "http://ab-initio.mit.edu/nlopt/nlopt-"
1484 (base32 "12cfkkhcdf4zmb6h7y6qvvdvqjs2xf9sjpa3rl3bq76px4yn76c0"))))
1485 (build-system gnu-build-system)
1487 `(;; Shared libraries are not built by default. They are required to
1488 ;; build the Guile, Octave, and Python bindings.
1489 #:configure-flags '("--enable-shared")
1492 (modify-phases %standard-phases
1493 (add-before 'configure 'set-libnlopt-file-name
1494 (lambda* (#:key outputs #:allow-other-keys)
1495 ;; Make sure the Scheme module refers to the library by its
1496 ;; absolute file name (we cannot do that from a snippet
1497 ;; because the expansion of @libdir@ contains
1499 (let ((out (assoc-ref outputs "out")))
1500 (substitute* "swig/nlopt.scm.in"
1502 (string-append out "/lib/libnlopt")))
1504 (inputs `(("guile" ,guile-2.0)))
1505 (native-inputs `(("pkg-config" ,pkg-config)))
1506 (home-page "http://ab-initio.mit.edu/wiki/")
1507 (synopsis "Library for nonlinear optimization")
1508 (description "NLopt is a library for nonlinear optimization, providing a
1509 common interface for a number of different free optimization routines available
1510 online as well as original implementations of various other algorithms.")
1511 (license license:lgpl2.1+)))
1513 (define-public ipopt
1520 "http://www.coin-or.org/download/source/Ipopt/Ipopt-"
1524 "07yn9rzdswjk8n246qq6ci9ssf2bcplkifcpsfz9j6cdxw9vgbkv"))
1525 (modules '((guix build utils)))
1527 ;; Make sure we don't use the bundled software.
1529 (delete-file-recursively "ThirdParty")
1531 (build-system gnu-build-system)
1533 '(#:phases (modify-phases %standard-phases
1534 (add-after 'install 'add--L-flags-in-ipopt.pc
1535 (lambda* (#:key inputs outputs #:allow-other-keys)
1536 ;; The '.pc' file lists '-llapack -lblas' in "Libs";
1537 ;; move it to "Libs.private" where it belongs, and add a
1538 ;; '-L' flag for LAPACK.
1539 (let ((out (assoc-ref outputs "out"))
1540 (lapack (assoc-ref inputs "lapack")))
1541 (substitute* (string-append out "/lib/pkgconfig/"
1543 (("Libs: (.*)-llapack -lblas(.*)$" _ before after)
1544 (string-append "Libs: " before " " after "\n"
1545 "Libs.private: " before
1546 "-L" lapack "/lib -llapack -lblas "
1550 `(("gfortran" ,gfortran)))
1552 ;; TODO: Maybe add dependency on COIN-MUMPS, ASL, and HSL.
1553 `(("lapack" ,lapack))) ;for both libblas and liblapack
1554 (home-page "http://www.coin-or.org")
1555 (synopsis "Large-scale nonlinear optimizer")
1557 "The Interior Point Optimizer (IPOPT) is a software package for
1558 large-scale nonlinear optimization. It provides C++, C, and Fortran
1560 (license license:epl1.0)))
1568 (uri (string-append "https://www.coin-or.org/download/source/"
1569 "Clp/Clp-" version ".tgz"))
1572 "1wdg820g3iikf9344ijwsc8sy6c0m6im42bzzizm6rlmkvnmxhk9"))
1573 (modules '((guix build utils)))
1575 ;; Make sure we don't use the bundled software.
1577 (delete-file-recursively "ThirdParty")
1579 (build-system gnu-build-system)
1581 `(("gfortran" ,gfortran)
1582 ("pkg-config" ,pkg-config)))
1584 `(("openblas" ,openblas)))
1585 (home-page "https://www.coin-or.org")
1586 (synopsis "Linear programming solver")
1588 "CLP is a high quality linear programming solver. Its main strengths are
1589 its dual and primal Simplex algorithms. It also has a barrier algorithm for
1590 linear and quadratic objectives. There are limited facilities for nonlinear
1591 and quadratic objectives using the Simplex algorithm.")
1592 (license license:epl1.0)))
1594 (define-public ceres
1596 (name "ceres-solver")
1598 (home-page "http://ceres-solver.org/")
1601 (uri (string-append home-page "ceres-solver-"
1605 "13lfxy8x58w8vprr0nkbzziaijlh0vvqshgahvcgw0mrqdgh0i27"))))
1606 (build-system cmake-build-system)
1608 ;; TODO: Build HTML user documentation and install separately.
1609 '(#:configure-flags '("-DBUILD_EXAMPLES=OFF"
1610 "-DBUILD_SHARED_LIBS=ON")
1612 #:phases (modify-phases %standard-phases
1613 (add-before 'configure 'set-library-directory
1615 ;; Install libraries to lib/, not lib64/.
1616 (substitute* "internal/ceres/CMakeLists.txt"
1617 (("set\\(LIB_SUFFIX \"64\"\\)")
1618 "set(LIB_SUFFIX \"\")"))
1621 `(("pkg-config" ,pkg-config)))
1623 `(("glog" ,glog))) ;for #include <glog/glog.h>
1628 ("suitesparse" ,suitesparse)
1629 ("gflags" ,gflags)))
1630 (synopsis "C++ library for solving large optimization problems")
1632 "Ceres Solver is a C++ library for modeling and solving large,
1633 complicated optimization problems. It is a feature rich, mature and
1634 performant library which has been used in production since 2010. Ceres Solver
1635 can solve two kinds of problems:
1637 @item non-linear least squares problems with bounds constraints;
1638 @item general unconstrained optimization problems.
1640 (license license:bsd-3)))
1642 ;; For a fully featured Octave, users are strongly recommended also to install
1643 ;; the following packages: less, ghostscript, gnuplot.
1644 (define-public octave-cli
1651 (uri (string-append "mirror://gnu/octave/octave-"
1655 "1848dq6nxzal8gwjrcp6xhi5gq96w89nss9d9rz75q408gb3mbl6"))))
1656 (build-system gnu-build-system)
1658 `(("alsa-lib" ,alsa-lib)
1659 ("arpack" ,arpack-ng)
1665 ("fontconfig" ,fontconfig)
1666 ("freetype" ,freetype)
1670 ("graphicsmagick" ,graphicsmagick)
1672 ;; TODO: libjpeg-turbo is indirectly required through libtiff. In
1673 ;; the next rebuild cycle, add an absolute reference for -ljpeg in
1674 ;; libtiff.la instead of having to provide it here.
1675 ("libjpeg" ,libjpeg-turbo)
1679 ("libsndfile" ,libsndfile)
1683 ("portaudio" ,portaudio)
1685 ("readline" ,readline)
1686 ("suitesparse" ,suitesparse)
1687 ("texinfo" ,texinfo)
1691 ("gfortran" ,gfortran)
1692 ("pkg-config" ,pkg-config)
1694 ;; The following inputs are not actually used in the build process.
1695 ;; However, the ./configure gratuitously tests for their existence and
1696 ;; assumes that programs not present at build time are also not, and
1697 ;; can never be, available at run time! If these inputs are therefore
1698 ;; not present, support for them will be built out. However, Octave
1699 ;; will still run without them, albeit without the features they
1702 ("ghostscript" ,ghostscript)
1703 ("gnuplot" ,gnuplot)))
1704 ;; Octave code uses this variable to detect directories holding multiple CA
1705 ;; certificates to verify peers with. This is required for the networking
1706 ;; functions that require encryption to work properly.
1707 (native-search-paths
1708 (list (search-path-specification
1709 (variable "CURLOPT_CAPATH")
1710 (files '("etc/ssl/certs")))))
1713 (list (string-append "--with-shell="
1714 (assoc-ref %build-inputs "bash")
1717 ;; XXX: Without this flag, linking octave-cli fails with
1718 ;; undefined references to 'logf@GLIBCXX_3.4' et.al. due to
1719 ;; not pulling in liboctinterp.la for -lstdc++.
1720 "--enable-link-all-dependencies")
1722 (modify-phases %standard-phases
1723 (add-after 'configure 'configure-makeinfo
1724 (lambda* (#:key inputs #:allow-other-keys)
1725 (substitute* "libinterp/corefcn/help.h"
1728 "\"" (assoc-ref inputs "texinfo") "/bin/makeinfo\"")))
1730 (home-page "https://www.gnu.org/software/octave/")
1731 (synopsis "High-level language for numerical computation")
1732 (description "GNU Octave is a high-level interpreted language that is
1733 specialized for numerical computations. It can be used for both linear and
1734 non-linear applications and it provides great support for visualizing results.
1735 Work may be performed both at the interactive command-line as well as via
1737 (license license:gpl3+)))
1739 (define-public octave
1740 (package (inherit octave-cli)
1743 (inherit (package-source octave-cli))))
1745 `(("qscintilla" ,qscintilla)
1747 ,@(package-inputs octave-cli)))
1749 `(("qttools" , qttools) ;for lrelease
1750 ("texlive" ,(texlive-union (list texlive-epsf))) ; for texi2dvi
1751 ,@(package-native-inputs octave-cli)))
1753 (substitute-keyword-arguments (package-arguments octave-cli)
1755 `(modify-phases ,phases
1756 (add-before 'configure 'patch-qscintilla-library-name
1757 (lambda* (#:key inputs #:allow-other-keys)
1758 ;; The QScintilla library that the Octave configure script tries
1759 ;; to link with should be named libqscintilla-qt5.so, but the
1760 ;; QScintilla input provides the shared library as
1761 ;; libqscintilla2_qt5.so.
1762 (substitute* "configure"
1763 (("qscintilla2-qt5")
1767 (define-public opencascade-oce
1769 (name "opencascade-oce")
1775 (url "https://github.com/tpaviot/oce.git")
1776 (commit (string-append "OCE-" version))))
1777 (file-name (git-file-name name version))
1778 (patches (search-patches "opencascade-oce-glibc-2.26.patch"))
1780 (base32 "0rg5wzkvfmzfl6v2amyryb8dnjad0nn9kyr607wy2gch6rciah69"))))
1781 (build-system cmake-build-system)
1784 (list "-DOCE_TESTING:BOOL=ON"
1785 "-DOCE_USE_TCL_TEST_FRAMEWORK:BOOL=ON"
1786 "-DOCE_DRAW:BOOL=ON"
1787 (string-append "-DOCE_INSTALL_PREFIX:PATH="
1788 (assoc-ref %outputs "out"))
1789 "-UCMAKE_INSTALL_RPATH")))
1791 `(("freetype" ,freetype)
1798 `(("python" ,python-wrapper)))
1799 (home-page "https://github.com/tpaviot/oce")
1800 (synopsis "Libraries for 3D modeling and numerical simulation")
1802 "Open CASCADE is a set of libraries for the development of applications
1803 dealing with 3D CAD data or requiring industrial 3D capabilities. It includes
1804 C++ class libraries providing services for 3D surface and solid modeling, CAD
1805 data exchange, and visualization. It is used for development of specialized
1806 software dealing with 3D models in design (CAD), manufacturing (CAM),
1807 numerical simulation (CAE), measurement equipment (CMM), and quality
1808 control (CAQ) domains.
1810 This is the ``Community Edition'' (OCE) of Open CASCADE, which gathers
1811 patches, improvements, and experiments contributed by users over the official
1812 Open CASCADE library.")
1813 (license (list license:lgpl2.1; OCE libraries, with an exception for the
1814 ; use of header files; see
1815 ; OCCT_LGPL_EXCEPTION.txt
1816 license:public-domain; files
1817 ; src/Standard/Standard_StdAllocator.hxx and
1818 ; src/NCollection/NCollection_StdAllocator.hxx
1819 license:expat; file src/OpenGl/OpenGl_glext.h
1820 license:bsd-3)))); test framework gtest
1822 (define-public opencascade-occt
1824 (name "opencascade-occt")
1830 (url "https://git.dev.opencascade.org/repos/occt.git")
1833 (string-map (lambda (x) (if (eq? x #\.) #\_ x))
1835 (file-name (git-file-name name version))
1837 (base32 "0bdywwxb6mk0ykbiajlvsb37295akqjp0a60y672qjfa67k0ljv4"))
1838 (modules '((guix build utils)))
1841 ;; Remove files specific to non-free operating systems.
1842 (delete-file-recursively "samples/ios")
1843 (delete-file-recursively "samples/mfc")
1844 (delete-file-recursively "samples/qt/FuncDemo")
1845 (delete-file "genconf.bat")
1846 (delete-file "gendoc.bat")
1847 (delete-file "genproj.bat")
1848 (delete-file "upgrade.bat")
1849 ;; Remove references to deleted files.
1850 (substitute* "dox/FILES_HTML.txt"
1851 ((".*standard.*") "" )
1852 ((".*UIKitSample.*") ""))
1854 (build-system cmake-build-system)
1856 '(;; There is no test target for make. OCCT provides an
1857 ;; 'Automated Testing System', which may be accessed after
1858 ;; installation via the draw.sh script. draw.sh is located in
1859 ;; the bin directory. For details see:
1860 ;; https://www.opencascade.com/doc/occt-7.3.0/overview/html/\
1861 ;; occt_dev_guides__tests.html
1863 ;; Configure without freeimage: attempting to link against the
1864 ;; freeimage version 3.17 library leads to 'undefined
1865 ;; reference' errors.
1867 (list "-DUSE_FREEIMAGE:BOOL=OFF"
1869 "-DUSE_VTK:BOOL=OFF"
1870 "-DBUILD_DOC_Overview:BOOL=OFF"
1871 "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON"
1872 "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON"
1873 "-UCMAKE_INSTALL_LIBDIR")))
1875 `(("doxygen" ,doxygen)
1876 ;("freeimage" ,freeimage)
1877 ("freetype" ,freetype)
1879 ("libxext" ,libxext)
1886 ;; TODO: build Overview documentation and add 'doc' output.
1887 (home-page "https://www.opencascade.com")
1888 (synopsis "Libraries for 3D modeling and numerical simulation")
1890 "Open CASCADE is a set of libraries for the development of applications
1891 dealing with 3D CAD data or requiring industrial 3D capabilities. It includes
1892 C++ class libraries providing services for 3D surface and solid modeling, CAD
1893 data exchange, and visualization. It is used for development of specialized
1894 software dealing with 3D models in design (CAD), manufacturing (CAM),
1895 numerical simulation (CAE), measurement equipment (CMM), and quality
1896 control (CAQ) domains.
1898 This is the certified version of the Open Cascade Technology (OCCT) library.")
1899 (license (list ;; OCCT library:
1900 license:lgpl2.1; with an exception for the use of header
1901 ; files, see OCCT_LGPL_EXCEPTION.txt.
1902 ;; Files src/OpenGl/glext.h, adm/cmake/cotire.cmake and
1903 ;; src/OpenGl/OpenGl_HaltonSampler.hxx:
1905 ;; Files src/ExprIntrp/ExprIntrp.tab.* and
1906 ;; src/StepFile/step.tab.*:
1907 license:gpl3+ ; with Bison 2.2 exception.
1908 ;; File src/NCollection/NCollection_UtfIterator.lxx:
1909 (license:non-copyleft
1910 "https://www.unicode.org/license.html")
1911 ;; File src/NCollection/NCollection_StdAllocator.hxx:
1912 license:public-domain))))
1922 (url "https://gitlab.onelab.info/gmsh/gmsh.git")
1924 (string-append "gmsh_"
1925 (string-map (lambda (x) (if (eq? x #\.) #\_ x))
1927 (file-name (git-file-name name version))
1929 (base32 "08rq4jajwmlpivnm9yifz2jhaivnz065lnk0h2zv773nwl9wf162"))
1930 (modules '((guix build utils)))
1932 ;; Remove non-free METIS code
1934 (delete-file-recursively "contrib/Metis")
1936 (build-system cmake-build-system)
1939 ("gfortran" ,gfortran)
1945 ("opencascade-oce" ,opencascade-oce)
1947 ("libxext" ,libxext)))
1949 `(("fontconfig" ,fontconfig)
1950 ("libxft" ,libxft)))
1952 `(#:configure-flags `("-DENABLE_METIS:BOOL=OFF"
1953 "-DENABLE_BUILD_SHARED:BOOL=ON"
1954 "-DENABLE_BUILD_DYNAMIC:BOOL=ON")))
1955 (home-page "http://gmsh.info/")
1956 (synopsis "3D finite element grid generator")
1957 (description "Gmsh is a 3D finite element grid generator with a built-in
1958 CAD engine and post-processor. Its design goal is to provide a fast, light
1959 and user-friendly meshing tool with parametric input and advanced
1960 visualization capabilities. Gmsh is built around four modules: geometry,
1961 mesh, solver and post-processing. The specification of any input to these
1962 modules is done either interactively using the graphical user interface or in
1963 ASCII text files using Gmsh's own scripting language.")
1964 (license license:gpl2+)))
1966 (define-public maxflow
1969 ;; Versioning is ambiguous: the git tag matching this commit is ‘3.0.5’,
1970 ;; which matches CMakeLists.txt, but README.md and CHANGES say ‘3.04’.
1975 (url "https://github.com/gerddie/maxflow.git")
1977 (file-name (git-file-name name version))
1980 "0rll38whw55h0vcjrrwdnh9ascvxby0ph7n1l0d12z17cg215kkb"))))
1981 (build-system cmake-build-system)
1982 (home-page "https://pub.ist.ac.at/~vnk/software.html")
1983 (synopsis "Library implementing Maxflow algorithm")
1984 (description "An implementation of the maxflow algorithm described in
1985 @cite{An Experimental Comparison of Min-Cut/Max-Flow Algorithms for
1986 Energy Minimization in Computer Vision.\n
1987 Yuri Boykov and Vladimir Kolmogorov.\n
1988 In IEEE Transactions on Pattern Analysis and Machine Intelligence,\n
1990 (license license:gpl3+)))
1992 (define-public petsc
1999 ;; The *-lite-* tarball does not contain the *large* documentation
2000 (uri (string-append "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/"
2001 "petsc-lite-" version ".tar.gz"))
2003 (base32 "1645nwwcp9bcnfnxikk480mhbbacdvhsay2c401818hk97dqj5nx"))))
2004 (outputs '("out" ; libraries and headers
2005 "examples")) ; ~30MiB of examples
2006 (build-system gnu-build-system)
2008 `(("python" ,python-2)))
2010 `(("gfortran" ,gfortran)
2012 ("superlu" ,superlu)
2013 ;; leaving out hdf5 and fftw, as petsc expects them to be built with mpi
2014 ;; leaving out opengl, as configuration seems to only be for mac
2017 `(#:test-target "test"
2018 #:parallel-build? #f ; build is parallel by default
2024 ;; Honor (parallel-job-count) for build. Do not use --with-make-np,
2025 ;; whose value is dumped to $out/lib/petsc/conf/petscvariables.
2026 (list (format #f "MAKE_NP=~a" (parallel-job-count)))
2028 (modify-phases %standard-phases
2030 ;; PETSc's configure script is actually a python script, so we can't
2031 ;; run it with bash.
2032 (lambda* (#:key outputs (configure-flags '())
2034 (let* ((prefix (assoc-ref outputs "out"))
2035 (flags `(,(string-append "--prefix=" prefix)
2036 ,@configure-flags)))
2037 (format #t "build directory: ~s~%" (getcwd))
2038 (format #t "configure flags: ~s~%" flags)
2039 (apply invoke "./configure" flags))))
2040 (add-after 'configure 'clean-local-references
2041 (lambda* (#:key outputs #:allow-other-keys)
2042 (let ((out (assoc-ref outputs "out")))
2043 (substitute* (find-files "." "^petsc(conf|machineinfo).h$")
2044 ;; Prevent build directory from leaking into compiled code
2046 ;; Scrub timestamp for reproducibility
2047 ((".*Libraries compiled on.*") ""))
2048 (substitute* (find-files "." "petscvariables")
2049 ;; Do not expose build machine characteristics, set to defaults.
2050 (("MAKE_NP = [:digit:]+") "MAKE_NP = 2")
2051 (("NPMAX = [:digit:]+") "NPMAX = 2"))
2053 (add-after 'install 'clean-install
2054 ;; Try to keep installed files from leaking build directory names.
2055 (lambda* (#:key inputs outputs #:allow-other-keys)
2056 (let ((out (assoc-ref outputs "out")))
2057 (substitute* (map (lambda (file)
2058 (string-append out "/lib/petsc/conf/" file))
2059 '("petscvariables"))
2061 ;; Make compiler references point to the store
2062 (substitute* (string-append out "/lib/petsc/conf/petscvariables")
2063 (("= (gcc|g\\+\\+|gfortran)" _ compiler)
2064 (string-append "= " (which compiler))))
2065 ;; PETSc installs some build logs, which aren't necessary.
2066 (for-each (lambda (file)
2067 (let ((f (string-append out "/lib/petsc/conf/" file)))
2068 (when (file-exists? f)
2070 '("configure.log" "make.log" "gmake.log"
2071 "test.log" "error.log" "RDict.db"
2072 "PETScBuildInternal.cmake"
2073 ;; Once installed, should uninstall with Guix
2076 (add-after 'install 'move-examples
2077 (lambda* (#:key outputs #:allow-other-keys)
2078 (let* ((out (assoc-ref outputs "out"))
2079 (examples (assoc-ref outputs "examples"))
2080 (exdir (string-append out "/share/petsc/examples"))
2081 (exdir' (string-append examples "/share/petsc/examples")))
2082 (copy-recursively exdir exdir')
2083 (delete-file-recursively exdir)
2085 (home-page "https://www.mcs.anl.gov/petsc")
2086 (synopsis "Library to solve PDEs")
2087 (description "PETSc, pronounced PET-see (the S is silent), is a suite of
2088 data structures and routines for the scalable (parallel) solution of
2089 scientific applications modeled by partial differential equations.")
2090 (license (license:non-copyleft
2091 "https://www.mcs.anl.gov/petsc/documentation/copyright.html"))))
2093 (define-public petsc-complex
2094 (package (inherit petsc)
2095 (name "petsc-complex")
2097 (substitute-keyword-arguments (package-arguments petsc)
2098 ((#:configure-flags cf)
2099 `(cons "--with-scalar-type=complex" ,cf))))
2100 (synopsis "Library to solve PDEs (with complex scalars)")))
2102 (define-public petsc-openmpi
2103 (package (inherit petsc)
2104 (name "petsc-openmpi")
2106 `(("hdf5" ,hdf5-parallel-openmpi)
2107 ("hypre" ,hypre-openmpi)
2109 ("mumps" ,mumps-openmpi)
2110 ("openmpi" ,openmpi)
2111 ("scalapack" ,scalapack)
2112 ("scotch" ,pt-scotch32)
2113 ,@(package-inputs petsc)))
2115 (substitute-keyword-arguments (package-arguments petsc)
2116 ((#:configure-flags cf)
2118 "--with-mpiexec=mpirun"
2121 "--with-scalapack=1"
2123 ,(string-append "--with-mpi-dir="
2124 (assoc-ref %build-inputs "openmpi"))
2125 ,(string-append "--with-hdf5-include="
2126 (assoc-ref %build-inputs "hdf5") "/include")
2127 ,(string-append "--with-hdf5-lib="
2128 (assoc-ref %build-inputs "hdf5") "/lib/libhdf5.a")
2129 ,@(delete "--with-mpi=0" ,cf)))
2131 `(modify-phases ,phases
2132 (add-before 'configure 'mpi-setup
2133 ,%openmpi-setup)))))
2134 (synopsis "Library to solve PDEs (with MUMPS and MPI support)")))
2136 (define-public petsc-complex-openmpi
2137 (package (inherit petsc-complex)
2138 (name "petsc-complex-openmpi")
2140 `(("openmpi" ,openmpi)
2141 ,@(package-inputs petsc-complex)))
2143 (substitute-keyword-arguments (package-arguments petsc-complex)
2144 ((#:configure-flags cf)
2145 ``("--with-mpiexec=mpirun"
2146 ,(string-append "--with-mpi-dir="
2147 (assoc-ref %build-inputs "openmpi"))
2148 ,@(delete "--with-mpi=0" ,cf)))
2150 `(modify-phases ,phases
2151 (add-before 'configure 'mpi-setup
2152 ,%openmpi-setup)))))
2153 (synopsis "Library to solve PDEs (with complex scalars and MPI support)")))
2155 (define-public python-petsc4py
2157 (name "python-petsc4py")
2162 (uri (pypi-uri "petsc4py" version))
2165 "1rm1qj5wlkhxl39by9n78lh3gbmii31wsnb8j1rr5hvfr5xgbx2q"))))
2166 (build-system python-build-system)
2169 (modify-phases %standard-phases
2170 (add-before 'build 'pre-build
2172 ;; Define path to PETSc installation.
2173 (setenv "PETSC_DIR" (assoc-ref %build-inputs "petsc"))
2175 (add-before 'check 'mpi-setup
2178 `(("petsc" ,petsc-openmpi)
2179 ("python-numpy" ,python-numpy)))
2180 (home-page "https://bitbucket.org/petsc/petsc4py/")
2181 (synopsis "Python bindings for PETSc")
2182 (description "PETSc, the Portable, Extensible Toolkit for
2183 Scientific Computation, is a suite of data structures and routines for
2184 the scalable (parallel) solution of scientific applications modeled by
2185 partial differential equations. It employs the MPI standard for all
2186 message-passing communication. @code{petsc4py} provides Python
2187 bindings to almost all functions of PETSc.")
2188 (license license:bsd-3)))
2190 (define-public python-kiwisolver
2192 (name "python-kiwisolver")
2196 (uri (pypi-uri "kiwisolver" version))
2199 "0y22ci86znwwwfhbmvbgdfnbi6lv5gv2xkdlxvjw7lml43ayafyf"))))
2200 (build-system python-build-system)
2201 (home-page "https://github.com/nucleic/kiwi")
2202 (synopsis "Fast implementation of the Cassowary constraint solver")
2204 "Kiwi is an efficient C++ implementation of the Cassowary constraint
2205 solving algorithm. Kiwi has been designed from the ground up to be
2206 lightweight and fast. Kiwi ranges from 10x to 500x faster than the original
2207 Cassowary solver with typical use cases gaining a 40x improvement. Memory
2208 savings are consistently > 5x.")
2209 (license license:bsd-3)))
2211 (define-public python2-kiwisolver
2212 (package-with-python2 python-kiwisolver))
2214 (define-public slepc
2221 (uri (string-append "http://slepc.upv.es/download/distrib/slepc-"
2225 "1yq84q9wannc8xwapxpay4ypdd675picwi395hhsdvng9q6hf5j8"))))
2226 (build-system gnu-build-system)
2228 `(("python" ,python-2)
2229 ("petsc:examples" ,petsc "examples"))) ;for gmakegen.py script
2231 `(("arpack" ,arpack-ng)
2232 ("gfortran" ,gfortran)))
2234 `(("petsc" ,petsc)))
2236 `(#:parallel-build? #f ;build is parallel by default
2238 `(,(string-append "--with-arpack-dir="
2239 (assoc-ref %build-inputs "arpack") "/lib"))
2240 #:make-flags ;honor (parallel-job-count)
2241 `(,(format #f "MAKE_NP=~a" (parallel-job-count))
2242 ,(string-append "PETSCCONFIGDIR="
2243 (assoc-ref %build-inputs "petsc:examples")
2244 "/share/petsc/examples/config"))
2246 (modify-phases %standard-phases
2248 ;; configure is a python script, so we can't run it with bash.
2249 (lambda* (#:key inputs outputs (configure-flags '())
2251 (let* ((prefix (assoc-ref outputs "out"))
2252 (flags `(,(string-append "--prefix=" prefix)
2253 ,@configure-flags)))
2254 (format #t "build directory: ~s~%" (getcwd))
2255 (format #t "configure flags: ~s~%" flags)
2256 (setenv "SLEPC_DIR" (getcwd))
2257 (setenv "PETSC_DIR" (assoc-ref inputs "petsc"))
2258 (apply invoke "./configure" flags))))
2259 (add-after 'install 'delete-doc
2260 ;; TODO: SLEPc installs HTML documentation alongside headers in
2261 ;; $out/include. We'd like to move them to share/doc, but delete
2262 ;; them for now, as they are incomplete and installing the complete
2263 ;; documentation is difficult.
2264 (lambda* (#:key outputs #:allow-other-keys)
2265 (let* ((out (assoc-ref outputs "out")))
2266 (for-each delete-file (find-files out "\\.html$"))
2268 (add-after 'install 'clean-install
2269 ;; Clean up unnecessary build logs from installation.
2270 (lambda* (#:key outputs #:allow-other-keys)
2271 (let ((out (assoc-ref outputs "out")))
2272 (for-each (lambda (file)
2273 (let ((f (string-append out "/lib/slepc/conf/" file)))
2274 (when (file-exists? f)
2276 '("configure.log" "make.log" "gmake.log"
2277 "test.log" "error.log" "RDict.db"
2280 (home-page "http://slepc.upv.es")
2281 (synopsis "Scalable library for eigenproblems")
2282 (description "SLEPc is a software library for the solution of large sparse
2283 eigenproblems on parallel computers. It can be used for the solution of
2284 linear eigenvalue problems formulated in either standard or generalized form,
2285 as well as other related problems such as the singular value decomposition.
2286 The emphasis of the software is on methods and techniques appropriate for
2287 problems in which the associated matrices are sparse, for example, those
2288 arising after the discretization of partial differential equations.")
2289 (license license:bsd-2)))
2291 (define-public slepc-complex
2292 (package (inherit slepc)
2293 (name "slepc-complex")
2295 `(("petsc" ,petsc-complex)
2296 ,@(alist-delete "petsc" (package-propagated-inputs slepc))))
2297 (synopsis "Scalable library for eigenproblems (with complex scalars)")))
2299 (define-public slepc-openmpi
2300 (package (inherit slepc)
2301 (name "slepc-openmpi")
2303 (substitute-keyword-arguments (package-arguments slepc)
2304 ((#:phases phases '%standard-phases)
2305 `(modify-phases ,phases
2306 (add-before 'check 'mpi-setup
2307 ,%openmpi-setup)))))
2310 ("arpack" ,arpack-ng-openmpi)
2311 ,@(alist-delete "arpack" (package-inputs slepc))))
2313 `(("petsc" ,petsc-openmpi)
2314 ,@(alist-delete "petsc" (package-propagated-inputs slepc))))
2315 (synopsis "Scalable library for eigenproblems (with MPI support)")))
2317 (define-public slepc-complex-openmpi
2318 (package (inherit slepc-openmpi)
2319 (name "slepc-complex-openmpi")
2321 `(("petsc" ,petsc-complex-openmpi)
2322 ,@(alist-delete "petsc" (package-propagated-inputs slepc-openmpi))))
2323 (synopsis "Scalable library for eigenproblems (with complex scalars and MPI support)")))
2325 (define-public python-slepc4py
2327 (name "python-slepc4py")
2332 (uri (pypi-uri "slepc4py" version))
2335 "1ksp08kxf4wg408b9nn39z3qfhy643j22d4rfbl30vzxk2rxh4lq"))))
2336 (build-system python-build-system)
2339 (modify-phases %standard-phases
2340 (add-before 'build 'pre-build
2342 ;; Define path to PETSc installation.
2343 (setenv "PETSC_DIR" (assoc-ref %build-inputs "petsc"))
2344 ;; Define path to SLEPc installation.
2345 (setenv "SLEPC_DIR" (assoc-ref %build-inputs "slepc"))
2347 (add-before 'check 'mpi-setup
2350 `(("python-numpy" ,python-numpy)
2351 ("python-petsc4py" ,python-petsc4py)
2352 ("slepc" ,slepc-openmpi)))
2353 (home-page "https://bitbucket.org/slepc/slepc4py/")
2354 (synopsis "Python bindings for SLEPc")
2355 (description "SLEPc, the Scalable Library for Eigenvalue Problem
2356 Computations, is based on PETSc, the Portable, Extensible Toolkit for
2357 Scientific Computation. It employs the MPI standard for all
2358 message-passing communication. @code{slepc4py} provides Python
2359 bindings to almost all functions of SLEPc.")
2360 (license license:bsd-3)))
2362 (define-public mumps
2369 (uri (string-append "http://mumps.enseeiht.fr/MUMPS_"
2373 "0jklh54x4y3ik1zkw6db7766kakjm5910diyaghfxxf8vwsgr26r"))
2374 (patches (search-patches "mumps-build-parallelism.patch"
2375 "mumps-shared-libseq.patch"
2376 "mumps-shared-mumps.patch"
2377 "mumps-shared-pord.patch"))))
2378 (build-system gnu-build-system)
2380 `(("fortran" ,gfortran)
2381 ;; These are required for linking against mumps, but we let the user
2382 ;; declare the dependency.
2385 ("scotch" ,scotch)))
2387 `(#:modules ((ice-9 match)
2390 ,@%gnu-build-system-modules)
2392 (modify-phases %standard-phases
2394 (lambda* (#:key inputs #:allow-other-keys)
2395 (call-with-output-file "Makefile.inc"
2406 INCSEQ = -I$(topdir)/libseq
2407 LIBSEQ = $(topdir)/libseq/libmpiseq.a
2408 LIBSEQNEEDED = libseqneeded~;
2412 AR = ar vr # rules require trailing space, ugh...
2415 LIBBLAS = -Wl,-rpath=$(BLASDIR) -Wl,-rpath='$$ORIGIN' -L$(BLASDIR) -lopenblas~@[
2417 SCALAP = -Wl,-rpath=$(SCALAPDIR) -Wl,-rpath='$$ORIGIN' -L$(SCALAPDIR) -lscalapack~]
2418 LIBOTHERS = -pthread
2421 OPTF = -O2 -DALLOW_NON_INIT $(PIC)
2425 LIBS = $(SCALAP) $(LIBSEQ)
2426 LPORDDIR = $(topdir)/PORD/lib
2427 IPORD = -I$(topdir)/PORD/include
2428 LPORD = $(LPORDDIR)/libpord.a
2429 ORDERINGSF = -Dpord~@[
2431 IMETIS = -I$(METISDIR)/include
2432 LMETIS = -Wl,-rpath $(METISDIR)/lib -L$(METISDIR)/lib -lmetis
2433 ORDERINGSF += -Dmetis~]~@[~:{
2435 ISCOTCH = -I$(SCOTCHDIR)/include
2436 LSCOTCH = -Wl,-rpath $(SCOTCHDIR)/lib -L$(SCOTCHDIR)/lib ~a-lesmumps -lscotch -lscotcherr
2437 ORDERINGSF += ~a~}~]
2438 ORDERINGSC = $(ORDERINGSF)
2439 LORDERINGS = $(LPORD) $(LMETIS) $(LSCOTCH) $(LIBSEQ)
2440 IORDERINGSF = $(ISCOTCH)
2441 IORDERINGSC = $(IPORD) $(IMETIS) $(ISCOTCH)"
2442 (assoc-ref inputs "mpi")
2443 (assoc-ref inputs "blas")
2444 (assoc-ref inputs "scalapack")
2445 (assoc-ref inputs "metis")
2446 (match (list (assoc-ref inputs "pt-scotch")
2447 (assoc-ref inputs "scotch"))
2451 `((,scotch "" "-Dscotch")))
2454 "-lptesmumps -lptscotch -lptscotcherr "
2455 "-Dptscotch")))))))))
2457 ;; By default only the d-precision library is built. Make with "all"
2458 ;; target so that all precision libraries and examples are built.
2460 (invoke "make" "all"
2461 (format #f "-j~a" (parallel-job-count)))))
2463 ;; Run the simple test drivers, which read test input from stdin:
2464 ;; from the "real" input for the single- and double-precision
2465 ;; testers, and from the "cmplx" input for complex-precision
2466 ;; testers. The EXEC-PREFIX key is used by the mumps-openmpi
2467 ;; package to prefix execution with "mpirun".
2468 (lambda* (#:key (exec-prefix '()) #:allow-other-keys)
2469 (with-directory-excursion "examples"
2472 (let ((tester (apply open-pipe*
2475 ,(string-append "./" prec
2477 (input (open-input-file
2478 (string-append "input_simpletest_" type))))
2480 (dump-port input tester)
2482 (zero? (close-pipe tester)))))
2484 '("real" "real" "cmplx" "cmplx")))))
2486 (lambda* (#:key outputs #:allow-other-keys)
2487 (let* ((out (assoc-ref outputs "out"))
2488 (libdir (string-append out "/lib")))
2489 (copy-recursively "lib" libdir)
2490 (copy-recursively "include" (string-append out "/include"))
2491 (when (file-exists? "libseq/libmpiseq.a")
2492 (install-file "libseq/libmpiseq.a" libdir))
2493 (when (file-exists? "libseq/libmpiseq.so")
2494 (install-file "libseq/libmpiseq.so" libdir))
2496 (home-page "http://mumps.enseeiht.fr")
2497 (synopsis "Multifrontal sparse direct solver")
2499 "MUMPS (MUltifrontal Massively Parallel sparse direct Solver) solves a
2500 sparse system of linear equations A x = b using Gaussian elimination.")
2501 (license license:cecill-c)))
2503 (define-public mumps-metis
2504 (package (inherit mumps)
2505 (name "mumps-metis")
2507 (alist-delete "scotch" (package-inputs mumps)))))
2509 (define-public mumps-openmpi
2510 (package (inherit mumps)
2511 (name "mumps-openmpi")
2514 ("scalapack" ,scalapack)
2515 ("pt-scotch" ,pt-scotch)
2516 ,@(alist-delete "scotch" (package-inputs mumps))))
2518 (substitute-keyword-arguments (package-arguments mumps)
2520 `(modify-phases ,phases
2521 (add-before 'check 'mpi-setup
2525 ((assoc-ref ,phases 'check)
2526 #:exec-prefix '("mpirun" "-n" "2"))))))))
2527 (synopsis "Multifrontal sparse direct solver (with MPI)")))
2529 (define-public mumps-metis-openmpi
2530 (package (inherit mumps-openmpi)
2531 (name "mumps-metis-openmpi")
2533 (alist-delete "pt-scotch" (package-inputs mumps-openmpi)))))
2535 (define-public ruby-asciimath
2537 (name "ruby-asciimath")
2542 (uri (rubygems-uri "asciimath" version))
2545 "1d80kiph5mc78zps7si1hv48kv4k12mzaq8jk5kb3pqpjdr72qmc"))))
2546 (build-system ruby-build-system)
2549 (modify-phases %standard-phases
2551 ;; https://github.com/asciidoctor/asciimath/commit/1c06fdc8086077f4785479f78b0823a4a72d7948
2552 (add-after 'unpack 'patch-remove-spurious-backslashes
2554 (substitute* "spec/parser_spec.rb"
2559 `(("bundler" ,bundler)
2560 ("ruby-rspec" ,ruby-rspec)))
2561 (synopsis "AsciiMath parsing and conversion library")
2563 "A pure Ruby AsciiMath parsing and conversion library. AsciiMath is an
2564 easy-to-write markup language for mathematics.")
2565 (home-page "https://github.com/asciidoctor/asciimath")
2566 (license license:expat)))
2568 (define-public superlu
2575 (uri (string-append "https://portal.nersc.gov/project/sparse/superlu/"
2576 "superlu_" version ".tar.gz"))
2578 (base32 "0qzlb7cd608q62kyppd0a8c65l03vrwqql6gsm465rky23b6dyr8"))
2579 (modules '((guix build utils)))
2581 ;; Replace the non-free implementation of MC64 with a stub adapted
2584 (use-modules (ice-9 regex)
2586 (call-with-output-file "SRC/mc64ad.c"
2591 void mc64id_(int *a) {
2592 fprintf (stderr, \"SuperLU: non-free MC64 not available. Aborting.\\n\");
2595 void mc64ad_ (int *a, int *b, int *c, int *d, int *e, double *f, int *g,
2596 int *h, int *i, int *j, int *k, double *l, int *m, int *n) {
2597 fprintf (stderr, \"SuperLU: non-free MC64 not available. Aborting.\\n\");
2600 ;; Remove the corresponding license verbiage. MC64 license follows
2601 ;; a "------" line separator.
2602 (with-atomic-file-replacement "License.txt"
2603 (let ((rx (make-regexp "-{8}")))
2606 (let ((line (read-line in 'concat)))
2607 (unless (regexp-exec rx line)
2611 (build-system cmake-build-system)
2615 `(("blas" ,openblas)
2616 ("gfortran" ,gfortran)))
2618 `(#:configure-flags '("-Denable_blaslib:BOOL=NO" ;do not use internal cblas
2619 "-DTPL_BLAS_LIBRARIES=openblas"
2620 "-DBUILD_SHARED_LIBS:BOOL=YES")))
2621 (home-page "https://portal.nersc.gov/project/sparse/superlu/")
2622 (synopsis "Supernodal direct solver for sparse linear systems")
2624 "SuperLU is a general purpose library for the direct solution of large,
2625 sparse, nonsymmetric systems of linear equations on high performance machines.
2626 The library is written in C and is callable from either C or Fortran. The
2627 library routines perform an LU decomposition with partial pivoting and
2628 triangular system solves through forward and back substitution. The library
2629 also provides threshold-based ILU factorization preconditioners.")
2630 (license (list license:bsd-3
2631 license:gpl2+ ;EXAMPLE/*fgmr.c
2632 (license:fsf-free "file://SRC/colamd.h")))))
2634 (define-public superlu-dist
2636 (name "superlu-dist")
2641 (uri (string-append "https://portal.nersc.gov/project/sparse/superlu/"
2642 "superlu_dist_" version ".tar.gz"))
2644 (base32 "1ynmwqajc9sc3my2hssa5k9s58ggvizqv9rdss0j7w99pbh5mnvw"))
2645 (modules '((guix build utils)))
2647 ;; Replace the non-free implementation of MC64 with a stub
2649 (call-with-output-file "SRC/mc64ad_dist.c"
2654 void mc64id_dist(int *a) {
2655 fprintf (stderr, \"SuperLU_DIST: non-free MC64 not available. Aborting.\\n\");
2658 void mc64ad_dist (int *a, int *b, int *c, int *d, int *e, double *f, int *g,
2659 int *h, int *i, int *j, int *k, double *l, int *m, int *n) {
2660 fprintf (stderr, \"SuperLU_DIST: non-free MC64 not available. Aborting.\\n\");
2663 (substitute* "SRC/util.c" ;adjust default algorithm
2664 (("RowPerm[[:blank:]]*=[[:blank:]]*LargeDiag_MC64;")
2665 ;; TODO: set to "LargeDiag_AWPM" once combinatorial-blas has
2666 ;; general (i.e. non-square) processor-grid support.
2667 "RowPerm = NOROWPERM;"))
2669 (patches (search-patches "superlu-dist-scotchmetis.patch"
2670 "superlu-dist-awpm-grid.patch"))))
2671 (build-system cmake-build-system)
2675 `(("gfortran" ,gfortran)
2678 ("combblas" ,combinatorial-blas)))
2680 `(("mpi" ,openmpi) ;headers include MPI heades
2681 ("parmetis" ,pt-scotch32 "metis")
2682 ("pt-scotch" ,pt-scotch32)))
2684 `(#:parallel-tests? #f ;tests use MPI and OpenMP
2685 #:configure-flags (list "-DBUILD_SHARED_LIBS:BOOL=YES"
2686 "-DTPL_ENABLE_COMBBLASLIB=YES"
2687 "-DTPL_BLAS_LIBRARIES=-lopenblas"
2688 "-DTPL_LAPACK_LIBRARIES=-llapack"
2689 (string-append "-DTPL_PARMETIS_LIBRARIES="
2691 '("ptscotchparmetis" "ptscotch" "ptscotcherr"
2692 "scotchmetis" "scotch" "scotcherr")
2694 (string-append "-DTPL_PARMETIS_INCLUDE_DIRS="
2695 (assoc-ref %build-inputs "parmetis")
2697 "-DTPL_ENABLE_COMBBLASLIB=ON"
2698 (string-append "-DTPL_COMBBLAS_INCLUDE_DIRS="
2699 (assoc-ref %build-inputs "combblas")
2700 "/include/CombBLAS;"
2701 (assoc-ref %build-inputs "combblas")
2702 "/include/BipartiteMatchings")
2703 "-DTPL_COMBBLAS_LIBRARIES=CombBLAS")
2705 (modify-phases %standard-phases
2706 (add-before 'configure 'set-c++-standard
2708 (substitute* "CMakeLists.txt"
2709 ;; AWPM headers require C++14
2710 (("CMAKE_CXX_STANDARD 11") "CMAKE_CXX_STANDARD 14"))))
2711 (add-before 'check 'mpi-setup
2713 (add-before 'check 'omp-setup
2714 (lambda _ (setenv "OMP_NUM_THREADS" "1") #t)))))
2715 (home-page (package-home-page superlu))
2716 (synopsis "Parallel supernodal direct solver")
2718 "SuperLU_DIST is a parallel extension to the serial SuperLU library.
2719 It is targeted for distributed memory parallel machines. SuperLU_DIST is
2720 implemented in ANSI C, and MPI for communications.")
2721 (license license:bsd-3)))
2723 (define-public scotch
2730 (uri (string-append "https://gforge.inria.fr/frs/download.php/"
2731 "latestfile/298/scotch_" version ".tar.gz"))
2733 (base32 "1ky4k9r6jvajhqaqnnx6h8fkmds2yxgp70dpr1qzwcyhi2nhqvv8"))
2734 (patches (search-patches "scotch-build-parallelism.patch"
2735 "scotch-integer-declarations.patch"))))
2736 (build-system gnu-build-system)
2742 (outputs '("out" "metis"))
2744 `(#:make-flags (list (string-append "prefix=" %output))
2746 (modify-phases %standard-phases
2748 'unpack 'chdir-to-src
2749 (lambda _ (chdir "src") #t))
2753 (call-with-output-file "Makefile.inc"
2767 CFLAGS = -O2 -g -fPIC $(CPPFLAGS)
2768 LDFLAGS = -lz -lm -lrt -lpthread
2770 LEX = flex -Pscotchyy -olex.yy.c
2775 YACC = bison -pscotchyy -y -b y
2777 '("COMMON_FILE_COMPRESS_GZ"
2779 "COMMON_RANDOM_FIXED_SEED"
2780 "INTSIZE64" ;use 'int64_t'
2781 ;; Prevents symbolc clashes with libesmumps
2783 ;; XXX: Causes invalid frees in superlu-dist tests
2785 ;; "SCOTCH_PTHREAD_NUMBER=2"
2786 "restrict=__restrict"))))
2788 (add-after 'build 'build-esmumps
2791 (format #f "-j~a" (parallel-job-count))
2793 (add-before 'install 'make-install-dirs
2794 (lambda* (#:key outputs #:allow-other-keys)
2795 (mkdir (assoc-ref outputs "out"))))
2796 (add-after 'install 'install-metis
2797 (lambda* (#:key outputs #:allow-other-keys)
2798 (let ((out (assoc-ref outputs "metis")))
2800 ;; metis files are not installed with 'make install'
2801 (for-each (lambda (f)
2802 (install-file f (string-append out "/include")))
2803 (find-files "../include/" ".*metis\\.h"))
2804 (for-each (lambda (f)
2805 (install-file f (string-append out "/lib")))
2806 (find-files "../lib/" ".*metis\\..*"))
2808 (home-page "https://www.labri.fr/perso/pelegrin/scotch/")
2809 (synopsis "Programs and libraries for graph algorithms")
2810 (description "SCOTCH is a set of programs and libraries which implement
2811 the static mapping and sparse matrix reordering algorithms developed within
2812 the SCOTCH project. Its purpose is to apply graph theory, with a divide and
2813 conquer approach, to scientific computing problems such as graph and mesh
2814 partitioning, static mapping, and sparse matrix ordering, in application
2815 domains ranging from structural mechanics to operating systems or
2817 ;; See LICENSE_en.txt
2818 (license license:cecill-c)))
2820 (define-public scotch32
2821 ;; This is the 'INTSIZE32' variant, which uses 32-bit integers, as needed by
2822 ;; some applications.
2823 (package (inherit scotch)
2826 (substitute-keyword-arguments (package-arguments scotch)
2827 ((#:phases scotch-phases)
2828 `(modify-phases ,scotch-phases
2832 (call-with-output-file "Makefile.inc"
2846 CFLAGS = -O2 -g -fPIC $(CPPFLAGS)
2847 LDFLAGS = -lz -lm -lrt -lpthread
2849 LEX = flex -Pscotchyy -olex.yy.c
2854 YACC = bison -pscotchyy -y -b y
2856 '("COMMON_FILE_COMPRESS_GZ"
2858 "COMMON_RANDOM_FIXED_SEED"
2859 "INTSIZE32" ;use 32-bit integers. See INSTALL.txt
2860 ;; Prevents symbolc clashes with libesmumps
2862 ;; XXX: Causes invalid frees in superlu-dist tests
2864 ;; "SCOTCH_PTHREAD_NUMBER=2"
2865 "restrict=__restrict"))))))))))
2867 "Programs and libraries for graph algorithms (32-bit integers)")))
2869 (define-public pt-scotch
2870 (package (inherit scotch)
2873 `(("openmpi" ,openmpi))) ;Headers include MPI headers
2875 (substitute-keyword-arguments (package-arguments scotch)
2876 ((#:phases scotch-phases)
2877 `(modify-phases ,scotch-phases
2881 (invoke "make" (format #f "-j~a" (parallel-job-count))
2882 "ptscotch" "ptesmumps")
2884 ;; Install the serial metis compatibility library
2885 (invoke "make" "-C" "libscotchmetis" "install")))
2886 (add-before 'check 'mpi-setup
2890 (invoke "make" "ptcheck")))))))
2891 (synopsis "Programs and libraries for graph algorithms (with MPI)")))
2893 (define-public pt-scotch32
2894 (package (inherit scotch32)
2895 (name "pt-scotch32")
2897 `(("openmpi" ,openmpi))) ;headers include MPI headers
2899 (substitute-keyword-arguments (package-arguments scotch32)
2900 ((#:phases scotch32-phases)
2901 `(modify-phases ,scotch32-phases
2904 (invoke "make" (format #f "-j~a" (parallel-job-count))
2905 "ptscotch" "ptesmumps")
2906 ;; Install the serial metis compatibility library
2907 (invoke "make" "-C" "libscotchmetis" "install")))
2908 (add-before 'check 'mpi-setup
2912 (invoke "make" "ptcheck")))))))
2914 "Programs and libraries for graph algorithms (with MPI and 32-bit integers)")))
2916 (define-public metis
2923 (uri (string-append "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/"
2924 "metis-" version ".tar.gz"))
2927 "1cjxgh41r8k6j029yxs8msp3z6lcnpm16g5pvckk35kc7zhfpykn"))))
2928 (build-system cmake-build-system)
2930 `(("blas" ,openblas)))
2932 `(#:tests? #f ;no tests
2933 #:configure-flags `("-DSHARED=ON"
2934 ,(string-append "-DGKLIB_PATH=" (getcwd)
2935 "/metis-" ,version "/GKlib"))))
2936 (home-page "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview")
2937 (synopsis "Graph partitioning and fill-reducing matrix ordering library")
2939 "METIS is a set of serial programs for partitioning graphs, partitioning
2940 finite element meshes, and producing fill-reducing orderings for sparse
2941 matrices. The algorithms implemented in METIS are based on the multilevel
2942 recursive-bisection, multilevel k-way, and multi-constraint partitioning
2944 (license license:asl2.0))) ;As of version 5.0.3
2946 (define-public p4est
2953 (uri (string-append "http://p4est.github.io/release/p4est-"
2957 "16h267z256kxcxfjs390qqzv19hr58vrj4x8lndb7alnk2vca8n5"))))
2958 (build-system gnu-build-system)
2960 `(("fortran" ,gfortran)
2965 `(#:configure-flags `(,(string-append "BLAS_LIBS=-L"
2966 (assoc-ref %build-inputs "blas")
2968 ,(string-append "LAPACK_LIBS=-L"
2969 (assoc-ref %build-inputs "lapack")
2971 #:phases (modify-phases %standard-phases
2972 (add-before 'check 'mpi-setup
2974 (home-page "http://www.p4est.org")
2975 (synopsis "Adaptive mesh refinement on forests of octrees")
2977 "The p4est software library enables the dynamic management of a
2978 collection of adaptive octrees, conveniently called a forest of octrees.
2979 p4est is designed to work in parallel and scales to hundreds of thousands of
2981 (license license:gpl2+)))
2983 (define-public p4est-openmpi
2984 (package (inherit p4est)
2985 (name "p4est-openmpi")
2988 ,@(package-inputs p4est)))
2990 (substitute-keyword-arguments (package-arguments p4est)
2991 ((#:configure-flags cf)
2992 ``("--enable-mpi" ,@,cf))))
2993 (synopsis "Parallel adaptive mesh refinement on forests of octrees")))
2995 (define-public gsegrafix
3002 (uri (string-append "mirror://gnu/" name "/" name "-"
3006 "1b13hvx063zv970y750bx41wpx6hwd5ngjhbdrna8w8yy5kmxcda"))))
3007 (build-system gnu-build-system)
3009 `(#:configure-flags '("LDFLAGS=-lm")))
3011 `(("libgnomecanvas" ,libgnomecanvas)
3012 ("libbonoboui" ,libbonoboui)
3013 ("libgnomeui" ,libgnomeui)
3014 ("libgnomeprintui" ,libgnomeprintui)
3017 `(("pkg-config" ,pkg-config)))
3018 (home-page "https://www.gnu.org/software/gsegrafix/")
3019 (synopsis "GNOME application to create scientific and engineering plots")
3020 (description "GSEGrafix is an application which produces high-quality graphical
3021 plots for science and engineering. Plots are specified via simple ASCII
3022 parameter files and data files and are presented in an anti-aliased GNOME
3023 canvas. The program supports rectangular two-dimensional plots, histograms,
3024 polar-axis plots and three-dimensional plots. Plots can be printed or saved
3025 to BMP, JPEG or PNG image formats.")
3026 (license license:gpl3+)))
3028 (define-public maxima
3035 (uri (string-append "mirror://sourceforge/maxima/Maxima-source/"
3036 version "-source/" name "-" version ".tar.gz"))
3039 "0xyahp4c6509haxh4n1swiqm3421gplkdisa0zypclh3252sbzfw"))
3040 (patches (search-patches "maxima-defsystem-mkdir.patch"))))
3041 (build-system gnu-build-system)
3044 ("gnuplot" ,gnuplot) ;for plots
3046 ("tk" ,tk))) ;Tcl/Tk is used by 'xmaxima'
3048 `(("texinfo" ,texinfo)
3050 ("python" ,python)))
3053 (list "--enable-gcl"
3054 (string-append "--with-posix-shell="
3055 (assoc-ref %build-inputs "bash")
3057 (string-append "--with-wish="
3058 (assoc-ref %build-inputs "tk")
3060 (let ((v ,(package-version tk)))
3061 (string-take v (string-index-right v #\.)))))
3062 ;; By default Maxima attempts to write temporary files to
3063 ;; '/tmp/nix-build-maxima-*', which won't exist at run time.
3064 ;; Work around that.
3065 #:make-flags (list "TMPDIR=/tmp")
3067 (modify-phases %standard-phases
3068 (add-after 'unpack 'patch-paths
3069 (lambda* (#:key inputs #:allow-other-keys)
3070 (let* ((sed (string-append (assoc-ref inputs "sed") "/bin/sed"))
3071 (coreutils (assoc-ref inputs "coreutils"))
3072 (dirname (string-append coreutils "/bin/dirname"))
3073 (head (string-append coreutils "/bin/head"))
3074 (perl (string-append (assoc-ref inputs "perl") "/bin/perl"))
3075 (python (string-append (assoc-ref inputs "python")
3077 (substitute* "src/maxima.in"
3078 (("sed ") (string-append sed " "))
3079 (("dirname") dirname)
3081 (substitute* "doc/info/Makefile.in"
3082 (("/usr/bin/env perl") perl))
3083 (substitute* "doc/info/build_html.sh.in"
3084 (("python") python))
3086 (add-before 'check 'pre-check
3088 (chmod "src/maxima" #o555)
3092 ;; This is derived from the testing code in the "debian/rules" file
3093 ;; of Debian's Maxima package.
3094 ;; If Maxima can successfully run this, the binary to be installed
3100 "--batch-string=\"run_testsuite();\" "
3101 "| grep -q \"No unexpected errors found\""))))
3102 ;; Make sure the doc and emacs files are found in the
3103 ;; standard location. Also configure maxima to find gnuplot
3104 ;; without having it on the PATH.
3105 (add-after 'install 'post-install
3106 (lambda* (#:key outputs inputs #:allow-other-keys)
3107 (let* ((gnuplot (assoc-ref inputs "gnuplot"))
3108 (out (assoc-ref outputs "out"))
3109 (datadir (string-append out "/share/maxima/" ,version))
3110 (binutils (string-append (assoc-ref inputs "binutils")
3112 (with-directory-excursion out
3113 (mkdir-p "share/emacs")
3114 (mkdir-p "share/doc")
3116 (string-append datadir "/doc/")
3117 (string-append out "/share/doc/maxima"))
3118 (with-atomic-file-replacement
3119 (string-append datadir "/share/maxima-init.lisp")
3121 (format out "~a ~s~a~%"
3122 "(setf $gnuplot_command "
3123 (string-append gnuplot "/bin/gnuplot") ")")
3124 (dump-port in out))))
3125 ;; Ensure that Maxima will have access to the GNU binutils
3126 ;; components at runtime.
3127 (wrap-program (string-append out "/bin/maxima")
3128 `("PATH" prefix (,binutils))))
3130 (home-page "http://maxima.sourceforge.net")
3131 (synopsis "Numeric and symbolic expression manipulation")
3132 (description "Maxima is a system for the manipulation of symbolic and
3133 numerical expressions. It yields high precision numeric results by using
3134 exact fractions, arbitrary precision integers, and variable precision floating
3136 ;; Some files are lgpl2.1+. Some are gpl2+. Some explicitly state gpl1+.
3137 ;; Others simply say "GNU General Public License" without stating a
3138 ;; version (which implicitly means gpl1+).
3139 ;; At least one file (src/maxima.asd) says "version 2."
3140 ;; GPLv2 only is therefore the smallest subset.
3141 (license license:gpl2)))
3143 (define-public wxmaxima
3151 (url "https://github.com/wxMaxima-developers/wxmaxima.git")
3152 (commit (string-append "Version-" version))))
3153 (file-name (git-file-name name version))
3155 (base32 "09ciip0wkahps5jdsqqr72bwjrd15bacw38zp23v3hm71xfk8hky"))))
3156 (build-system cmake-build-system)
3158 `(("gettext" ,gettext-minimal)
3159 ("xorg-server" ,xorg-server-for-tests)))
3160 ;; TODO: Add libomp for multithreading support.
3161 ;; As of right now, enabling libomp causes the imageCells.wxm test to fail.
3163 `(("wxwidgets" ,wxwidgets)
3166 ("adwaita-icon-theme" ,adwaita-icon-theme)
3168 ("shared-mime-info" ,shared-mime-info)))
3170 `(#:test-target "test"
3172 (modify-phases %standard-phases
3173 (add-before 'check 'pre-check
3175 ;; Tests require a running X server.
3176 (system "Xvfb :1 &")
3177 (setenv "DISPLAY" ":1")
3178 (setenv "HOME" (getcwd))
3180 (add-after 'install 'wrap-program
3181 (lambda* (#:key inputs outputs #:allow-other-keys)
3182 (wrap-program (string-append (assoc-ref outputs "out")
3185 (,(string-append (assoc-ref inputs "maxima")
3187 ;; For GtkFileChooserDialog.
3188 `("GSETTINGS_SCHEMA_DIR" =
3189 (,(string-append (assoc-ref inputs "gtk+")
3190 "/share/glib-2.0/schemas")))
3191 `("XDG_DATA_DIRS" ":" prefix
3192 (;; Needed by gdk-pixbuf to know supported icon formats.
3194 (assoc-ref inputs "shared-mime-info") "/share")
3195 ;; The default icon theme of GTK+.
3197 (assoc-ref inputs "adwaita-icon-theme") "/share"))))
3199 (home-page "https://wxmaxima-developers.github.io/wxmaxima/")
3200 (synopsis "Graphical user interface for the Maxima computer algebra system")
3202 "wxMaxima is a graphical user interface for the Maxima computer algebra
3203 system. It eases the use of Maxima by making most of its commands available
3204 through a menu system and by providing input dialogs for commands that require
3205 more than one argument. It also implements its own display engine that
3206 outputs mathematical symbols directly instead of depicting them with ASCII
3209 wxMaxima also features 2D and 3D inline plots, simple animations, mixing of
3210 text and mathematical calculations to create documents, exporting of input and
3211 output to TeX, and a browser for Maxima's manual including command index and
3212 full text searching.")
3213 (license license:gpl2+)))
3215 (define-public armadillo
3221 (uri (string-append "mirror://sourceforge/arma/armadillo-"
3225 "1ka1vd9fcmvp12qkcm4888dkfqwnalvv00x04wy29f3nx3qwczby"))))
3226 (build-system cmake-build-system)
3227 (arguments `(#:tests? #f)) ; no test target
3229 `(("openblas" ,openblas)
3231 ("arpack" ,arpack-ng)))
3232 (home-page "http://arma.sourceforge.net/")
3233 (synopsis "C++ linear algebra library")
3235 "Armadillo is a C++ linear algebra library, aiming towards a good balance
3236 between speed and ease of use. It is useful for algorithm development
3237 directly in C++, or quick conversion of research code into production
3238 environments. It can be used for machine learning, pattern recognition,
3239 signal processing, bioinformatics, statistics, econometrics, etc. The library
3240 provides efficient classes for vectors, matrices and cubes, as well as 150+
3241 associated functions (e.g., contiguous and non-contiguous submatrix views).")
3242 (license license:asl2.0)))
3244 (define-public muparser
3245 ;; When switching download sites, muparser re-issued a 2.2.5 release with a
3246 ;; different hash. In order to make `guix package --upgrade` work correctly,
3247 ;; we set a Guix packaging revision.
3248 ;; When the next version of muparser is released, we can remove
3249 ;; UPSTREAM-VERSION and REVISION and use the plain VERSION.
3250 (let ((upstream-version "2.2.5")
3254 (version (string-append upstream-version "-" revision))
3259 (url "https://github.com/beltoforion/muparser.git")
3260 (commit (string-append "v" upstream-version))))
3261 (file-name (git-file-name name version))
3263 (base32 "0f0g4995xngf1pp3zr4p6ai2f8v6f8bxwa0k8ayjjiv1l8h44m24"))))
3264 (build-system gnu-build-system)
3266 `(#:configure-flags '("--enable-samples=no")
3267 #:tests? #f)) ;no "check" target
3268 (home-page "http://muparser.beltoforion.de/")
3269 (synopsis "Fast parser library for mathematical expressions")
3271 "muParser is an extensible high performance math parser library. It is
3272 based on transforming an expression into a bytecode and precalculating constant
3274 (license license:expat))))
3276 (define-public openblas
3283 (uri (string-append "mirror://sourceforge/openblas/v" version "/OpenBLAS%20"
3284 version "%20version.tar.gz"))
3285 (file-name (string-append name "-" version ".tar.gz"))
3288 "14iz9xnrb9xiwgj84j94mc74gg0zn2vsy9fmsijxxma1n7dck4w3"))))
3289 (build-system gnu-build-system)
3291 `(#:test-target "test"
3292 ;; DYNAMIC_ARCH is only supported on x86. When it is disabled and no
3293 ;; TARGET is specified, OpenBLAS will tune itself to the build host, so
3294 ;; we need to disable substitutions.
3296 ,(let ((system (or (%current-target-system) (%current-system))))
3297 (or (string-prefix? "x86_64" system)
3298 (string-prefix? "i686" system)
3299 (string-prefix? "mips" system)
3300 (string-prefix? "aarch64" system)))
3302 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
3304 "MAKE_NB_JOBS=0" ;use jobserver for submakes
3306 ;; This is the maximum number of threads OpenBLAS will ever use (that
3307 ;; is, if $OPENBLAS_NUM_THREADS is greater than that, then NUM_THREADS
3308 ;; is used.) If we don't set it, the makefile sets it to the number
3309 ;; of cores of the build machine, which is obviously wrong.
3312 ;; Build the library for all supported CPUs. This allows
3313 ;; switching CPU targets at runtime with the environment variable
3314 ;; OPENBLAS_CORETYPE=<type>, where "type" is a supported CPU type.
3315 ;; Unfortunately, this is not supported on non-x86 architectures,
3316 ;; where it leads to failed builds.
3317 ,@(let ((system (or (%current-target-system) (%current-system))))
3319 ((or (string-prefix? "x86_64" system)
3320 (string-prefix? "i686" system))
3321 '("DYNAMIC_ARCH=1"))
3322 ;; On MIPS we force the "SICORTEX" TARGET, as for the other
3323 ;; two available MIPS targets special extended instructions
3324 ;; for Loongson cores are used.
3325 ((string-prefix? "mips" system)
3326 '("TARGET=SICORTEX"))
3327 ;; On aarch64 force the generic 'armv8-a' target
3328 ((string-prefix? "aarch64" system)
3331 ;; no configure script
3333 (modify-phases %standard-phases
3335 (add-before 'build 'set-extralib
3336 (lambda* (#:key inputs #:allow-other-keys)
3337 ;; Get libgfortran found when building in utest.
3339 (string-append "-L" (assoc-ref inputs "fortran-lib")
3343 `(("fortran-lib" ,gfortran "lib")))
3346 ("fortran" ,gfortran)
3348 (home-page "https://www.openblas.net/")
3349 (synopsis "Optimized BLAS library based on GotoBLAS")
3351 "OpenBLAS is a BLAS library forked from the GotoBLAS2-1.13 BSD version.")
3352 (license license:bsd-3)))
3354 (define-public openblas-ilp64
3355 (package/inherit openblas
3356 (name "openblas-ilp64")
3357 (supported-systems '("x86_64-linux" "aarch64-linux" "mips64el-linux"))
3359 (substitute-keyword-arguments (package-arguments openblas)
3360 ((#:make-flags flags '())
3361 `(append (list "INTERFACE64=1" "LIBNAMESUFFIX=ilp64")
3363 (synopsis "Optimized BLAS library based on GotoBLAS (ILP64 version)")
3364 (license license:bsd-3)))
3366 (define* (make-blis implementation #:optional substitutable?)
3367 "Return a BLIS package with the given IMPLEMENTATION (see config/ in the
3368 source tree for a list of implementations.)
3370 SUBSTITUTABLE? determines whether the package is made available as a
3373 Currently the specialization must be selected at configure-time, but work is
3374 underway to allow BLIS to select the right optimized kernels at run time:
3375 <https://github.com/flame/blis/issues/129>."
3377 (name (if (string=? implementation "reference")
3379 (string-append "blis-" implementation)))
3381 (home-page "https://github.com/flame/blis")
3384 (uri (git-reference (url home-page) (commit version)))
3387 "1wr79a50nm4abhw8w3sn96nmwp5mrzifcigk7khw9qcgyyyqayfh"))
3388 (file-name (git-file-name "blis" version))))
3389 (build-system gnu-build-system)
3391 `(#:test-target "test"
3393 #:substitutable? ,substitutable?
3395 #:phases (modify-phases %standard-phases
3397 (lambda* (#:key outputs #:allow-other-keys)
3398 ;; This is a home-made 'configure' script.
3399 (let ((out (assoc-ref outputs "out")))
3400 (invoke "./configure" "-p" out
3404 "--enable-threading=openmp"
3407 (add-before 'check 'show-test-output
3409 ;; By default "make check" is silent. Make it verbose.
3410 (system "tail -F output.testsuite &")
3412 (synopsis "High-performance basic linear algebra (BLAS) routines")
3414 "BLIS is a portable software framework for instantiating high-performance
3415 BLAS-like dense linear algebra libraries. The framework was designed to
3416 isolate essential kernels of computation that, when optimized, immediately
3417 enable optimized implementations of most of its commonly used and
3418 computationally intensive operations. While BLIS exports a new BLAS-like API,
3419 it also includes a BLAS compatibility layer which gives application developers
3420 access to BLIS implementations via traditional BLAS routine calls.")
3421 (license license:bsd-3)))
3424 ;; This is the "reference" implementation, which is the non-optimized but
3425 ;; portable variant (no assembly).
3426 (make-blis "reference" #t))
3428 (define ignorance blis)
3430 (define-syntax-rule (blis/x86_64 processor)
3431 "Expand to a package specialized for PROCESSOR."
3433 (inherit (make-blis processor))
3434 (supported-systems '("x86_64-linux"))))
3436 (define-public blis-sandybridge
3437 ;; BLIS specialized for Sandy Bridge processors (launched 2011):
3438 ;; <http://ark.intel.com/products/codename/29900/Sandy-Bridge>.
3439 (blis/x86_64 "sandybridge"))
3441 (define-public blis-haswell
3442 ;; BLIS specialized for Haswell processors (launched 2013):
3443 ;; <http://ark.intel.com/products/codename/42174/Haswell>.
3444 (blis/x86_64 "haswell"))
3446 (define-public blis-knl
3447 ;; BLIS specialized for Knights Landing processor (launched 2016):
3448 ;; <http://ark.intel.com/products/series/92650/Intel-Xeon-Phi-x200-Product-Family>.
3449 (blis/x86_64 "knl"))
3452 (define-public openlibm
3460 (url "https://github.com/JuliaLang/openlibm.git")
3461 (commit (string-append "v" version))))
3462 (file-name (git-file-name name version))
3464 (base32 "08wfchmmr5200fvmn1kwq9byc1fhsq46hn0y5k8scdl74771c7gh"))))
3465 (build-system gnu-build-system)
3468 (list (string-append "prefix=" (assoc-ref %outputs "out")))
3470 ;; no configure script
3471 (modify-phases %standard-phases (delete 'configure))
3472 #:tests? #f)) ;the tests are part of the default target
3473 (home-page "https://openlibm.org/")
3474 (synopsis "Portable C mathematical library (libm)")
3476 "OpenLibm is an effort to have a high quality, portable, standalone C
3477 mathematical library (libm). It can be used standalone in applications and
3478 programming language implementations. The project was born out of a need to
3479 have a good libm for the Julia programming language that worked consistently
3480 across compilers and operating systems, and in 32-bit and 64-bit
3482 ;; Each architecture has its own make target, and there is none for mips.
3483 (supported-systems (delete "mips64el-linux" %supported-systems))
3484 ;; See LICENSE.md for details.
3485 (license (list license:expat
3488 license:public-domain
3489 license:lgpl2.1+))))
3491 (define-public openspecfun
3493 (name "openspecfun")
3499 (url "https://github.com/JuliaLang/openspecfun.git")
3500 (commit (string-append "v" version))))
3501 (file-name (git-file-name name version))
3503 (base32 "0pfw6l3ch7isz403llx7inxlvavqh01jh1hb9dpidi86sjjx9kfh"))))
3504 (build-system gnu-build-system)
3506 '(#:tests? #f ; no "check" target
3508 (list (string-append "prefix=" (assoc-ref %outputs "out")))
3510 (modify-phases %standard-phases
3511 (delete 'configure)))) ; no configure script
3513 `(("fortran" ,gfortran)))
3514 (home-page "https://github.com/JuliaLang/openspecfun")
3515 (synopsis "Collection of special mathematical functions")
3517 "Openspecfun provides AMOS and Faddeeva. AMOS (from Netlib) is a
3518 portable package for Bessel Functions of a Complex Argument and Nonnegative
3519 Order; it contains subroutines for computing Bessel functions and Airy
3520 functions. Faddeeva allows computing the various error functions of arbitrary
3521 complex arguments (Faddeeva function, error function, complementary error
3522 function, scaled complementary error function, imaginary error function, and
3523 Dawson function); given these, one can also easily compute Voigt functions,
3524 Fresnel integrals, and similar related functions as well.")
3525 ;; Faddeeva is released under the Expat license; AMOS is included as
3526 ;; public domain software.
3527 (license (list license:expat license:public-domain))))
3529 (define-public suitesparse
3531 (name "suitesparse")
3537 (url "https://github.com/DrTimothyAldenDavis/SuiteSparse.git")
3538 (commit (string-append "v" version))))
3539 (file-name (git-file-name name version))
3542 "174p3l78kv9gaa0i5hflyai2ydwnjzh34k9938sl4aa3li0543s8"))
3543 (patches (search-patches "suitesparse-mongoose-cmake.patch"))
3544 (modules '((guix build utils)))
3546 ;; Remove bundled metis source
3548 (delete-file-recursively "metis-5.1.0")
3550 (build-system gnu-build-system)
3552 '(#:tests? #f ;no "check" target
3557 "MY_METIS_LIB=-lmetis"
3558 ;; Flags for cmake (required to build GraphBLAS and Mongoose)
3559 (string-append "CMAKE_OPTIONS=-DCMAKE_INSTALL_PREFIX="
3560 (assoc-ref %outputs "out")
3561 " -DCMAKE_VERBOSE_MAKEFILE=ON"
3562 " -DCMAKE_C_FLAGS_RELEASE=\"$(CFLAGS) $(CPPFLAGS)\""
3563 " -DCMAKE_CXX_FLAGS_RELEASE=\"$(CXXFLAGS) $(CPPFLAGS)\""
3564 " -DCMAKE_SKIP_RPATH=TRUE"
3565 " -DCMAKE_BUILD_TYPE=Release")
3566 (string-append "INSTALL_LIB="
3567 (assoc-ref %outputs "out") "/lib")
3568 (string-append "INSTALL_INCLUDE="
3569 (assoc-ref %outputs "out") "/include")
3572 (modify-phases %standard-phases
3573 (delete 'configure)))) ;no configure script
3579 `(("cmake" ,cmake-minimal)
3581 (home-page "http://faculty.cse.tamu.edu/davis/suitesparse.html")
3582 (synopsis "Suite of sparse matrix software")
3584 "SuiteSparse is a suite of sparse matrix algorithms, including: UMFPACK,
3585 multifrontal LU factorization; CHOLMOD, supernodal Cholesky; SPQR,
3586 multifrontal QR; KLU and BTF, sparse LU factorization, well-suited for circuit
3587 simulation; ordering methods (AMD, CAMD, COLAMD, and CCOLAMD); CSparse and
3588 CXSparse, a concise sparse Cholesky factorization package; and many other
3591 ;; AMD, CAMD, BTF, COLAMD, CCOLAMD, CSparse, CXSparse, KLU, LDL
3593 ;; GPUQREngine, RBio, SuiteSparse_GPURuntime, SuiteSparseQR, UMFPACK
3594 (license (list license:gpl2+ license:lgpl2.1+))))
3596 (define-public atlas
3602 (uri (string-append "mirror://sourceforge/math-atlas/Stable/"
3603 version "/atlas" version ".tar.bz2"))
3606 "1dyjlq3fiparvm8ypwk6rsmjzmnwk81l88gkishphpvc79ryp216"))))
3607 (build-system gnu-build-system)
3608 (home-page "http://math-atlas.sourceforge.net/")
3609 (inputs `(("gfortran" ,gfortran)
3610 ("lapack-tar" ,(package-source lapack))))
3611 (outputs '("out" "doc"))
3612 ;; For the moment we drop support for MIPS at it fails to compile. See
3613 ;; https://lists.gnu.org/archive/html/guix-devel/2014-11/msg00516.html
3614 (supported-systems (delete "mips64el-linux" %supported-systems))
3616 `(#:parallel-build? #f
3617 #:parallel-tests? #f
3619 ;; ATLAS tunes itself for the machine it is built on, as explained at
3620 ;; <http://lists.gnu.org/archive/html/guix-devel/2014-10/msg00305.html>.
3621 ;; For this reason, we want users to build it locally instead of using
3625 #:modules ((srfi srfi-26)
3626 (guix build gnu-build-system)
3629 `(;; Generate position independent code suitable for dynamic libraries
3630 ;; and use WALL timer to get more accurate timing.
3631 "-Fa" "alg" "-fPIC" "-D" "c" "-DWALL"
3634 ,,(if (string-match "64" (%current-system))
3637 ;; Disable parallel build as it gives errors: atlas_pthread.h is
3638 ;; needed to compile C files before it is generated.
3639 "-Ss" "pmake" "make -j 1"
3640 ;; Probe is failing for MIPS. We therefore define the system
3641 ;; architecture explicitly by setting (-A) MACHINETYPE = 49
3642 ;; 'MIPSR1xK' and (-V) ISA = 1 'none'.
3643 ,,@(if (string-prefix? "mips" (%current-system))
3644 (list "-A" "49" "-V" "1")
3646 ;; Generate shared libraries.
3648 ;; Build a full LAPACK library.
3649 ,(string-append "--with-netlib-lapack-tarfile="
3650 (assoc-ref %build-inputs "lapack-tar")))
3652 (modify-phases %standard-phases
3653 (add-after 'install 'install-doc
3654 (lambda* (#:key outputs inputs #:allow-other-keys)
3655 (let ((doc (string-append (assoc-ref outputs "doc")
3656 "/share/doc/atlas")))
3658 (for-each (cut install-file <> doc)
3659 (find-files "../ATLAS/doc" ".*"))
3661 (add-after 'check 'check-pt
3662 (lambda _ (invoke "make" "ptcheck")))
3663 ;; Fix files required to run configure.
3664 (add-before 'configure 'fix-/bin/sh
3666 ;; Use `sh', not `/bin/sh'.
3667 (substitute* (find-files "." "Makefile|configure|SpewMakeInc\\.c")
3671 ;; Fix /bin/sh in generated make files.
3672 (add-after 'configure 'fix-/bin/sh-in-generated-files
3674 (substitute* (find-files "." "^[Mm]ake\\.inc.*")
3678 ;; ATLAS configure program does not accepts the default flags
3679 ;; passed by the 'gnu-build-system'.
3681 (lambda* (#:key native-inputs inputs outputs
3682 (configure-flags '())
3683 #:allow-other-keys #:rest args)
3684 (let* ((prefix (assoc-ref outputs "out"))
3685 (bash (or (and=> (assoc-ref
3686 (or native-inputs inputs) "bash")
3687 (cut string-append <> "/bin/bash"))
3689 (flags `(,(string-append "--prefix=" prefix)
3691 (abs-srcdir (getcwd))
3692 (srcdir (string-append "../" (basename abs-srcdir))))
3693 (format #t "source directory: ~s (relative from build: ~s)~%"
3697 (format #t "build directory: ~s~%" (getcwd))
3698 (format #t "configure flags: ~s~%" flags)
3700 (string-append srcdir "/configure")
3702 (synopsis "Automatically Tuned Linear Algebra Software")
3704 "ATLAS is an automatically tuned linear algebra software library
3705 providing C and Fortran77 interfaces to a portably efficient BLAS
3706 implementation, as well as a few routines from LAPACK.
3708 Optimization occurs at build time. For this reason, the library is built on
3709 the machine where it is installed, without resorting to pre-built substitutes.
3711 Before building the library, CPU throttling should be disabled. This can be
3712 done in the BIOS, or, on GNU/Linux, with the following command:
3715 # cpupower --governor performance
3718 Failure to do so will result in a library with poor performance.")
3719 (license license:bsd-3)))
3728 (uri (string-append "https://github.com/g-truc/glm/releases/download/"
3729 version "/glm-" version ".zip"))
3731 (base32 "1l0pi1qi37mk6s0yrkrw07lspv4gcqnr9ryg3521hrl77ff37dwx"))
3732 (patches (search-patches "glm-restore-install-target.patch"))))
3733 (build-system cmake-build-system)
3735 `(("unzip" ,unzip)))
3736 (home-page "https://glm.g-truc.net/")
3737 (synopsis "OpenGL Mathematics library")
3738 (description "OpenGL Mathematics (GLM) is a header-only C++ mathematics
3739 library for graphics software based on the OpenGL Shading Language (GLSL)
3741 (license license:expat)))
3743 (define-public lpsolve
3750 (uri (string-append "mirror://sourceforge/lpsolve/lpsolve/" version
3751 "/lp_solve_" version "_source.tar.gz"))
3754 "12pj1idjz31r7c2mb5w03vy1cmvycvbkx9z29s40qdmkp1i7q6i0"))
3755 (modules '((guix build utils)))
3758 (substitute* (list "lp_solve/ccc" "lpsolve55/ccc")
3760 ;; Pretend to be on a 64 bit platform to obtain a common directory
3761 ;; name for the build results on all architectures; nothing else
3762 ;; seems to depend on it.
3763 (("^PLATFORM=.*$") "PLATFORM=ux64\n")
3765 ;; The check for 'isnan' as it is written fails with
3766 ;; "non-floating-point argument in call to function
3767 ;; ‘__builtin_isnan’", which leads to the 'NOISNAN' cpp macro
3768 ;; definition, which in turn leads to bad things. Fix the feature
3770 (("isnan\\(0\\)") "isnan(0.)"))
3772 (build-system gnu-build-system)
3774 `(#:tests? #f ; no check target
3776 (modify-phases %standard-phases
3777 (delete 'configure) ; no configure script
3780 (with-directory-excursion "lpsolve55"
3781 (invoke "bash" "ccc"))
3782 (with-directory-excursion "lp_solve"
3783 (invoke "bash" "ccc"))
3786 (lambda* (#:key outputs #:allow-other-keys)
3787 (let* ((out (assoc-ref outputs "out"))
3788 (bin (string-append out "/bin"))
3789 (lib (string-append out "/lib"))
3790 ;; This is where LibreOffice expects to find the header
3791 ;; files, and where they are installed by Debian.
3792 (include (string-append out "/include/lpsolve")))
3793 (install-file "lpsolve55/bin/ux64/liblpsolve55.a" lib)
3794 (install-file "lpsolve55/bin/ux64/liblpsolve55.so" lib)
3795 (install-file "lp_solve/bin/ux64/lp_solve" bin)
3797 ;; Install a subset of the header files as on Debian
3798 ;; (plus lp_bit.h, which matches the regular expression).
3799 (for-each (lambda (name)
3800 (install-file name include))
3801 (find-files "." "lp_[HMSa-z].*\\.h$"))
3802 (with-directory-excursion "shared"
3803 (for-each (lambda (name)
3804 (install-file name include))
3805 (find-files "." "\\.h$")))
3807 (home-page "http://lpsolve.sourceforge.net/")
3808 (synopsis "Mixed integer linear programming (MILP) solver")
3810 "lp_solve is a mixed integer linear programming solver based on the
3811 revised simplex and the branch-and-bound methods.")
3812 (license license:lgpl2.1+)))
3814 (define-public dealii
3821 (uri (string-append "https://github.com/dealii/dealii/releases/"
3822 "download/v" version "/dealii-" version ".tar.gz"))
3825 "0xhjv0gzswpjbc43xbrpwfc5848g508l01855nszx3g5gwzlhnzw"))
3826 (modules '((guix build utils)))
3828 ;; Remove bundled sources: UMFPACK, TBB, muParser, and boost
3830 (delete-file-recursively "bundled")
3832 (build-system cmake-build-system)
3840 ("arpack" ,arpack-ng)
3841 ("muparser" ,muparser)
3842 ("gfortran" ,gfortran)
3843 ("suitesparse" ,suitesparse))) ;for UMFPACK
3845 `(#:build-type "DebugRelease" ;only supports Release, Debug, or DebugRelease
3847 ;; Work around a bug in libsuitesparseconfig linking
3848 ;; see https://github.com/dealii/dealii/issues/4745
3849 '("-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON")))
3850 (home-page "https://www.dealii.org")
3851 (synopsis "Finite element library")
3853 "Deal.II is a C++ program library targeted at the computational solution
3854 of partial differential equations using adaptive finite elements. The main
3855 aim of deal.II is to enable rapid development of modern finite element codes,
3856 using among other aspects adaptive meshes and a wide array of tools often used
3857 in finite element programs.")
3858 (license license:lgpl2.1+)))
3860 (define-public dealii-openmpi
3861 (package (inherit dealii)
3862 (name "dealii-openmpi")
3865 ;;Supported only with MPI:
3866 ("hdf5" ,hdf5-parallel-openmpi) ;TODO: have petsc-openmpi propagate?
3867 ("p4est" ,p4est-openmpi)
3868 ("petsc" ,petsc-openmpi)
3869 ("slepc" ,slepc-openmpi)
3870 ("metis" ,metis) ;for MUMPS
3871 ("scalapack" ,scalapack) ;for MUMPS
3872 ("mumps" ,mumps-metis-openmpi) ;configure supports only metis orderings
3873 ("arpack" ,arpack-ng-openmpi)
3874 ,@(fold alist-delete (package-inputs dealii)
3875 '("p4est" "arpack"))))
3877 (substitute-keyword-arguments (package-arguments dealii)
3878 ((#:configure-flags cf)
3879 `(cons "-DDEAL_II_WITH_MPI:BOOL=ON"
3881 ((#:phases phases '%standard-phases)
3882 `(modify-phases ,phases
3883 (add-before 'check 'mpi-setup
3884 ,%openmpi-setup)))))
3885 (synopsis "Finite element library (with MPI support)")))
3887 (define-public flann
3896 "http://www.cs.ubc.ca/research/flann/uploads/FLANN/flann-"
3897 version "-src.zip"))
3900 "022w8hph7bli5zbpnk3z1qh1c2sl5hm8fw2ccim651ynn0hr7fyz"))
3901 (patches (search-patches "flann-cmake-3.11.patch"))))
3902 (build-system cmake-build-system)
3904 "octave")) ;46 MiB .mex file that pulls Octave
3906 `(("unzip" ,unzip)))
3909 ("octave" ,octave-cli)
3910 ("python" ,python-2) ; print syntax
3911 ;; ("python2-numpy" ,python2-numpy) ; only required for the tests
3914 `(;; The 'share/flann/octave' contains a .mex file, which is an ELF file
3915 ;; taken 46 MiB unstripped, and 6 MiB stripped.
3916 #:strip-directories '("lib" "lib64" "libexec"
3917 "bin" "sbin" "share/flann/octave")
3919 ;; Save 12 MiB by not installing .a files. Passing
3920 ;; '-DBUILD_STATIC_LIBS=OFF' has no effect.
3921 #:phases (modify-phases %standard-phases
3922 (add-before 'configure 'set-octave-directory
3923 (lambda* (#:key outputs #:allow-other-keys)
3924 ;; Install the .mex file in the "octave" output.
3925 (let ((out (assoc-ref outputs "octave")))
3926 (substitute* "src/matlab/CMakeLists.txt"
3927 (("share/flann/octave")
3928 (string-append out "/share/flann/octave")))
3930 (add-after 'install 'remove-static-libraries
3931 (lambda* (#:key outputs #:allow-other-keys)
3932 (let* ((out (assoc-ref outputs "out"))
3933 (lib (string-append out "/lib")))
3934 (for-each delete-file
3935 (find-files lib "\\.a$"))
3938 #:tests? #f)) ; The test data are downloaded from the Internet.
3939 (home-page "http://www.cs.ubc.ca/research/flann/")
3940 (synopsis "Library for approximate nearest neighbors computation")
3941 (description "FLANN is a library for performing fast approximate
3942 nearest neighbor searches in high dimensional spaces. It implements a
3943 collection of algorithms and a system for automatically choosing the best
3944 algorithm and optimum parameters depending on the dataset.
3946 FLANN is written in C++ and contains bindings for C, Octave and Python.")
3947 (license (license:non-copyleft "file://COPYING"
3948 "See COPYING in the distribution."))))
3950 (define-public wcalc
3957 (uri (string-append "mirror://sourceforge/w-calc/Wcalc/" version "/"
3958 "wcalc-" version ".tar.bz2"))
3961 "1vi8dl6rccqiq1apmpwawyg2ywx6a1ic1d3cvkf2hlwk1z11fb0f"))))
3962 (build-system gnu-build-system)
3965 ("readline" ,readline)))
3966 (home-page "http://w-calc.sourceforge.net/index.php")
3967 (synopsis "Flexible command-line scientific calculator")
3968 (description "Wcalc is a very capable calculator. It has standard functions
3969 (sin, asin, and sinh for example, in either radians or degrees), many
3970 pre-defined constants (pi, e, c, etc.), support for using variables, \"active\"
3971 variables, a command history, hex/octal/binary input and output, unit
3972 conversions, embedded comments, and an expandable expression entry field. It
3973 evaluates expressions using the standard order of operations.")
3974 (license license:gpl2+)))
3982 (uri (string-append "mirror://sourceforge/xaos/XaoS/" version
3983 "/xaos-" version ".tar.gz"))
3986 "15cd1cx1dyygw6g2nhjqq3bsfdj8sj8m4va9n75i0f3ryww3x7wq"))))
3987 (build-system gnu-build-system)
3988 (native-inputs `(("gettext" ,gettext-minimal)))
3989 (inputs `(("libx11" ,libx11)
3994 `(#:tests? #f ;no "check" target
3995 #:make-flags '("LOCALEDIR=$DATAROOTDIR/locale")))
3996 (synopsis "Real-time fractal zoomer")
3997 (description "GNU XaoS is a graphical program that generates fractal
3998 patterns and allows you to zoom in and out of them infinitely in a fluid,
3999 continuous manner. It also includes tutorials that help to explain how fractals
4000 are built. It can generate many different fractal types such as the Mandelbrot
4002 (home-page "https://www.gnu.org/software/xaos/")
4003 (license license:gpl2+)))
4005 (define-public hypre
4013 (url "https://github.com/LLNL/hypre.git")
4014 (commit (string-append "v" version))))
4015 (file-name (git-file-name name version))
4017 (base32 "1lvh4ybqkriyqfg2zmic6mrg1981qv1i9vry1fdgsabn81hb71g4"))
4018 (modules '((guix build utils)))
4021 ;; Remove use of __DATE__ and __TIME__ for reproducibility;
4022 ;; substitute the release date.
4023 (substitute* "src/utilities/HYPRE_utilities.h"
4024 (("Date Compiled: .*$")
4025 "Date Compiled: Oct 19 2018 15:23:00 +0000\"\n"))
4027 (build-system gnu-build-system)
4028 (outputs '("out" ; 6.1 MiB of headers and libraries
4029 "doc")) ; 4.8 MiB of documentation
4033 ("perl" ,perl) ; needed to run 'ppmquant' during tests
4034 ("texlive" ,(texlive-union (list texlive-xypic
4036 texlive-latex-hyperref
4038 ("ghostscript" ,ghostscript)))
4040 `(("blas" ,openblas)
4041 ("lapack" ,lapack)))
4043 `(#:modules ((srfi srfi-1)
4044 ,@%gnu-build-system-modules)
4045 #:configure-flags '("--enable-shared"
4053 (modify-phases %standard-phases
4054 (add-before 'build 'set-HOME
4056 ;; FIXME: texlive-union does not find the built
4057 ;; metafonts, so it tries to generate them in HOME.
4058 (setenv "HOME" "/tmp")
4060 (add-before 'configure 'chdir-src
4061 (lambda _ (chdir "src")))
4063 (lambda* (#:key build target configure-flags
4064 #:allow-other-keys #:rest args)
4065 (let* ((configure (assoc-ref %standard-phases 'configure)))
4068 (list #:configure-flags
4069 (cons (string-append
4070 "--host=" (or target build))
4071 configure-flags)))))))
4072 (add-after 'build 'build-docs
4074 (invoke "make" "-Cdocs" "pdf" "html")))
4077 (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/hypre/lib"))
4078 (setenv "PATH" (string-append "." ":" (getenv "PATH")))
4079 (invoke "make" "check" "CHECKRUN=")
4080 (for-each (lambda (filename)
4081 (let ((size (stat:size (stat filename))))
4082 (when (positive? size)
4083 (error (format #f "~a size ~d; error indication~%"
4085 (find-files "test" ".*\\.err$"))
4087 (add-after 'install 'install-docs
4088 (lambda* (#:key outputs #:allow-other-keys)
4089 ;; Custom install because docs/Makefile doesn't honor ${docdir}.
4090 (let* ((doc (assoc-ref outputs "doc"))
4091 (docdir (string-append doc "/share/doc/hypre-" ,version)))
4092 (with-directory-excursion "docs"
4093 (for-each (lambda (base)
4094 (install-file (string-append base ".pdf") docdir)
4095 (copy-recursively base docdir)) ; html docs
4096 '("HYPRE_usr_manual"
4097 "HYPRE_ref_manual")))
4099 (home-page "http://www.llnl.gov/casc/hypre/")
4100 (synopsis "Library of solvers and preconditioners for linear equations")
4102 "HYPRE is a software library of high performance preconditioners and
4103 solvers for the solution of large, sparse linear systems of equations. It
4104 features multigrid solvers for both structured and unstructured grid
4106 (license license:lgpl2.1)))
4108 (define-public hypre-openmpi
4109 (package (inherit hypre)
4110 (name "hypre-openmpi")
4113 ,@(package-inputs hypre)))
4115 (substitute-keyword-arguments (package-arguments hypre)
4116 ((#:configure-flags flags)
4118 ,@(delete "--without-MPI" ,flags)))
4120 `(modify-phases ,phases
4121 (add-before 'check 'mpi-setup
4122 ,%openmpi-setup)))))
4123 (synopsis "Parallel solvers and preconditioners for linear equations")
4125 "HYPRE is a software library of high performance preconditioners and
4126 solvers for the solution of large, sparse linear systems of equations on
4127 parallel computers. It features parallel multigrid solvers for both
4128 structured and unstructured grid problems.")))
4130 (define-public matio
4137 (uri (string-append "mirror://sourceforge/matio/matio/" version "/"
4138 "matio-" version ".tar.gz"))
4141 "0y2qymgxank8wdiwc68ap8bxdzrhvyw86i29yh3xgn4z1njfd9ir"))))
4142 (build-system gnu-build-system)
4146 (home-page "http://matio.sourceforge.net/")
4147 (synopsis "Library for reading and writing MAT files")
4148 (description "Matio is a library for reading and writing MAT files. It
4149 supports compressed MAT files, as well as newer (version 7.3) MAT files.")
4150 (license license:bsd-2)))
4157 (origin (method url-fetch)
4158 (uri (string-append "https://github.com/VcDevel/Vc/releases/"
4159 "download/" version "/Vc-" version ".tar.gz"))
4162 "17qili8bf8r78cng65yf4qmgna8kiqjqbgcqbric6v9j6nkhkrk8"))))
4163 (build-system cmake-build-system)
4166 '("-DBUILD_TESTING=ON"
4167 ;; By default, Vc will optimize for the CPU of the build machine.
4168 ;; Setting this to "none" makes it create portable binaries. See
4169 ;; "cmake/OptimizeForArchitecture.cmake".
4170 "-DTARGET_ARCHITECTURE=none")
4171 #:phases (modify-phases %standard-phases
4172 (add-after 'unpack 'copy-testdata
4173 (lambda* (#:key inputs native-inputs #:allow-other-keys)
4174 (let ((testdata (assoc-ref (or native-inputs inputs)
4176 (copy-recursively testdata "tests/testdata")
4179 `(("virtest" ,virtest)
4181 ;; This is a submodule in the git project, but not part of the
4182 ;; released sources. See the git branch for the commit to take.
4183 ("testdata" ,(let ((commit "9ada1f34d6a41f1b5553d6223f277eae72c039d3"))
4187 (url "https://github.com/VcDevel/vc-testdata")
4188 (commit "9ada1f34d6a41f1b5553d6223f277eae72c039d3")))
4189 (file-name (git-file-name "vc-testdata"
4190 (string-take commit 7)))
4193 "1hkhqib03qlcq412ym2dciynfxcdr2ygqhnplz4l1vissr1wnqn2")))))))
4194 (synopsis "SIMD vector classes for C++")
4195 (description "Vc provides portable, zero-overhead C++ types for explicitly
4196 data-parallel programming. It is a library designed to ease explicit
4197 vectorization of C++ code. Its types enable explicitly stating data-parallel
4198 operations on multiple values. The parallelism is therefore added via the type
4199 system. Vc has an intuitive API and provides portability between different
4200 compilers and compiler versions as well as portability between different vector
4201 instruction sets. Thus, an application written with Vc can be compiled for:
4204 @item SSE2 up to SSE4.2 or SSE4a
4207 @item NEON (in development)
4208 @item NVIDIA GPUs / CUDA (in development)
4210 (home-page "https://github.com/VcDevel/Vc")
4211 ;; "No support_???.cpp file exists for this architecture."
4212 (supported-systems '("x86_64-linux" "i686-linux"))
4213 (license license:bsd-3)))
4215 (define-public reducelcs
4216 ;; This is the last commit which is available upstream, no
4217 ;; release happened since 2010.
4218 (let ((commit "474f88deb968061abe8cf11c959e02319b8ae5c0")
4222 (version (string-append "1.0-" revision "." (string-take commit 7)))
4227 (url "https://github.com/gdv/Reduce-Expand-for-LCS")
4229 (file-name (string-append name "-" version "-checkout"))
4232 "1rllzcfwc042c336mhq262a8ha90x6afq30kvk60r7i4761j4yjm"))))
4233 (build-system gnu-build-system)
4235 `(("openlibm" ,openlibm)))
4237 `(#:tests? #f ; no tests
4239 (modify-phases %standard-phases
4240 (delete 'configure) ; No configure script exists.
4241 (replace 'install ; No install phase exists.
4242 (lambda* (#:key outputs #:allow-other-keys)
4243 (let* ((out (assoc-ref outputs "out"))
4244 (bin (string-append out "/bin")))
4245 (install-file "Approximation" bin)
4246 (install-file "CollectResults" bin)
4247 (install-file "GenerateInstances" bin)
4249 (synopsis "Approximate Longest Commons Subsequence computation tool")
4251 "@code{reduceLCS} is an implementation of the Reduce-Expand
4252 algorithm for LCS. It is a fast program to compute the approximate
4253 Longest Commons Subsequence of a set of strings.")
4254 (home-page "https://github.com/gdv/Reduce-Expand-for-LCS")
4255 (license license:gpl3+))))
4257 (define-public jacal
4264 "http://groups.csail.mit.edu/mac/ftpdir/scm/jacal-"
4267 "055zrn12a1dmy0dqkwrkq3fklbhg3yir6vn0lacp4mvbg8573a3q"))
4268 (patches (search-patches "jacal-fix-texinfo.patch"))))
4269 (build-system gnu-build-system)
4272 (modify-phases %standard-phases
4273 (add-before 'build 'pre-build
4274 ;; Don't use upstream's script - it really doesn't fit into
4275 ;; Guix's functional paradigm.
4276 (lambda* (#:key inputs outputs #:allow-other-keys)
4277 (substitute* "Makefile"
4278 (("^install: install-script") "install: "))))
4279 (add-after 'install 'post-install
4280 ;; Instead, we provide our own simplified script.
4281 (lambda* (#:key inputs outputs #:allow-other-keys)
4282 (let ((wrapper (string-append (assoc-ref outputs "out")
4284 (format (open wrapper (logior O_WRONLY O_CREAT))
4285 (string-append "#!~a\nexec ~a/bin/scm -ip1 "
4286 "-e '(slib:load \"~a/lib/jacal/math\") "
4289 (assoc-ref inputs "scm")
4290 (assoc-ref outputs "out"))
4291 (chmod wrapper #o555))))
4293 (lambda* (#:key outputs #:allow-other-keys)
4294 (invoke "./configure"
4295 (string-append "--prefix="
4296 (assoc-ref outputs "out"))))))))
4297 (inputs `(("scm" ,scm)))
4298 (native-inputs `(("unzip" ,unzip)
4299 ("texinfo" ,texinfo)))
4300 (synopsis "Symbolic mathematics system")
4301 (description "GNU JACAL is an interactive symbolic mathematics program based on
4302 Scheme. It manipulate and simplify a range of mathematical expressions such
4303 as equations, scalars, vectors, and matrices.")
4304 (home-page "https://www.gnu.org/software/jacal/")
4305 (license license:gpl3+)))
4311 (home-page "https://github.com/Z3Prover/z3")
4314 (uri (git-reference (url home-page)
4315 (commit (string-append "z3-" version))))
4316 (file-name (git-file-name name version))
4319 "0hprcdwhhyjigmhhk6514m71bnmvqci9r8gglrqilgx424r6ff7q"))))
4320 (build-system gnu-build-system)
4322 `(#:imported-modules ((guix build python-build-system)
4323 ,@%gnu-build-system-modules)
4324 #:modules (((guix build python-build-system) #:select (site-packages))
4325 (guix build gnu-build-system)
4328 (modify-phases %standard-phases
4329 (add-after 'unpack 'enable-bytecode-determinism
4331 (setenv "PYTHONHASHSEED" "0")
4333 (add-after 'unpack 'fix-compatability
4334 ;; Versions after 4.8.3 have immintrin.h IFDEFed for Windows only.
4336 (substitute* "src/util/mpz.cpp"
4337 (("#include <immintrin.h>") ""))
4339 (add-before 'configure 'bootstrap
4341 (invoke "python" "scripts/mk_make.py")))
4342 ;; work around gnu-build-system's setting --enable-fast-install
4343 ;; (z3's `configure' is a wrapper around the above python file,
4344 ;; which fails when passed --enable-fast-install)
4346 (lambda* (#:key inputs outputs #:allow-other-keys)
4347 (invoke "./configure"
4349 (string-append "--prefix=" (assoc-ref outputs "out"))
4350 (string-append "--pypkgdir=" (site-packages inputs outputs)))))
4351 (add-after 'configure 'change-directory
4355 (add-before 'check 'make-test-z3
4357 ;; Build the test suite executable.
4358 (invoke "make" "test-z3" "-j"
4359 (number->string (parallel-job-count)))))
4362 ;; Run all the tests that don't require arguments.
4363 (invoke "./test-z3" "/a"))))))
4366 ("python" ,python-wrapper)))
4367 (synopsis "Theorem prover")
4368 (description "Z3 is a theorem prover and @dfn{satisfiability modulo
4369 theories} (SMT) solver. It provides a C/C++ API, as well as Python bindings.")
4370 (license license:expat)))
4375 (version "2018.11.001")
4378 (uri (string-append "http://elpa.mpcdf.mpg.de/html/Releases/"
4379 version "/elpa-" version ".tar.gz"))
4382 "05hv3v5i6xmziaizw350ff72y1c3k662r85fm3xfdrkclj5zw9yc"))))
4383 (build-system gnu-build-system)
4385 `(("fortran" ,gfortran)
4386 ("perl" ,perl))) ;for configure and deps
4388 `(("blas" ,openblas)))
4393 ;; ELPA unfortunately does not support runtime dispatch, so we can
4394 ;; only enable the "generic" kernels. See the "Cross compilation"
4395 ;; section of INSTALL.md.
4397 "--disable-sse" "--disable-sse-assembly" ;Require SSE3
4398 "--disable-avx" "--disable-avx2" "--disable-avx512"
4399 ,(string-append "CFLAGS=-O3 "
4400 "-funsafe-loop-optimizations -funsafe-math-optimizations "
4401 "-ftree-vect-loop-version -ftree-vectorize "
4402 ,(let ((system (or (%current-target-system)
4403 (%current-system))))
4405 ((or (string-prefix? "x86_64" system)
4406 (string-prefix? "i686" system))
4409 #:parallel-tests? #f ;tests are multi-threaded, via BLAS
4411 (modify-phases %standard-phases
4412 (add-before 'configure 'patch-header-generation
4414 (substitute* "configure"
4415 (("^ *make.*top_srcdir=\"\\$srcdir\"" &)
4416 (string-append & " CPP=\"$CPP\"")))
4418 (add-before 'check 'setup-tests
4420 ;; Decrease test time and RAM use by computing fewer eigenvalues.
4421 ;; The flags are (MATRIX-SIZE, EIGENVALUES, BLOCK-SIZE), where
4422 ;; the default is (500, 250, 16) for C tests and (5000, 150, 16)
4423 ;; for Fortran. This also causes several tests to pass that
4424 ;; otherwise would otherwise fail with matrix size 5000; possibly
4425 ;; due to floating point tolerances that are too tight.
4426 (setenv "TEST_FLAGS" "1500 50 16") ;from elpa.spec
4427 (setenv "OMP_NUM_THREADS" (number->string (parallel-job-count)))
4428 (substitute* "Makefile"
4429 ;; Test scripts are generated, patch the shebang
4430 (("#!/bin/bash") (string-append "#!" (which "sh"))))
4432 (home-page "http://elpa.mpcdf.mpg.de")
4433 (synopsis "Eigenvalue solvers for symmetric matrices")
4435 "The ELPA library provides efficient and scalable direct eigensolvers for
4436 symmetric matrices.")
4437 (license license:lgpl3)))
4439 (define-public elpa-openmpi
4440 (package (inherit elpa)
4441 (name "elpa-openmpi")
4444 ("scalapack" ,scalapack)
4445 ,@(package-inputs elpa)))
4447 (substitute-keyword-arguments (package-arguments elpa)
4448 ((#:configure-flags cf '())
4449 `(cons "--with-mpi=yes" (delete "--with-mpi=no" ,cf)))
4450 ((#:phases phases '%standard-phases)
4451 `(modify-phases ,phases
4452 (add-before 'check 'mpi-setup
4454 ;; Tests use 2 mpi tasks by default, use our remaining build
4455 ;; cores as OpenMP threads.
4456 (setenv "OMP_NUM_THREADS" (number->string
4457 (max (quotient (parallel-job-count) 2)
4459 (,%openmpi-setup)))))))
4460 (synopsis "Eigenvalue solvers for symmetric matrices (with MPI support)")))
4462 (define-public elemental
4469 (url "https://github.com/elemental/Elemental.git")
4470 (commit (string-append "v" version))))
4471 (file-name (git-file-name name version))
4474 "1687xpjjzig27y2pnqv7hv09smpijyfdpz7qjgmcxf4shfajlfkc"))))
4475 (build-system cmake-build-system)
4476 (home-page "https://github.com/elemental/Elemental")
4478 `(("gfortran" ,gfortran)))
4480 `(("blas" ,openblas)
4481 ("gfortran:lib" ,gfortran "lib")
4490 `(#:build-type "Release" ;default RelWithDebInfo not supported
4491 #:configure-flags `("-DEL_DISABLE_PARMETIS:BOOL=YES"
4492 "-DEL_AVOID_COMPLEX_MPI:BOOL=NO"
4493 "-DEL_CACHE_WARNINGS:BOOL=YES"
4494 "-DEL_TESTS:BOOL=YES"
4495 "-DCMAKE_INSTALL_LIBDIR=lib"
4496 "-DGFORTRAN_LIB=gfortran")
4497 #:phases (modify-phases %standard-phases
4498 (add-before 'check 'mpi-setup
4500 (add-before 'check 'setup-tests
4502 ;; Parallelism is done at the MPI layer.
4503 (setenv "OMP_NUM_THREADS" "1")
4505 (add-after 'install 'remove-tests
4506 (lambda* (#:key outputs #:allow-other-keys)
4507 ;; Tests are installed, with no easy configuration
4508 ;; switch to prevent this, so delete them.
4509 (delete-file-recursively
4510 (string-append (assoc-ref outputs "out") "/bin"))
4512 (synopsis "Dense and sparse-direct linear algebra and optimization")
4513 (description "Elemental is a modern C++ library for distributed-memory
4514 dense and sparse-direct linear algebra, conic optimization, and lattice
4516 (license license:bsd-2)))
4518 (define-public mcrl2
4521 (version "201908.0")
4525 "https://www.mcrl2.org/download/release/mcrl2-"
4529 "1i4xgl2d5fgiz1mwi50cyfkrrcpm8nxfayfjgmhq7chs58wlhfsz"))))
4534 ("qtbase" ,qtbase)))
4535 (build-system cmake-build-system)
4536 (synopsis "Toolset for the mCRL2 formal specification language")
4538 "@dfn{mCRL2} (micro Common Representation Language 2) is a formal
4539 specification language for describing concurrent discrete event systems. Its
4540 toolset supports analysis and automatic verification, linearisation, simulation,
4541 state-space exploration and generation, and tools to optimise and analyse
4542 specifications. Also, state spaces can be manipulated, visualised and
4544 (home-page "https://mcrl2.org")
4545 (license license:boost1.0)))
4547 (define-public mcrl2-minimal
4550 (name "mcrl2-minimal")
4552 `(("boost" ,boost)))
4554 '(#:configure-flags '("-DMCRL2_ENABLE_GUI_TOOLS=OFF")))))
4556 (define-public tcalc
4563 (uri (string-append "https://sites.google.com/site/mohammedisam2000/tcalc/tcalc-"
4567 "0jq806m4dqfia85nppfm75mml9w57g0cgv4cdw9bp3zymda83s0m"))))
4568 (build-system gnu-build-system)
4569 (synopsis "The terminal calculator")
4571 "The terminal calculator is a small program to help users of the GNU/Linux
4572 terminal do calculations simply and quickly. The formula to be calculated can
4573 be fed to @command{tcalc} through the command line.")
4574 (home-page "https://sites.google.com/site/mohammedisam2000/tcalc")
4575 (license license:gpl3+)))
4577 (define-public sundials
4584 (uri (string-append "https://computation.llnl.gov/projects/sundials/download/"
4585 "sundials-" version ".tar.gz"))
4588 "090s8ymhd0g1s1d44fa73r5yi32hb4biwahhbfi327zd64yn8kd2"))))
4589 (build-system cmake-build-system)
4591 `(("python" ,python-2))) ;for tests; syntax incompatible with python 3
4593 `(("fortran" ,gfortran) ;for fcmix
4595 ("suitesparse" ,suitesparse))) ;TODO: Add hypre
4597 `(#:configure-flags `("-DEXAMPLES_ENABLE_C:BOOL=ON"
4598 "-DEXAMPLES_ENABLE_CXX:BOOL=ON"
4599 "-DEXAMPLES_ENABLE_F77:BOOL=ON"
4600 "-DEXAMPLES_ENABLE_F90:BOOL=ON"
4601 "-DEXAMPLES_INSTALL:BOOL=OFF"
4603 "-DFCMIX_ENABLE:BOOL=ON"
4605 "-DKLU_ENABLE:BOOL=ON"
4606 ,(string-append "-DKLU_INCLUDE_DIR="
4607 (assoc-ref %build-inputs "suitesparse")
4609 ,(string-append "-DKLU_LIBRARY_DIR="
4610 (assoc-ref %build-inputs "suitesparse")
4612 (home-page "https://computation.llnl.gov/projects/sundials")
4613 (synopsis "Suite of nonlinear and differential/algebraic equation solvers")
4614 (description "SUNDIALS is a family of software packages implemented with
4615 the goal of providing robust time integrators and nonlinear solvers that can
4616 easily be incorporated into existing simulation codes.")
4617 (license license:bsd-3)))
4619 (define-public sundials-openmpi
4620 (package (inherit sundials)
4621 (name "sundials-openmpi")
4624 ("petsc" ,petsc-openmpi) ;support in SUNDIALS requires MPI
4625 ,@(package-inputs sundials)))
4627 (substitute-keyword-arguments (package-arguments sundials)
4628 ((#:configure-flags flags '())
4629 `(cons* "-DMPI_ENABLE:BOOL=ON"
4630 "-DPETSC_ENABLE:BOOL=ON"
4631 (string-append "-DPETSC_INCLUDE_DIR="
4632 (assoc-ref %build-inputs "petsc")
4634 (string-append "-DPETSC_LIBRARY_DIR="
4635 (assoc-ref %build-inputs "petsc")
4638 ((#:phases phases '%standard-phases)
4639 `(modify-phases ,phases
4640 (add-before 'check 'mpi-setup
4641 ,%openmpi-setup)))))
4642 (synopsis "SUNDIALS with OpenMPI support")))
4644 (define-public combinatorial-blas
4646 (name "combinatorial-blas")
4651 (uri (string-append "http://eecs.berkeley.edu/~aydin/CombBLAS_FILES/"
4653 (match (string-split version #\.)
4654 ((major minor patch)
4655 (string-append major minor "_" patch))) ;e.g. "16_2"
4659 "1a9wbgdqyy1whhfc0yl0yqkax3amnqa6iihhq48d063gc0jwfd9a"))
4660 (patches (search-patches "combinatorial-blas-awpm.patch"
4661 "combinatorial-blas-io-fix.patch"))))
4662 (build-system cmake-build-system)
4665 ("test-data" ,(origin
4667 (uri (string-append "https://people.eecs.berkeley.edu/~aydin/"
4668 "CombBLAS_FILES/testdata_combblas1.6.1.tgz"))
4671 "01y2781cy3fww7znmidrp85mf8zx0c905w5vzvk1mgrmhhynim87"))))))
4673 `(#:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES"
4674 "-DCMAKE_CXX_FLAGS=-DUSE_FUNNEL")
4675 #:parallel-tests? #f ;tests use 'mpiexec -n4'
4677 (modify-phases %standard-phases
4678 (add-before 'check 'mpi-setup
4680 (add-before 'check 'test-setup
4681 (lambda* (#:key inputs #:allow-other-keys)
4682 (setenv "OMP_NUM_THREADS" "2")
4683 (invoke "tar" "xf" (assoc-ref inputs "test-data")))))))
4684 (home-page "https://people.eecs.berkeley.edu/~aydin/CombBLAS/html/")
4685 (synopsis "Linear algebra primitives for graph analytics")
4686 (description "The Combinatorial BLAS (CombBLAS) is an extensible
4687 distributed-memory parallel graph library offering a small but powerful set of
4688 linear algebra primitives specifically targeting graph analytics.")
4690 license:gpl2+ ;include/psort/(funnel|sort)*.h
4691 license:x11 ;usort and psort
4692 license:bsd-3)))) ;CombBLAS and MersenneTwister.h
4694 (define-public dune-common
4696 (name "dune-common")
4701 (uri (string-append "https://dune-project.org/download/"
4702 version "/dune-common-" version ".tar.gz"))
4705 "019wcr1qf7jwyxx1y5y290wdlglylskvbb2m01ljkzcza2xnlmhw"))))
4706 (build-system cmake-build-system)
4709 (modify-phases %standard-phases
4710 (add-after 'build 'build-tests
4711 (lambda* (#:key make-flags #:allow-other-keys)
4712 (apply invoke "make" "build_tests" make-flags))))))
4716 ("openblas" ,openblas)
4718 ("superlu" ,superlu)))
4720 `(("gfortran" ,gfortran)
4721 ("pkg-config" ,pkg-config)))
4722 (home-page "https://dune-project.org/")
4723 (synopsis "Distributed and Unified Numerics Environment")
4724 (description "DUNE, the Distributed and Unified Numerics Environment is a
4725 modular toolbox for solving @dfn{partial differential equations} (PDEs) with
4726 grid-based methods. It supports the easy implementation of methods like
4727 @dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite
4728 Differences} (FD).")
4729 ;; GPL version 2 with "runtime exception" to make it behave like LGPLv2.
4730 (license license:gpl2)))
4732 (define-public dune-geometry
4734 (name "dune-geometry")
4739 (uri (string-append "https://dune-project.org/download/"
4740 version "/dune-geometry-" version ".tar.gz"))
4743 "0hlaaxjyv9j05blasvb67sy02hd0w4g9znf68gdh3l731dd1aqbn"))))
4744 (build-system cmake-build-system)
4747 (modify-phases %standard-phases
4748 (add-after 'build 'build-tests
4749 (lambda* (#:key make-flags #:allow-other-keys)
4750 (apply invoke "make" "build_tests" make-flags))))))
4752 `(("dune-common" ,dune-common)
4754 ("openblas" ,openblas)
4756 ("python" ,python)))
4758 `(("gfortran" ,gfortran)
4759 ("pkg-config" ,pkg-config)))
4760 (home-page "https://dune-project.org/")
4761 (synopsis "Distributed and Unified Numerics Environment")
4762 (description "DUNE, the Distributed and Unified Numerics Environment is a
4763 modular toolbox for solving @dfn{partial differential equations} (PDEs) with
4764 grid-based methods. It supports the easy implementation of methods like
4765 @dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite
4768 This package contains the basic DUNE geometry classes.")
4769 ;; GPL version 2 with "runtime exception"
4770 (license license:gpl2)))
4772 (define-public dune-uggrid
4774 (name "dune-uggrid")
4779 (uri (string-append "https://dune-project.org/download/"
4780 version "/dune-uggrid-" version ".tar.gz"))
4783 "05l7a1gb78mny49anyxk6rjvn66rhgm30y72v5cjg0m5kfgr1a1f"))))
4784 (build-system cmake-build-system)
4787 (modify-phases %standard-phases
4788 (add-after 'build 'build-tests
4789 (lambda* (#:key make-flags #:allow-other-keys)
4790 (apply invoke "make" "build_tests" make-flags))))))
4792 `(("dune-common" ,dune-common)))
4794 `(("gfortran" ,gfortran)
4795 ("pkg-config" ,pkg-config)))
4796 (home-page "https://dune-project.org/")
4797 (synopsis "Distributed and Unified Numerics Environment")
4798 (description "DUNE, the Distributed and Unified Numerics Environment is a
4799 modular toolbox for solving @dfn{partial differential equations} (PDEs) with
4800 grid-based methods. It supports the easy implementation of methods like
4801 @dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite
4804 This package contains the DUNE UG grid classes.")
4805 (license license:lgpl2.1)))
4807 (define-public dune-grid
4814 (uri (string-append "https://dune-project.org/download/"
4815 version "/dune-grid-" version ".tar.gz"))
4818 "1jp4vscm9yb9xg0lh7apzccfkhvgbnk652yahigmh3cvzpl4acd0"))))
4819 (build-system cmake-build-system)
4822 (modify-phases %standard-phases
4823 (add-after 'build 'build-tests
4824 (lambda* (#:key make-flags #:allow-other-keys)
4825 (apply invoke "make" "build_tests" make-flags))))))
4827 `(("dune-common" ,dune-common)
4828 ("dune-geometry" ,dune-geometry)
4831 ("openblas" ,openblas)
4832 ("python" ,python)))
4834 `(("dune-uggrid" ,dune-uggrid)))
4836 `(("gfortran" ,gfortran)
4837 ("pkg-config" ,pkg-config)))
4838 (home-page "https://dune-project.org/")
4839 (synopsis "Distributed and Unified Numerics Environment")
4840 (description "DUNE, the Distributed and Unified Numerics Environment is a
4841 modular toolbox for solving @dfn{partial differential equations} (PDEs) with
4842 grid-based methods. It supports the easy implementation of methods like
4843 @dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite
4846 This package contains the basic DUNE grid classes.")
4847 ;; GPL version 2 with "runtime exception"
4848 (license license:gpl2)))
4850 (define-public dune-istl
4857 (uri (string-append "https://dune-project.org/download/"
4858 version "/dune-istl-" version ".tar.gz"))
4861 "0l2gyrvys5w6wsmk0ckbb7295s80b7yk7qrl7x66akv2jv1nzq2w"))))
4862 (build-system cmake-build-system)
4865 (modify-phases %standard-phases
4866 (add-after 'build 'build-tests
4867 (lambda* (#:key make-flags #:allow-other-keys)
4868 (apply invoke "make" "build_tests" make-flags))))))
4870 `(("dune-common" ,dune-common)
4873 ("suitesparse" ,suitesparse)
4874 ("superlu" ,superlu)
4875 ("openblas" ,openblas)
4877 ("python" ,python)))
4879 `(("gfortran" ,gfortran)
4880 ("pkg-config" ,pkg-config)))
4881 (home-page "https://dune-project.org/")
4882 (synopsis "Distributed and Unified Numerics Environment")
4883 (description "DUNE, the Distributed and Unified Numerics Environment is a
4884 modular toolbox for solving @dfn{partial differential equations} (PDEs) with
4887 This is the iterative solver template library which provides generic sparse
4888 matrix/vector classes and a variety of solvers based on these classes. A
4889 special feature is the use of templates to exploit the recursive block
4890 structure of finite element matrices at compile time. Available solvers
4891 include Krylov methods, (block-) incomplete decompositions and
4892 aggregation-based algebraic multigrid.")
4893 ;; GPL version 2 with "runtime exception"
4894 (license license:gpl2)))
4896 (define-public dune-localfunctions
4898 (name "dune-localfunctions")
4903 (uri (string-append "https://dune-project.org/download/"
4904 version "/dune-localfunctions-" version ".tar.gz"))
4907 "19c6zjinwwpy8jh4v4prhphyd438rapd4x80fj93apmwgw04nrhl"))))
4908 (build-system cmake-build-system)
4911 (modify-phases %standard-phases
4912 (add-after 'build 'build-tests
4913 (lambda* (#:key make-flags #:allow-other-keys)
4914 (apply invoke "make" "build_tests" make-flags))))))
4916 `(("dune-common" ,dune-common)
4917 ("dune-geometry" ,dune-geometry)
4920 ("superlu" ,superlu)
4923 `(("gfortran" ,gfortran)
4924 ("pkg-config" ,pkg-config)))
4925 (home-page "https://dune-project.org/")
4926 (synopsis "Distributed and Unified Numerics Environment") ; TODO
4927 (description "This DUNE module provides interface and implementation for
4928 shape functions defined on the DUNE reference elements. In addition to the
4929 shape function, interpolation operators and special keys are provided which
4930 can be used to assemble global function spaces on finite-element grids.
4932 This package provides an interface and implementation for shape functions
4933 defined on the DUNE reference elements. In addition to the shape function,
4934 interpolation operators and special keys are provided which can be used to
4935 assemble global function spaces on finite-element grids.")
4936 ;; GPL version 2 with "runtime exception"
4937 (license license:gpl2)))
4939 (define-public dune-alugrid
4941 (name "dune-alugrid")
4946 (uri (string-append "https://dune-project.org/download/"
4947 version "/dune-alugrid-" version ".tar.gz"))
4950 "1l9adgyjpra8mvwm445s0lpjshnb63jag85fb2hisbjn6bm320yj"))))
4951 (build-system cmake-build-system)
4954 (modify-phases %standard-phases
4955 (add-after 'unpack 'patch-include
4957 (substitute* "dune/alugrid/test/test-alugrid.cc"
4958 (("doc/grids/gridfactory/testgrids")
4959 "doc/dune-grid/grids/gridfactory/testgrids"))
4961 (add-after 'build 'build-tests
4962 (lambda* (#:key inputs make-flags #:allow-other-keys)
4963 (setenv "CPLUS_INCLUDE_PATH"
4964 (string-append (assoc-ref inputs "dune-grid") "/share"))
4965 (apply invoke "make" "build_tests" make-flags))))))
4967 `(("dune-common" ,dune-common)
4968 ("dune-geometry" ,dune-geometry)
4969 ("dune-grid" ,dune-grid)
4972 ("openblas" ,openblas)
4974 ("superlu" ,superlu)
4978 `(("gfortran" ,gfortran)
4979 ("pkg-config" ,pkg-config)))
4980 (home-page "https://dune-project.org/")
4981 (synopsis "Distributed and Unified Numerics Environment")
4982 (description "ALUGrid is an adaptive, loadbalancing, unstructured
4983 implementation of the DUNE grid interface supporting either simplices or
4985 (license license:gpl2+)))
4987 (define-public dune-subgrid
4989 (name "dune-subgrid")
4995 (url "https://git.imp.fu-berlin.de/agnumpde/dune-subgrid")
4996 (commit "releases/2.6-1")))
4997 (file-name (git-file-name name version))
5000 "1gcv35rx3knqd54r4pp9rzd639db4j8w2r2ibq43w1mgwdcqhs64"))))
5001 (build-system cmake-build-system)
5004 (modify-phases %standard-phases
5005 (add-after 'build 'build-tests
5006 (lambda* (#:key make-flags #:allow-other-keys)
5007 (apply invoke "make" "build_tests" make-flags))))))
5009 `(("dune-common" ,dune-common)
5010 ("dune-geometry" ,dune-geometry)
5011 ("dune-grid" ,dune-grid)
5014 ("openblas" ,openblas)
5017 `(("gfortran" ,gfortran)
5018 ("pkg-config" ,pkg-config)))
5019 (home-page "http://numerik.mi.fu-berlin.de/dune-subgrid/index.php")
5020 (synopsis "Distributed and Unified Numerics Environment")
5021 (description "The dune-subgrid module allows to mark elements of
5022 another hierarchical dune grid. The set of marked elements can then be
5023 accessed as a hierarchical dune grid in its own right. Dune-Subgrid
5024 provides the full grid interface including adaptive mesh refinement.")
5025 (license license:gpl2+)))
5027 (define-public dune-typetree
5029 (name "dune-typetree")
5035 (url "https://gitlab.dune-project.org/staging/dune-typetree.git")
5036 (commit (string-append "v" version))))
5037 (file-name (git-file-name name version))
5040 "0mnv6w2f22lz3j4bdpdjq55vjm8xxfx9v4vvhg9bd36xpsbjpjp9"))))
5041 (build-system cmake-build-system)
5044 (modify-phases %standard-phases
5045 (add-after 'build 'build-tests
5046 (lambda* (#:key make-flags #:allow-other-keys)
5047 (apply invoke "make" "build_tests" make-flags))))))
5049 `(("dune-common" ,dune-common)
5051 ("openblas" ,openblas)
5054 ("superlu" ,superlu)
5057 `(("gfortran" ,gfortran)
5058 ("pkg-config" ,pkg-config)))
5059 (home-page "https://dune-project.org/")
5060 (synopsis "Distributed and Unified Numerics Environment")
5061 (description "TypeTree is a template library for constructing and
5062 operating on statically typed trees of objects.")
5063 ;; Either GPL version 2 with "runtime exception" or LGPLv3+.
5064 (license (list license:lgpl3+ license:gpl2))))
5066 (define-public dune-functions
5068 (name "dune-functions")
5074 (url "https://gitlab.dune-project.org/staging/dune-functions.git")
5075 (commit (string-append "v" version))))
5076 (file-name (git-file-name name version))
5079 "1an8gb477n8j0kzpbrv7nr1snh8pxip0gsxq6w63jc83gg3dj200"))))
5080 (build-system cmake-build-system)
5083 (modify-phases %standard-phases
5084 (add-after 'unpack 'disable-failing-tests
5087 ;; unable to load GMSH file in this test
5088 "--exclude-regex gridviewfunctionspacebasistest")
5090 (add-after 'build 'build-tests
5091 (lambda* (#:key make-flags #:allow-other-keys)
5092 (apply invoke "make" "build_tests" make-flags))))))
5094 `(("dune-common" ,dune-common)
5095 ("dune-istl" ,dune-istl)
5096 ("dune-localfunctions" ,dune-localfunctions)
5097 ("dune-grid" ,dune-grid)
5098 ("dune-geometry" ,dune-geometry)
5099 ("dune-typetree" ,dune-typetree)
5100 ("openblas" ,openblas)
5103 ("superlu" ,superlu)
5106 `(("gfortran" ,gfortran)
5107 ("pkg-config" ,pkg-config)))
5108 (home-page "https://dune-project.org/")
5109 (synopsis "Distributed and Unified Numerics Environment")
5110 (description "The dune-functions module provides an abstraction layer for
5111 global finite element functions. Its two main concepts are functions
5112 implemented as callable objects, and bases of finite element spaces.")
5113 ;; Either GPL version 2 with "runtime exception" or LGPLv3+.
5114 (license (list license:lgpl3+ license:gpl2))))
5116 (define-public dune-pdelab
5118 (name "dune-pdelab")
5119 (version "2.6.0-rc1")
5124 (url "https://gitlab.dune-project.org/pdelab/dune-pdelab")
5125 (commit (string-append "v" version))))
5126 (file-name (git-file-name name version))
5129 "07g0s9448z65vjrq88g5rv3340iifil85k170n8kbqchsvi4ny5v"))))
5130 (build-system cmake-build-system)
5131 (arguments '(#:tests? #f)) ; XXX: the tests cannot be compiled
5133 `(("dune-common" ,dune-common)
5134 ("dune-istl" ,dune-istl)
5135 ("dune-localfunctions" ,dune-localfunctions)
5136 ("dune-geometry" ,dune-geometry)
5137 ("dune-grid" ,dune-grid)
5138 ("dune-typetree" ,dune-typetree)
5139 ("dune-functions" ,dune-functions)
5141 ("openblas" ,openblas)
5145 ("superlu" ,superlu)
5148 `(("gfortran" ,gfortran)
5149 ("pkg-config" ,pkg-config)))
5150 (home-page "https://dune-project.org/")
5151 (synopsis "Differential equations solver toolbox")
5152 (description "PDELab is a partial differential equations solver toolbox
5153 built on top of DUNE, the Distributed and Unified Numerics Environment.")
5154 ;; Either GPL version 2 with "runtime exception" or LGPLv3+.
5155 (license (list license:lgpl3+ license:gpl2))))
5157 (define add-openmpi-to-dune-package
5158 (let ((dune-package?
5159 (lambda (p) (string-prefix? "dune-" (package-name p)))))
5162 (if (dune-package? p)
5163 (package (inherit p)
5164 (name (string-append (package-name p) "-openmpi"))
5165 (inputs `(,@(package-inputs p)
5166 ("openmpi" ,openmpi)))
5168 (substitute-keyword-arguments (package-arguments p)
5169 ((#:phases phases '%standard-phases)
5170 `(modify-phases ,phases
5171 (add-before 'check 'mpi-setup
5172 ,%openmpi-setup)))))
5173 (synopsis (string-append (package-synopsis p) " (with MPI support)")))
5175 (negate dune-package?))))
5177 (define-public dune-common-openmpi
5178 (add-openmpi-to-dune-package dune-common))
5180 (define-public dune-geometry-openmpi
5181 (add-openmpi-to-dune-package dune-geometry))
5183 (define-public dune-istl-openmpi
5184 (add-openmpi-to-dune-package dune-istl))
5186 (define-public dune-typetree-openmpi
5187 (add-openmpi-to-dune-package dune-typetree))
5189 (define-public dune-uggrid-openmpi
5190 (add-openmpi-to-dune-package dune-uggrid))
5192 (define-public dune-grid-openmpi
5193 (add-openmpi-to-dune-package dune-grid))
5195 (define-public dune-alugrid-openmpi
5196 (add-openmpi-to-dune-package dune-alugrid))
5198 (define-public dune-subgrid-openmpi
5199 (add-openmpi-to-dune-package dune-subgrid))
5201 (define-public dune-localfunctions-openmpi
5202 (add-openmpi-to-dune-package dune-localfunctions))
5204 (define-public dune-functions-openmpi
5205 (add-openmpi-to-dune-package dune-functions))
5207 (define-public dune-pdelab-openmpi
5208 (add-openmpi-to-dune-package dune-pdelab))
5210 (define-public mlucas
5218 "https://mersenneforum.org/mayer/src/C/mlucas_v" version ".txz"))
5220 (base32 "0h4xj6pyyac79ka5ibqjilfa3s9j3yxnzgpwc57b54kfh2bj3447"))))
5221 (build-system gnu-build-system)
5223 `(("python2" ,python-2)))
5225 `(#:tests? #f ; no tests
5227 (modify-phases %standard-phases
5231 (call-with-output-file "Makefile"
5233 (format port "CC = gcc
5234 CFLAGS = -O3 ~a -DUSE_THREADS
5235 LDLIBS = -lm -lpthread -lrt
5236 Mlucas: $(addsuffix .o,$(basename $(wildcard *.c)))
5238 ,(let ((system (or (%current-target-system)
5239 (%current-system))))
5241 ((string-prefix? "x86_64" system) "-DUSE_SSE2")
5245 (lambda* (#:key outputs #:allow-other-keys)
5246 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
5247 (install-file "Mlucas" bin)
5248 (install-file "primenet.py" bin))
5250 (home-page "https://www.mersenne.org")
5251 (synopsis "Great Internet Mersenne Prime Search (GIMPS) distributed computing client")
5252 (description "Mlucas performs Lucas-Lehmer primality testing of Mersenne
5253 numbers in search of a world-record prime. You may use it to test any
5254 suitable number as you wish, but it is preferable that you do so in a
5255 coordinated fashion, as part of the Great Internet Mersenne Prime
5256 Search (GIMPS). Mlucas also includes a simple Python script for assignment
5257 management via the GIMPS project's Primenet server.")
5258 (license license:gpl2+)))
5260 (define-public nauty
5267 "https://pallini.di.uniroma1.it/"
5268 "nauty" (string-join (string-split version #\.) "")
5272 "1p4mxf8q5wm47nxyskxbqwa5p1vvkycv1zgswvnk9nsn6vff0al6"))))
5273 (build-system gnu-build-system)
5274 (outputs '("out" "lib"))
5276 `(#:test-target "checks"
5278 (modify-phases %standard-phases
5279 ;; Default make target does not build all available
5280 ;; executables. Create them now.
5281 (add-after 'build 'build-extra-programs
5283 (for-each (lambda (target) (invoke "make" target))
5284 '("blisstog" "bliss2dre" "checks6" "sumlines"))
5286 ;; Upstream does not provide any install target.
5288 (lambda* (#:key outputs #:allow-other-keys)
5289 (let* ((out (assoc-ref outputs "out"))
5290 (lib-output (assoc-ref outputs "lib"))
5291 (bin (string-append out "/bin"))
5292 (doc (string-append out "/share/doc/nauty/"))
5293 (include (string-append lib-output "/include/nauty"))
5294 (lib (string-append lib-output "/lib/nauty")))
5295 (for-each (lambda (f) (install-file f bin))
5296 '("dreadnaut" "NRswitchg" "addedgeg" "amtog" "biplabg"
5297 "blisstog" "bliss2dre" "catg" "checks6" "complg"
5298 "converseg" "copyg" "countg" "cubhamg" "deledgeg"
5299 "delptg" "directg" "dretodot" "dretog" "genbg"
5300 "genbgL" "geng" "genquarticg" "genrang" "genspecialg"
5301 "gentourng" "gentreeg" "hamheuristic" "labelg"
5302 "linegraphg" "listg" "multig" "newedgeg" "pickg"
5303 "planarg" "ranlabg" "shortg" "showg" "subdivideg"
5304 "sumlines" "twohamg" "vcolg" "watercluster2"))
5305 (for-each (lambda (f) (install-file f include))
5306 (find-files "." "\\.h$"))
5307 (for-each (lambda (f) (install-file f lib))
5308 (find-files "." "\\.a$"))
5309 (for-each (lambda (f) (install-file f doc))
5310 (append '("formats.txt" "README" "schreier.txt")
5311 (find-files "." "\\.pdf$")))))))))
5313 `(("gmp" ,gmp))) ;for sumlines
5314 (home-page "https://pallini.di.uniroma1.it/")
5315 (synopsis "Library for graph automorphisms")
5316 (description "@code{nauty} (No AUTomorphisms, Yes?) is a set of
5317 procedures for computing automorphism groups of graphs and digraphs.
5319 @code{nauty} computes graph information in the form of a set of
5320 generators, the size of the group, and the orbits of the group; it can
5321 also produce a canonical label. The @code{nauty} suite is written in
5322 C and comes with a command-line interface, a collection of
5323 command-line tools, and an Application Programming Interface (API).
5325 This package provides the static libraries required to run programs
5326 compiled against the nauty library.")
5327 (license license:asl2.0)))
5336 (uri (string-append "https://www.bugseng.com/products/ppl/download/"
5337 "ftp/releases/" version
5338 "/ppl-" version ".tar.gz"))
5341 "1j5aji1g2vmdvc0gqz45n2ll2l2f6czca04wiyfl5g3sm3a6vhvb"))))
5342 (build-system gnu-build-system)
5348 (home-page "https://www.bugseng.com/parma-polyhedra-library")
5350 "Parma Polyhedra Library for computations with polyhedra")
5352 "The Parma Polyhedra Library (PPL) provides numerical abstractions
5353 especially targeted at applications in the field of analysis and
5354 verification of complex systems. These abstractions include convex
5355 polyhedra, defined as the intersection of a finite number of (open or
5356 closed) halfspaces, each described by a linear inequality (strict or
5357 non-strict) with rational coefficients; some special classes of polyhedra
5358 shapes that offer interesting complexity/precision tradeoffs; and grids
5359 which represent regularly spaced points that satisfy a set of linear
5360 congruence relations. The library also supports finite powersets and
5361 products of (any kind of) polyhedra and grids, a mixed integer linear
5362 programming problem solver using an exact-arithmetic version of the simplex
5363 algorithm, a parametric integer programming solver, and primitives for
5364 termination analysis via the automatic synthesis of linear ranking
5366 (license license:gpl3+)))
5368 (define-public speedcrunch
5370 (name "speedcrunch")
5376 (url "https://bitbucket.org/heldercorreia/speedcrunch.git")
5377 (commit (string-append "release-" version))))
5378 (file-name (git-file-name name version))
5381 "0vh7cd1915bjqzkdp3sk25ngy8cq624mkh8c53c5bnzk357kb0fk"))))
5382 (build-system cmake-build-system)
5383 (inputs `(("qtbase" ,qtbase)))
5384 (native-inputs `(("qttools" ,qttools)))
5387 (modify-phases %standard-phases
5388 (add-after 'unpack 'chdir-to-src
5389 (lambda _ (chdir "src") #t)))))
5390 (synopsis "High-precision scientific calculator")
5392 "SpeedCrunch is a high-precision scientific calculator. It features a
5393 syntax-highlighted scrollable display and is designed to be fully used via
5394 keyboard. Some distinctive features are auto-completion of functions and
5395 variables, a formula book, and quick insertion of constants from various
5396 fields of knowledge.")
5397 (home-page "https://speedcrunch.org/")
5398 (license license:gpl2+)))
5400 (define-public minisat
5401 ;; This is the last commit which is available upstream, no
5402 ;; release happened since 2010.
5403 (let ((commit "37dc6c67e2af26379d88ce349eb9c4c6160e8543")
5407 (version (string-append "2.2.0-" revision "." (string-take commit 7)))
5412 (url "https://github.com/niklasso/minisat.git")
5414 (file-name (string-append name "-" version "-checkout"))
5417 "091hf3qkm197s5r7xcr3m07xsdwyz2rqk1hc9kj0hn13imz09irq"))
5419 (search-patches "minisat-friend-declaration.patch"
5420 "minisat-install.patch"))))
5421 (build-system gnu-build-system)
5423 '(#:make-flags (list (string-append "prefix=" %output))
5424 #:tests? #f ;no check target
5426 (modify-phases %standard-phases
5427 (delete 'configure))))
5429 `(("zlib:static" ,zlib "static")
5432 "Small, yet efficient, SAT solver")
5434 "MiniSat is a minimalistic, open-source SAT solver, developed to help
5435 researchers and developers alike to get started on SAT.")
5437 "http://minisat.se/MiniSat.html")
5438 (license license:expat))))
5440 (define-public libqalculate
5442 (name "libqalculate")
5448 (url "https://github.com/Qalculate/libqalculate/")
5449 (commit (string-append "v" version))))
5450 (file-name (git-file-name name version))
5452 (base32 "1vbaza9c7159xf2ym90l0xkyj2mp6c3hbghhsqn29yvz08fda9df"))))
5453 (build-system gnu-build-system)
5455 `(("pkg-config" ,pkg-config)
5456 ("gettext" ,gettext-minimal)
5457 ("intltool" ,intltool)
5458 ("automake" ,automake)
5459 ("autoconf" ,autoconf)
5460 ("libtool" ,libtool)
5461 ("doxygen" ,doxygen)
5466 ("libxml2" ,libxml2)
5469 ("gnuplot" ,gnuplot)
5470 ("readline" ,readline)
5471 ("libiconv" ,libiconv)))
5474 (modify-phases %standard-phases
5475 (add-before 'bootstrap 'setenv
5476 ;; Prevent the autogen.sh script to carry out the configure
5477 ;; script, which has not yet been patched to replace /bin/sh.
5479 (setenv "NOCONFIGURE" "TRUE")
5481 (home-page "https://qalculate.github.io/")
5482 (synopsis "Multi-purpose cli desktop calculator and library")
5484 "Libqalculate is a multi-purpose cli desktop calculator and library.
5485 It provides basic and advanced functionality. Features include customizable
5486 functions, unit calculations, and conversions, physical constants, symbolic
5487 calculations (including integrals and equations), arbitrary precision,
5488 uncertainity propagation, interval arithmetic, plotting and a user-friendly
5490 (license license:gpl2+)))
5492 (define-public qalculate-gtk
5494 (name "qalculate-gtk")
5500 (url "https://github.com/Qalculate/qalculate-gtk/")
5501 (commit (string-append "v" version))))
5502 (file-name (git-file-name name version))
5504 (base32 "0nsg6dzg5r7rzqr671nvrf1c50rjwpz7bxv5f20i4s7agizgv840"))))
5505 (build-system glib-or-gtk-build-system)
5507 `(("pkg-config" ,pkg-config)
5508 ("intltool" ,intltool)
5509 ("automake" ,automake)
5510 ("autoconf" ,autoconf)
5511 ("libtool" ,libtool)
5516 ("libqalculate" ,libqalculate)
5517 ("libxml2" ,libxml2)
5522 (modify-phases %standard-phases
5523 (add-before 'bootstrap 'setenv
5524 ;; Prevent the autogen.sh script to carry out the configure
5525 ;; script, which has not yet been patched to replace /bin/sh.
5527 (setenv "NOCONFIGURE" "TRUE")
5529 (add-before 'check 'add-pot-file
5530 ;; the file contains translations and are currently not in use
5531 ;; left out on purpose so add it to POTFILES.skip
5533 (with-output-to-file "po/POTFILES.skip"
5535 (format #t "data/shortcuts.ui~%")
5538 (home-page "https://qalculate.github.io/")
5539 (synopsis "Multi-purpose graphical desktop calculator")
5541 "Qalculate-gtk is the GTK frontend for libqalculate. It is a
5542 multi-purpose GUI desktop calculator. It provides basic and advanced
5543 functionality. Features include customizable functions, unit calculations,
5544 and conversions, physical constants, symbolic calculations (including
5545 integrals and equations), arbitrary precision, uncertainity propagation,
5546 interval arithmetic, plotting.")
5547 (license license:gpl2+)))