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, 2020 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 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 "1395y9hlhqadn5g9j8q22224fds5sd92jxi9czfavjj24myasq04"))
471 (patches (search-patches "gsl-test-i686.patch"))))
472 (build-system gnu-build-system)
474 `(;; Currently there are numerous tests that fail on "exotic"
475 ;; architectures such as aarch64 and ppc64le.
476 ,@(if (string-prefix? "aarch64-linux"
477 (or (%current-target-system) (%current-system)))
480 (home-page "https://www.gnu.org/software/gsl/")
481 (synopsis "Numerical library for C and C++")
483 "The GNU Scientific Library is a library for numerical analysis in C
484 and C++. It includes a wide range of mathematical routines, with over 1000
485 functions in total. Subject areas covered by the library include:
486 differential equations, linear algebra, Fast Fourier Transforms and random
488 (license license:gpl3+)))
497 (uri (string-append "mirror://gnu/glpk/glpk-"
501 "040sfaa9jclg2nqdh83w71sv9rc1sznpnfiripjdyr48cady50a2"))))
502 (build-system gnu-build-system)
506 `(#:configure-flags '("--with-gmp")))
507 (home-page "https://www.gnu.org/software/glpk/")
508 (synopsis "GNU Linear Programming Kit, supporting the MathProg language")
510 "GLPK is a C library for solving large-scale linear programming (LP),
511 mixed integer programming (MIP), and other related problems. It supports the
512 GNU MathProg modeling language, a subset of the AMPL language, and features a
513 translator for the language. In addition to the C library, a stand-alone
514 LP/MIP solver is included in the package.")
515 (license license:gpl3+)))
524 (uri (string-append "https://github.com/4ti2/4ti2/releases/download/"
526 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
528 "/4ti2-" version ".tar.gz"))
530 (base32 "0rj92x6p9m3la5gasjbj7sa569im527ffmka5y2sv1amgd3fflrh"))))
531 (build-system gnu-build-system)
533 `(("which" ,(@ (gnu packages base) which)))) ; for the tests
537 (home-page "http://www.4ti2.de/")
538 (synopsis "Mathematical tool suite for problems on linear spaces")
540 "4ti2 implements algorithms for solving algebraic, geometric and
541 combinatorial problems on linear spaces. Among others, it solves systems
542 of linear equations, computes extreme rays of polyhedral cones, solves
543 integer programming problems and computes Markov bases for statistics.")
544 (license license:gpl2+)))
546 (define-public cddlib
553 (uri (string-append "ftp://ftp.math.ethz.ch/users/fukudak/cdd/cddlib-"
554 (string-delete #\. version) ".tar.gz"))
557 "00zdgiqb91vx6gd2103h3ijij0llspsxc6zz3iw2bll39fvkl4xq"))))
558 (build-system gnu-build-system)
561 (home-page "https://www.inf.ethz.ch/personal/fukudak/cdd_home/index.html")
562 (synopsis "Library for convex hulls and extreme rays of polyhedra")
564 "The C-library cddlib implements the Double Description Method of
565 Motzkin et al. for generating all vertices (i.e. extreme points) and extreme
566 rays of a general convex polyhedron given by a system of linear inequalities
567 in arbitrary dimension. It can also be used for the converse operation of
568 computing convex hulls.")
569 (license license:gpl2+)))
571 (define-public lrslib
578 (uri (string-append "http://cgm.cs.mcgill.ca/~avis/C/lrslib/archive/"
580 (string-delete #\. version) ".tar.gz"))
583 "034fa45r9hwx6ljmgpxk2872q34nklkalpdkc6s9hqw57rivi36k"))))
584 (build-system gnu-build-system)
588 `(#:tests? #f ; no check phase
589 #:make-flags `("CC=gcc"
590 ,(string-append "prefix=" (assoc-ref %outputs "out"))
593 (modify-phases %standard-phases
596 (substitute* "makefile"
597 (("-L \\.") "-L . -Wl,-rpath='$$ORIGIN/../lib'"))
599 (home-page "http://cgm.cs.mcgill.ca/~avis/C/lrs.html")
600 (synopsis "Convex hulls of polyhedra with exact arithmetic")
602 "The C code of lrslib implements the reverse search algorithm for
603 vertex enumeration and convex hull problems. Its input file format is
604 compatible with cddlib. All computations are done exactly in either
605 multiple precision or fixed integer arithmetic. Output is not stored
606 in memory, so even problems with very large output sizes can sometimes
608 (license license:gpl2+)))
617 (uri (string-append "https://www.math.u-bordeaux.fr/~aenge/software/"
618 "vinci/vinci-" version ".tar.gz"))
621 "1aq0qc1y27iw9grhgnyji3290wwfznsrk3sg6ynqpxwjdda53h4m"))))
622 (build-system gnu-build-system)
624 `(("lrslib" ,lrslib)))
626 `(#:tests? #f ; no check phase
628 (modify-phases %standard-phases
630 ;; register the lrs location in the config file
631 (lambda* (#:key inputs #:allow-other-keys)
632 (let* ((lrs (assoc-ref inputs "lrslib"))
633 (lrsexec (string-append lrs "/bin/lrs")))
634 (substitute* "vinci.h"
635 (("#define LRS_EXEC \"lrs\"")
636 (string-append "#define LRS_EXEC \"" lrsexec "\""))))
639 (lambda* (#:key outputs #:allow-other-keys)
640 (let* ((out (assoc-ref outputs "out"))
641 (bin (string-append out "/bin")))
642 (install-file "vinci" bin))
645 "https://www.math.u-bordeaux.fr/~aenge/?category=software&page=vinci")
646 (synopsis "Volume computation for polytopes")
648 "Vinci implements a number of volume computation algorithms for convex
649 polytopes in arbitrary dimension. The polytopes can be given by their
650 V-representation (as the convex hull of a finite number of vertices), by
651 their H-representation (as the bounded intersection of a finite number of
652 halfspaces) or by their double description with both representations.")
653 (license license:gpl2+)))
655 (define-public arpack-ng
659 (home-page "https://github.com/opencollab/arpack-ng")
662 (uri (git-reference (url home-page) (commit version)))
663 (file-name (git-file-name name version))
666 "1wljl96yqxc9v8r49c37lscwkdp58kaacfb9p6s6nvpm31haax4y"))))
667 (build-system gnu-build-system)
669 `(("autoconf" ,autoconf)
670 ("automake" ,automake)
671 ("libtool" ,libtool)))
674 ("fortran" ,gfortran)))
675 (synopsis "Fortran subroutines for solving eigenvalue problems")
677 "ARPACK-NG is a collection of Fortran77 subroutines designed to solve
678 large scale eigenvalue problems.")
679 (license (license:non-copyleft "file://COPYING"
680 "See COPYING in the distribution."))))
682 (define-public arpack-ng-3.3.0
686 (name (package-name arpack-ng))
687 (home-page (package-home-page arpack-ng))
691 (uri (string-append home-page "/archive/" version ".tar.gz"))
692 (file-name (string-append name "-" version ".tar.gz"))
695 "1cz53wqzcf6czmcpfb3vb61xi0rn5bwhinczl65hpmbrglg82ndd"))))))
697 (define-public arpack-ng-openmpi
698 (package (inherit arpack-ng)
699 (name "arpack-ng-openmpi")
702 ,@(package-inputs arpack-ng)))
704 (substitute-keyword-arguments (package-arguments arpack-ng)
705 ((#:configure-flags _ '())
707 ((#:phases phases '%standard-phases)
708 `(modify-phases ,phases
709 (add-before 'check 'mpi-setup
711 (synopsis "Fortran subroutines for solving eigenvalue problems with MPI")))
713 (define-public lapack
720 (uri (string-append "http://www.netlib.org/lapack/lapack-"
724 "1155qixp26c12yrxc76z9mlfw2h3xxymxxv5znpgzh5gaykpndgj"))))
725 (build-system cmake-build-system)
726 (home-page "http://www.netlib.org/lapack/")
727 (inputs `(("fortran" ,gfortran)
728 ("python" ,python-wrapper)))
730 `(#:configure-flags (list
731 "-DBUILD_SHARED_LIBS:BOOL=YES"
733 ;; Build the 'LAPACKE_clatms' functions.
734 "-DLAPACKE_WITH_TMG=ON"
735 "-DBUILD_TESTING=ON")))
736 (synopsis "Library for numerical linear algebra")
738 "LAPACK is a Fortran 90 library for solving the most commonly occurring
739 problems in numerical linear algebra.")
740 (license (license:non-copyleft "file://LICENSE"
741 "See LICENSE in the distribution."))))
743 (define-public scalapack
750 (uri (string-append "http://www.netlib.org/scalapack/scalapack-"
754 "0p1r61ss1fq0bs8ynnx7xq4wwsdvs32ljvwjnx6yxr8gd6pawx0c"))
755 (patches (search-patches "scalapack-blacs-mpi-deprecations.patch"))))
756 (build-system cmake-build-system)
759 ("fortran" ,gfortran)
760 ("lapack" ,lapack))) ;for testing only
762 `(#:configure-flags `("-DBUILD_SHARED_LIBS:BOOL=YES")
763 #:phases (modify-phases %standard-phases
764 (add-before 'check 'mpi-setup
766 (home-page "http://www.netlib.org/scalapack/")
767 (synopsis "Library for scalable numerical linear algebra")
769 "ScaLAPACK is a Fortran 90 library of high-performance linear algebra
770 routines on parallel distributed memory machines. ScaLAPACK solves dense and
771 banded linear systems, least squares problems, eigenvalue problems, and
772 singular value problems.")
773 (license (license:non-copyleft "file://LICENSE"
774 "See LICENSE in the distribution."))))
776 (define-public gnuplot
782 (uri (string-append "mirror://sourceforge/gnuplot/gnuplot/"
786 (base32 "1vglp4la40f5dpj0zdj63zprrkyjgzy068p35bz5dqxjyczm1zlp"))))
787 (build-system gnu-build-system)
788 (inputs `(("readline" ,readline)
794 `(("pkg-config" ,pkg-config)
795 ("texlive" ,texlive-tiny)))
796 (arguments `(#:configure-flags (list (string-append
797 "--with-texdir=" %output
798 "/texmf-local/tex/latex/gnuplot"))))
799 (home-page "http://www.gnuplot.info")
800 (synopsis "Command-line driven graphing utility")
801 (description "Gnuplot is a portable command-line driven graphing
802 utility. It was originally created to allow scientists and students to
803 visualize mathematical functions and data interactively, but has grown to
804 support many non-interactive uses such as web scripting. It is also used as a
805 plotting engine by third-party applications like Octave.")
806 ;; X11 Style with the additional restriction that derived works may only be
807 ;; distributed as patches to the original.
808 (license (license:fsf-free
809 "http://gnuplot.cvs.sourceforge.net/gnuplot/gnuplot/Copyright"))))
819 (url "https://github.com/OkoSanto/GCTP.git")
820 (commit (string-append "v" version))))
821 (file-name (git-file-name name version))
823 (base32 "11wqmd443b4nksdbzp1msdws3av948nmwq1xz80w6hka3ss2aigd"))))
825 `(("fortran" ,gfortran)))
826 (build-system gnu-build-system)
827 (synopsis "General Cartographic Transformation Package (GCTP)")
829 "The General Cartographic Transformation Package (GCTP) is a system of
830 software routines designed to permit the transformation of coordinate pairs
831 from one map projection to another. The GCTP is the standard computer
832 software used by the National Mapping Division for map projection
834 (home-page "https://github.com/OkoSanto/GCTP")
835 (license license:public-domain))) ;https://www2.usgs.gov/laws/info_policies.html
844 (uri (string-append "https://support.hdfgroup.org/ftp/HDF/releases/HDF"
845 version "/src/hdf-" version ".tar.bz2"))
847 (base32 "0n29klrrbwan9307np0d9hr128dlpc4nnlf57a140080ll3jmp8l"))
848 (patches (search-patches "hdf4-architectures.patch"
849 "hdf4-reproducibility.patch"
850 "hdf4-shared-fortran.patch"
851 "hdf4-tirpc.patch"))))
852 (build-system gnu-build-system)
854 `(("gfortran" ,gfortran)
860 ("libtirpc" ,libtirpc)))
862 `(#:parallel-tests? #f
863 #:configure-flags (list "--enable-shared"
864 (string-append "CPPFLAGS=-I"
865 (assoc-ref %build-inputs "libtirpc")
868 (modify-phases %standard-phases
869 ;; This is inspired by two of Debian's patches.
870 (add-before 'configure 'add-more-aarch64-support
872 (substitute* '("mfhdf/ncgen/ncgen.l"
873 "mfhdf/ncgen/ncgenyy.c"
874 "mfhdf/libsrc/netcdf.h.in")
875 (("AIX5L64") "__aarch64__"))
877 (add-before 'configure 'patchbuild
880 '("mfhdf/hdfimport/testutil.sh.in" "hdf/util/testutil.sh.in")
882 (("/bin/mkdir") "mkdir"))
883 (substitute* (find-files "." "^Makefile\\.in$")
884 (("@HDF_BUILD_XDR_TRUE@XDR_ADD = \
885 -R\\$\\(abs_top_builddir\\)/mfhdf/xdr/\\.libs") "")
886 (("@HDF_BUILD_SHARED_TRUE@AM_LDFLAGS = \
887 -R\\$\\(abs_top_builddir\\)/mfhdf/libsrc/\\.libs \
888 -R\\$\\(abs_top_builddir\\)/hdf/src/\\.libs \\$\\(XDR_ADD\\)") ""))
890 (add-after 'configure 'patch-settings
892 ;; libhdf4.settings contains the full path of the
893 ;; compilers used, and its contents are included in
894 ;; .so-files. We truncate the hashes to avoid
895 ;; unnecessary store references to those compilers:
896 (substitute* "libhdf4.settings"
897 (("(/gnu/store/)([a-Z0-9]*)" all prefix hash)
898 (string-append prefix (string-take hash 10) "...")))
901 (home-page "https://www.hdfgroup.org/products/hdf4/")
903 "Library and multi-object file format for storing and managing data")
904 (description "HDF4 is a library and multi-object file format for storing
905 and managing data between machines. HDF4 is an older hierarchical data format,
906 incompatible with HDF5.")
908 (license:non-copyleft
909 "https://www.hdfgroup.org/ftp/HDF/HDF_Current/src/unpacked/COPYING"))))
911 (define-public hdf4-alt
916 (substitute-keyword-arguments (package-arguments hdf4)
917 ((#:configure-flags flags) `(cons* "--disable-netcdf" ,flags))))
919 "HDF4 without netCDF API, can be combined with the regular netCDF library")))
928 (uri (list (string-append "https://support.hdfgroup.org/ftp/HDF5/releases/"
929 "hdf5-" (version-major+minor version)
930 "/hdf5-" version "/src/hdf5-"
932 (string-append "https://support.hdfgroup.org/ftp/HDF5/"
934 (match (string-split version #\.)
936 (string-append major minor)))
937 "/src/hdf5-" version ".tar.bz2")))
939 (base32 "03glk4w4wyb1jyb443g53y3y1ncnf6mj2cqwm6avfr2awkgb3cg5"))
940 (patches (search-patches "hdf5-config-date.patch"
941 "hdf5-1.8-mpi-deprecations.patch"))))
942 (build-system gnu-build-system)
946 `(("gfortran" ,gfortran)
947 ("perl" ,perl))) ;part of the test machinery needs Perl
948 (outputs '("out" ; core library
949 "fortran")) ; fortran interface
951 `(;; Some of the users, notably Flann, need the C++ interface.
952 #:configure-flags '("--enable-cxx"
954 "--enable-fortran2003"
956 ;; Build a thread-safe library. Unfortunately,
957 ;; 'configure' invites you to either turn off C++,
958 ;; Fortran, and the high-level interface (HL), or
959 ;; to pass '--enable-unsupported'. Debian
960 ;; packagers chose to pass '--enable-unsupported'
961 ;; and we follow their lead here.
962 "--enable-threadsafe"
964 "--enable-unsupported")
965 ;; Use -fPIC to allow the R bindings to link with the static libraries
966 #:make-flags (list "CFLAGS=-fPIC"
969 (modify-phases %standard-phases
970 (add-before 'configure 'patch-configure
971 (lambda* (#:key outputs #:allow-other-keys)
972 (substitute* "configure"
974 (substitute* "fortran/src/Makefile.in"
975 (("libhdf5_fortran_la_LDFLAGS =")
976 (string-append "libhdf5_fortran_la_LDFLAGS = -Wl-rpath="
977 (assoc-ref outputs "fortran") "/lib")))
978 (substitute* "hl/fortran/src/Makefile.in"
979 (("libhdf5hl_fortran_la_LDFLAGS =")
980 (string-append "libhdf5hl_fortran_la_LDFLAGS = -Wl,-rpath="
981 (assoc-ref outputs "fortran") "/lib")))
983 (add-after 'configure 'patch-settings
985 ;; libhdf5.settings contains the full path of the
986 ;; compilers used, and its contents are included in
987 ;; libhdf5.so. We truncate the hashes to avoid
988 ;; unnecessary store references to those compilers:
989 (substitute* "src/libhdf5.settings"
990 (("(/gnu/store/)([a-Z0-9]*)" all prefix hash)
991 (string-append prefix (string-take hash 10) "..."))
992 ;; Don't record the build-time kernel version to make the
993 ;; settings file reproducible.
994 (("Uname information:.*")
995 "Uname information: Linux\n"))
997 (add-after 'install 'patch-references
998 (lambda* (#:key inputs outputs #:allow-other-keys)
999 (let ((bin (string-append (assoc-ref outputs "out") "/bin"))
1000 (zlib (assoc-ref inputs "zlib")))
1001 (substitute* (find-files bin "h5p?cc")
1003 (string-append "-L" zlib "/lib " lib)))
1005 (add-after 'install 'split
1006 (lambda* (#:key inputs outputs #:allow-other-keys)
1007 ;; Move all fortran-related files
1008 (let* ((out (assoc-ref outputs "out"))
1009 (bin (string-append out "/bin"))
1010 (lib (string-append out "/lib"))
1011 (inc (string-append out "/include"))
1012 (ex (string-append out "/share/hdf5_examples/fortran"))
1013 (fort (assoc-ref outputs "fortran"))
1014 (fbin (string-append fort "/bin"))
1015 (flib (string-append fort "/lib"))
1016 (finc (string-append fort "/include"))
1017 (fex (string-append fort "/share/hdf5_examples/fortran")))
1022 ;; Note: When built with --enable-parallel, the 'h5fc' file
1023 ;; doesn't exist, hence this condition.
1024 (when (file-exists? (string-append bin "/h5fc"))
1025 (rename-file (string-append bin "/h5fc")
1026 (string-append fbin "/h5fc")))
1027 (for-each (lambda (file)
1029 (string-append flib "/" (basename file))))
1030 (find-files lib ".*fortran.*"))
1031 (for-each (lambda (file)
1033 (string-append finc "/" (basename file))))
1034 (find-files inc ".*mod"))
1035 (for-each (lambda (file)
1037 (string-append fex "/" (basename file))))
1038 (find-files ex ".*"))
1039 (delete-file-recursively ex))
1041 (home-page "https://www.hdfgroup.org")
1042 (synopsis "Management suite for extremely large and complex data")
1043 (description "HDF5 is a suite that makes possible the management of
1044 extremely large and complex data collections.")
1045 (license (license:x11-style
1046 "https://www.hdfgroup.org/ftp/HDF5/current/src/unpacked/COPYING"))))
1048 (define-public hdf5-1.10
1049 (package (inherit hdf5)
1054 (uri (list (string-append "https://support.hdfgroup.org/ftp/HDF5/releases/"
1055 "hdf5-" (version-major+minor version)
1056 "/hdf5-" version "/src/hdf5-"
1058 (string-append "https://support.hdfgroup.org/ftp/HDF5/"
1060 (apply string-append
1061 (take (string-split version #\.) 2))
1062 "/src/hdf5-" version ".tar.bz2")))
1064 (base32 "1gf38x51128hn00744358w27xgzjk0ff4wra4yxh2lk804ck1mh9"))
1065 (patches (search-patches "hdf5-config-date.patch"))))))
1067 (define-public hdf-java
1075 "https://www.hdfgroup.org/ftp/HDF5/releases/HDF-JAVA/hdfjni-"
1076 version "/src/CMake-hdfjava-" version ".tar.gz"))
1078 (base32 "0m1gp2aspcblqzmpqbdpfp6giskws85ds6p5gz8sx7asyp7wznpr"))
1079 (modules '((guix build utils)))
1080 (snippet ; Make sure we don't use the bundled sources and binaries.
1082 (for-each delete-file
1083 (list "SZip.tar.gz" "ZLib.tar.gz" "JPEG8d.tar.gz"
1084 "HDF4.tar.gz" "HDF5.tar.gz"))
1085 (delete-file-recursively ,(string-append "hdfjava-" version "/lib"))
1087 (build-system gnu-build-system)
1089 `(("jdk" ,icedtea "jdk")
1090 ("automake" ,automake) ; For up to date 'config.guess' and 'config.sub'.
1092 ("hamcrest-core" ,java-hamcrest-core)
1093 ("junit" ,java-junit)
1094 ("slf4j-simple" ,java-slf4j-simple)))
1099 ("libjpeg" ,libjpeg)
1100 ("slf4j-api" ,java-slf4j-api)))
1103 (list (string-append "--target=" ,(or (%current-target-system) (%current-system)))
1104 (string-append "--with-jdk=" (assoc-ref %build-inputs "jdk") "/include,"
1105 (assoc-ref %build-inputs "jdk") "/lib" )
1106 (string-append "--with-hdf4=" (assoc-ref %build-inputs "hdf4") "/lib")
1107 (string-append "--with-hdf5=" (assoc-ref %build-inputs "hdf5") "/lib"))
1110 (list (string-append "HDFLIB=" (assoc-ref %build-inputs "hdf4") "/lib")
1111 (string-append "HDF5LIB=" (assoc-ref %build-inputs "hdf5") "/lib")
1112 (string-append "ZLIB=" (assoc-ref %build-inputs "zlib") "/lib/libz.so")
1113 (string-append "JPEGLIB="
1114 (assoc-ref %build-inputs "libjpeg") "/lib/libjpeg.so")
1118 (modify-phases %standard-phases
1119 (add-before 'configure 'chdir-to-source
1120 (lambda _ (chdir ,(string-append "hdfjava-" version)) #t))
1121 (add-before 'configure 'patch-build
1122 (lambda* (#:key inputs outputs #:allow-other-keys)
1123 (substitute* "configure"
1124 (("COPT=\"") "COPT=\"-O2 ") ; CFLAGS is ignored in Makefiles
1125 (("/bin/cat") (which "cat")))
1126 ;; Set classpath for compilation
1127 (substitute* '("hdf/hdf5lib/Makefile.in"
1128 "hdf/hdf5lib/exceptions/Makefile.in"
1129 "hdf/hdflib/Makefile.in")
1130 (("\\$\\(TOP\\)/lib/slf4j-api-1\\.7\\.5\\.jar")
1131 (string-append (assoc-ref inputs "slf4j-api")
1132 "/share/java/slf4j-api.jar")))
1133 ;; Replace outdated config.sub and config.guess:
1134 (with-directory-excursion "config"
1135 (for-each (lambda (file)
1137 (string-append (assoc-ref inputs "automake")
1139 ,(version-major+minor (package-version automake))
1141 '("config.sub" "config.guess")))
1143 ;; Fix embedded version number
1144 (let ((hdf5version (list ,@(string-split (package-version hdf5) #\.))))
1145 (substitute* "hdf/hdf5lib/H5.java"
1147 (string-join hdf5version ", "))))
1149 (mkdir-p (string-append (assoc-ref outputs "out")))
1150 ;; Set classpath for tests
1151 (let* ((build-dir (getcwd))
1152 (lib (string-append build-dir "/lib"))
1153 (jhdf (string-append lib "/jhdf.jar"))
1154 (jhdf5 (string-append lib "/jhdf5.jar"))
1157 (string-append (assoc-ref inputs i)
1158 "/share/java/" i ".jar"))
1159 '("junit" "hamcrest-core" "slf4j-api" "slf4j-simple")))
1161 (string-join `("." ,build-dir ,jhdf ,jhdf5 ,@testjars) ":")))
1163 (substitute* '("test/hdf5lib/Makefile.in"
1164 "test/hdf5lib/junit.sh.in"
1165 "examples/runExample.sh.in")
1167 (string-append (assoc-ref inputs "coreutils")
1170 (string-append (assoc-ref inputs "coreutils")
1172 (("CLASSPATH=[^\n]*")
1173 (string-append "CLASSPATH=" class-path)))
1174 (setenv "CLASSPATH" class-path))
1176 (add-before 'check 'build-examples
1178 (apply invoke `("javac"
1179 ,@(find-files "examples" ".*\\.java"))))))
1181 #:parallel-build? #f
1183 #:parallel-tests? #f ))
1184 (home-page "https://support.hdfgroup.org/products/java")
1185 (synopsis "Java interface for the HDF4 and HDF5 libraries")
1186 (description "Java HDF Interface (JHI) and Java HDF5 Interface (JHI5) use
1187 the Java Native Interface to wrap the HDF4 and HDF5 libraries, which are
1190 ;; BSD-style license:
1191 (license (license:x11-style
1192 "https://support.hdfgroup.org/ftp/HDF5/hdf-java\
1193 /current/src/unpacked/COPYING"))))
1195 (define-public hdf-eos2
1202 (uri "ftp://edhs1.gsfc.nasa.gov\
1203 /edhs/hdfeos/latest_release/HDF-EOS2.19v1.00.tar.Z")
1205 (base32 "0c9fcz25s292ldap12wxmlrvnyz99z24p63d8fwx51bf8s0s1zrz"))
1206 (patches (search-patches "hdf-eos2-remove-gctp.patch"
1207 "hdf-eos2-build-shared.patch"
1208 "hdf-eos2-fortrantests.patch"))))
1209 (build-system gnu-build-system)
1211 `(("gfortran" ,gfortran)))
1213 `(("hdf4" ,hdf4-alt) ; assume most HDF-EOS2 users won't use the HDF4 netCDF API
1214 ;; XXX: These inputs are really dependencies of hdf4.
1216 ("libjpeg" ,libjpeg)
1217 ("libtirpc" ,libtirpc)
1221 `( #:configure-flags '("--enable-install-include" "--enable-shared"
1222 "CC=h4cc -Df2cFortran" "LIBS=-lgctp")
1223 #:parallel-tests? #f))
1224 (home-page "https://hdfeos.org/software/library.php#HDF-EOS2")
1225 (synopsis "HDF4-based data format for NASA's Earth Observing System")
1226 (description "HDF-EOS2 is a software library built on HDF4 which supports
1227 the construction of data structures used in NASA's Earth Observing
1228 System (Grid, Point and Swath).")
1230 ;; Source files carry a permissive license header.
1231 (license (license:non-copyleft home-page))))
1233 (define-public hdf-eos5
1239 (uri (string-append "ftp://edhs1.gsfc.nasa.gov\
1240 /edhs/hdfeos5/latest_release/HDF-EOS5." version ".tar.Z"))
1243 "1p83333nzzy8rn5chxlm0hrkjjnhh2w1ji8ac0f9q4xzg838i58i"))
1244 (patches (search-patches "hdf-eos5-build-shared.patch"
1245 "hdf-eos5-remove-gctp.patch"
1246 "hdf-eos5-fix-szip.patch"
1247 "hdf-eos5-fortrantests.patch"))))
1249 `(("gfortran" ,gfortran)))
1250 (build-system gnu-build-system)
1256 `(#:configure-flags '("--enable-install-include" "--enable-shared"
1257 "CC=h5cc -Df2cFortran" "LIBS=-lgctp")
1258 #:parallel-tests? #f))
1259 (synopsis "HDF5-based data format for NASA's Earth Observing System")
1261 "HDF-EOS5 is a software library built on HDF5 to support the construction
1262 of data structures used in NASA's Earth Observing System (Grid, Point and
1264 (home-page "http://www.hdfeos.org/software/library.php#HDF-EOS5")
1266 ;; Source files carry a permissive license header.
1267 (license (license:non-copyleft home-page))))
1269 (define-public hdf5-parallel-openmpi
1270 (package (inherit hdf5)
1271 (name "hdf5-parallel-openmpi")
1274 ,@(package-inputs hdf5)))
1276 (substitute-keyword-arguments (package-arguments hdf5)
1277 ((#:configure-flags flags)
1278 ``("--enable-parallel"
1279 ,@(delete "--enable-cxx"
1280 (delete "--enable-threadsafe" ,flags))))
1282 `(modify-phases ,phases
1283 (add-after 'build 'mpi-setup
1285 (add-before 'check 'patch-tests
1287 ;; OpenMPI's mpirun will exit with non-zero status if it
1288 ;; detects an "abnormal termination", i.e. any process not
1289 ;; calling MPI_Finalize(). Since the test is explicitly
1290 ;; avoiding MPI_Finalize so as not to have at_exit and thus
1291 ;; H5C_flush_cache from being called, mpirun will always
1292 ;; complain, so turn this test off.
1293 (substitute* "testpar/Makefile"
1294 (("(^TEST_PROG_PARA.*)t_pflush1(.*)" front back)
1295 (string-append front back "\n")))
1296 (substitute* "tools/h5diff/testph5diff.sh"
1297 (("/bin/sh") (which "sh")))
1299 (synopsis "Management suite for data with parallel IO support")))
1301 (define-public hdf5-blosc
1309 (url "https://github.com/Blosc/hdf5-blosc.git")
1310 (commit (string-append "v" version))))
1311 (file-name (git-file-name name version))
1313 (base32 "1nj2bm1v6ymm3fmyvhbn6ih5fgdiapavlfghh1pvbmhw71cysyqs"))))
1314 (build-system cmake-build-system)
1317 (list (string-append "-DBLOSC_INSTALL_DIR="
1318 (assoc-ref %build-inputs "c-blosc"))
1319 (string-append "-DPLUGIN_INSTALL_PATH="
1320 (assoc-ref %outputs "out")
1321 "/hdf5/lib/plugin"))
1323 (modify-phases %standard-phases
1324 (add-after 'unpack 'do-not-build-blosc
1326 (substitute* "CMakeLists.txt"
1327 (("set\\(BLOSC_INSTALL_DIR.*") "")
1328 (("ExternalProject_Add\\(project_blosc") "message("))
1331 `(("c-blosc" ,c-blosc)
1332 ("hdf5" ,hdf5-1.10)))
1333 (home-page "https://github.com/Blosc/hdf5-blosc")
1334 (synopsis "Filter for HDF5 using the Blosc compressor")
1335 (description "This is a filter for HDF5 that uses the Blosc compressor; by
1336 installing this filter, you can read and write HDF5 files with
1337 Blosc-compressed datasets.")
1338 (license license:expat)))
1340 (define-public h5check
1347 (uri (string-append "https://www.hdfgroup.org/ftp/HDF5/tools/"
1348 "h5check/src/h5check-" version ".tar.gz"))
1351 "1gm76jbwhz9adbxgn14zx8cj33dmjdr2g5xcy0m9c2gakp8w59kj"))))
1352 (build-system gnu-build-system)
1353 (inputs `(("hdf5" ,hdf5))) ;h5cc for tests
1354 (home-page "https://www.hdfgroup.org/products/hdf5_tools/h5check.html")
1355 (synopsis "HDF5 format checker")
1356 (description "@code{h5check} is a validation tool for verifying that an
1357 HDF5 file is encoded according to the HDF File Format Specification.")
1358 (license (license:x11-style "file://COPYING"))))
1366 (uri (string-append "mirror://sourceforge/itpp/itpp/"
1371 "14ddy2xnb6sgp4hiax9v5sv4pr4l4dd4ps76nfha3nrpr1ikhcqm"))))
1372 (build-system cmake-build-system)
1373 (arguments `(#:tests? #f)) ; Tests require googletest *sources*
1374 (inputs `(("lapack" ,lapack)
1376 ;; FIXME: Even though the fonts are available dvips complains:
1377 ;; "Font cmmi10 not found; characters will be left blank."
1379 `(("texlive" ,texlive-tiny)
1380 ("ghostscript" ,ghostscript)
1381 ("doxygen" ,doxygen)))
1382 (home-page "http://itpp.sourceforge.net")
1383 (synopsis "C++ library of maths, signal processing and communication classes")
1384 (description "IT++ is a C++ library of mathematical, signal processing and
1385 communication classes and functions. Its main use is in simulation of
1386 communication systems and for performing research in the area of
1387 communications. The kernel of the library consists of generic vector and
1388 matrix classes, and a set of accompanying routines. Such a kernel makes IT++
1389 similar to MATLAB, GNU Octave or SciPy.")
1390 (license license:gpl3+)))
1392 (define-public netcdf
1399 (uri (string-append "ftp://ftp.unidata.ucar.edu/pub/netcdf/"
1400 "netcdf-" version ".tar.gz"))
1403 "1blc7ik5yin7i0ls2kag0a9xjk12m0dzx6v1x88az3ras3scci2d"))
1404 (patches (search-patches "netcdf-date-time.patch"
1405 "netcdf-tst_h_par.patch"))))
1406 (build-system gnu-build-system)
1409 ("doxygen" ,doxygen)
1410 ("graphviz" ,graphviz)))
1412 `(("hdf4" ,hdf4-alt)
1415 ("libjpeg" ,libjpeg)))
1417 `(#:configure-flags '("--enable-doxygen" "--enable-dot" "--enable-hdf4")
1419 #:phases (modify-phases %standard-phases
1420 (add-before 'configure 'fix-source-date
1422 ;; As we ${SOURCE_DATE_EPOCH} evaluates to "1" in the build
1423 ;; environment, `date -u -d ${SOURCE_DATE_EPOCH}` will evaluate
1424 ;; to '1st hour of the current day', and therefore makes the
1425 ;; package not reproducible.
1426 (substitute* "./configure"
1427 (("date -u -d \"\\$\\{SOURCE_DATE_EPOCH\\}\"")
1428 "date --date='@0'"))
1430 (add-after 'configure 'patch-settings
1432 ;; libnetcdf.settings contains the full filename of the compilers
1433 ;; used to build the library. We truncate the hashes of those
1434 ;; filenames to avoid unnecessary references to the corresponding
1436 (substitute* "libnetcdf.settings"
1437 (("(/gnu/store/)([a-Z0-9]*)" all prefix hash)
1438 (string-append prefix (string-take hash 10) "...")))
1441 #:parallel-tests? #f)) ;various race conditions
1442 (home-page "https://www.unidata.ucar.edu/software/netcdf/")
1443 (synopsis "Library for scientific data")
1444 (description "NetCDF is an interface for scientific data access and a
1445 software library that provides an implementation of the interface. The netCDF
1446 library defines a machine-independent format for representing scientific data.
1447 Together, the interface, library, and format support the creation, access, and
1448 sharing of scientific data.")
1449 (license (license:x11-style "file://COPYRIGHT"))))
1451 (define-public netcdf-parallel-openmpi
1452 (package (inherit netcdf)
1453 (name "netcdf-parallel-openmpi")
1456 ,@(alist-replace "hdf5" (list hdf5-parallel-openmpi)
1457 (package-inputs netcdf))))
1458 ;; TODO: Replace pkg-config references in nc-config with absolute references
1460 (substitute-keyword-arguments (package-arguments netcdf)
1461 ((#:configure-flags flags)
1462 `(cons* "CC=mpicc" "CXX=mpicxx"
1463 "--enable-parallel-tests"
1464 ;; Shared libraries not supported with parallel IO.
1465 "--disable-shared" "--with-pic"
1468 (define-public netcdf-fortran
1470 (name "netcdf-fortran")
1475 "ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-fortran-"
1479 "0xaxdcg1p83zmypwml3swsnr3ccn38inwldyr1l3wa4dbwbrblxj"))))
1480 (build-system gnu-build-system)
1482 `(#:parallel-tests? #f))
1484 `(("netcdf" ,netcdf)))
1486 `(("gfortran" ,gfortran)))
1487 (synopsis "Fortran interface for the netCDF library")
1488 (description (package-description netcdf))
1489 (home-page (package-home-page netcdf))
1490 (license (package-license netcdf))))
1492 (define-public nlopt
1498 (uri (string-append "http://ab-initio.mit.edu/nlopt/nlopt-"
1501 (base32 "12cfkkhcdf4zmb6h7y6qvvdvqjs2xf9sjpa3rl3bq76px4yn76c0"))))
1502 (build-system gnu-build-system)
1504 `(;; Shared libraries are not built by default. They are required to
1505 ;; build the Guile, Octave, and Python bindings.
1506 #:configure-flags '("--enable-shared")
1509 (modify-phases %standard-phases
1510 (add-before 'configure 'set-libnlopt-file-name
1511 (lambda* (#:key outputs #:allow-other-keys)
1512 ;; Make sure the Scheme module refers to the library by its
1513 ;; absolute file name (we cannot do that from a snippet
1514 ;; because the expansion of @libdir@ contains
1516 (let ((out (assoc-ref outputs "out")))
1517 (substitute* "swig/nlopt.scm.in"
1519 (string-append out "/lib/libnlopt")))
1521 (inputs `(("guile" ,guile-2.0)))
1522 (native-inputs `(("pkg-config" ,pkg-config)))
1523 (home-page "http://ab-initio.mit.edu/wiki/")
1524 (synopsis "Library for nonlinear optimization")
1525 (description "NLopt is a library for nonlinear optimization, providing a
1526 common interface for a number of different free optimization routines available
1527 online as well as original implementations of various other algorithms.")
1528 (license license:lgpl2.1+)))
1530 (define-public ipopt
1537 "http://www.coin-or.org/download/source/Ipopt/Ipopt-"
1541 "07yn9rzdswjk8n246qq6ci9ssf2bcplkifcpsfz9j6cdxw9vgbkv"))
1542 (modules '((guix build utils)))
1544 ;; Make sure we don't use the bundled software.
1546 (delete-file-recursively "ThirdParty")
1548 (build-system gnu-build-system)
1550 '(#:phases (modify-phases %standard-phases
1551 (add-after 'install 'add--L-flags-in-ipopt.pc
1552 (lambda* (#:key inputs outputs #:allow-other-keys)
1553 ;; The '.pc' file lists '-llapack -lblas' in "Libs";
1554 ;; move it to "Libs.private" where it belongs, and add a
1555 ;; '-L' flag for LAPACK.
1556 (let ((out (assoc-ref outputs "out"))
1557 (lapack (assoc-ref inputs "lapack")))
1558 (substitute* (string-append out "/lib/pkgconfig/"
1560 (("Libs: (.*)-llapack -lblas(.*)$" _ before after)
1561 (string-append "Libs: " before " " after "\n"
1562 "Libs.private: " before
1563 "-L" lapack "/lib -llapack -lblas "
1567 `(("gfortran" ,gfortran)))
1569 ;; TODO: Maybe add dependency on COIN-MUMPS, ASL, and HSL.
1570 `(("lapack" ,lapack))) ;for both libblas and liblapack
1571 (home-page "http://www.coin-or.org")
1572 (synopsis "Large-scale nonlinear optimizer")
1574 "The Interior Point Optimizer (IPOPT) is a software package for
1575 large-scale nonlinear optimization. It provides C++, C, and Fortran
1577 (license license:epl1.0)))
1585 (uri (string-append "https://www.coin-or.org/download/source/"
1586 "Clp/Clp-" version ".tgz"))
1589 "1wdg820g3iikf9344ijwsc8sy6c0m6im42bzzizm6rlmkvnmxhk9"))
1590 (modules '((guix build utils)))
1592 ;; Make sure we don't use the bundled software.
1594 (delete-file-recursively "ThirdParty")
1596 (build-system gnu-build-system)
1598 `(("gfortran" ,gfortran)
1599 ("pkg-config" ,pkg-config)))
1601 `(("openblas" ,openblas)))
1602 (home-page "https://www.coin-or.org")
1603 (synopsis "Linear programming solver")
1605 "CLP is a high quality linear programming solver. Its main strengths are
1606 its dual and primal Simplex algorithms. It also has a barrier algorithm for
1607 linear and quadratic objectives. There are limited facilities for nonlinear
1608 and quadratic objectives using the Simplex algorithm.")
1609 (license license:epl1.0)))
1611 (define-public ceres
1613 (name "ceres-solver")
1615 (home-page "http://ceres-solver.org/")
1618 (uri (string-append home-page "ceres-solver-"
1622 "13lfxy8x58w8vprr0nkbzziaijlh0vvqshgahvcgw0mrqdgh0i27"))))
1623 (build-system cmake-build-system)
1625 ;; TODO: Build HTML user documentation and install separately.
1626 '(#:configure-flags '("-DBUILD_EXAMPLES=OFF"
1627 "-DBUILD_SHARED_LIBS=ON")
1629 #:phases (modify-phases %standard-phases
1630 (add-before 'configure 'set-library-directory
1632 ;; Install libraries to lib/, not lib64/.
1633 (substitute* "internal/ceres/CMakeLists.txt"
1634 (("set\\(LIB_SUFFIX \"64\"\\)")
1635 "set(LIB_SUFFIX \"\")"))
1638 `(("pkg-config" ,pkg-config)))
1640 `(("glog" ,glog))) ;for #include <glog/glog.h>
1645 ("suitesparse" ,suitesparse)
1646 ("gflags" ,gflags)))
1647 (synopsis "C++ library for solving large optimization problems")
1649 "Ceres Solver is a C++ library for modeling and solving large,
1650 complicated optimization problems. It is a feature rich, mature and
1651 performant library which has been used in production since 2010. Ceres Solver
1652 can solve two kinds of problems:
1654 @item non-linear least squares problems with bounds constraints;
1655 @item general unconstrained optimization problems.
1657 (license license:bsd-3)))
1659 ;; For a fully featured Octave, users are strongly recommended also to install
1660 ;; the following packages: less, ghostscript, gnuplot.
1661 (define-public octave-cli
1668 (uri (string-append "mirror://gnu/octave/octave-"
1672 "1848dq6nxzal8gwjrcp6xhi5gq96w89nss9d9rz75q408gb3mbl6"))))
1673 (build-system gnu-build-system)
1675 `(("alsa-lib" ,alsa-lib)
1676 ("arpack" ,arpack-ng)
1682 ("fontconfig" ,fontconfig)
1683 ("freetype" ,freetype)
1687 ("graphicsmagick" ,graphicsmagick)
1690 ("libsndfile" ,libsndfile)
1694 ("portaudio" ,portaudio)
1696 ("readline" ,readline)
1697 ("suitesparse" ,suitesparse)
1698 ("texinfo" ,texinfo)
1702 ("gfortran" ,gfortran)
1703 ("pkg-config" ,pkg-config)
1705 ;; The following inputs are not actually used in the build process.
1706 ;; However, the ./configure gratuitously tests for their existence and
1707 ;; assumes that programs not present at build time are also not, and
1708 ;; can never be, available at run time! If these inputs are therefore
1709 ;; not present, support for them will be built out. However, Octave
1710 ;; will still run without them, albeit without the features they
1713 ("ghostscript" ,ghostscript)
1714 ("gnuplot" ,gnuplot)))
1715 ;; Octave code uses this variable to detect directories holding multiple CA
1716 ;; certificates to verify peers with. This is required for the networking
1717 ;; functions that require encryption to work properly.
1718 (native-search-paths
1719 (list (search-path-specification
1720 (variable "CURLOPT_CAPATH")
1721 (files '("etc/ssl/certs")))))
1724 (list (string-append "--with-shell="
1725 (assoc-ref %build-inputs "bash")
1728 (modify-phases %standard-phases
1729 (add-after 'configure 'configure-makeinfo
1730 (lambda* (#:key inputs #:allow-other-keys)
1731 (substitute* "libinterp/corefcn/help.h"
1734 "\"" (assoc-ref inputs "texinfo") "/bin/makeinfo\"")))
1736 (home-page "https://www.gnu.org/software/octave/")
1737 (synopsis "High-level language for numerical computation")
1738 (description "GNU Octave is a high-level interpreted language that is
1739 specialized for numerical computations. It can be used for both linear and
1740 non-linear applications and it provides great support for visualizing results.
1741 Work may be performed both at the interactive command-line as well as via
1743 (license license:gpl3+)))
1745 (define-public octave
1746 (package (inherit octave-cli)
1749 (inherit (package-source octave-cli))))
1751 `(("qscintilla" ,qscintilla)
1753 ,@(package-inputs octave-cli)))
1755 `(("qttools" , qttools) ;for lrelease
1756 ("texlive" ,(texlive-union (list texlive-epsf))) ; for texi2dvi
1757 ,@(package-native-inputs octave-cli)))
1759 (substitute-keyword-arguments (package-arguments octave-cli)
1761 `(modify-phases ,phases
1762 (add-before 'configure 'patch-qscintilla-library-name
1763 (lambda* (#:key inputs #:allow-other-keys)
1764 ;; The QScintilla library that the Octave configure script tries
1765 ;; to link with should be named libqscintilla-qt5.so, but the
1766 ;; QScintilla input provides the shared library as
1767 ;; libqscintilla2_qt5.so.
1768 (substitute* "configure"
1769 (("qscintilla2-qt5")
1773 (define-public opencascade-oce
1775 (name "opencascade-oce")
1781 (url "https://github.com/tpaviot/oce.git")
1782 (commit (string-append "OCE-" version))))
1783 (file-name (git-file-name name version))
1784 (patches (search-patches "opencascade-oce-glibc-2.26.patch"))
1786 (base32 "0rg5wzkvfmzfl6v2amyryb8dnjad0nn9kyr607wy2gch6rciah69"))))
1787 (build-system cmake-build-system)
1790 (list "-DOCE_TESTING:BOOL=ON"
1791 "-DOCE_USE_TCL_TEST_FRAMEWORK:BOOL=ON"
1792 "-DOCE_DRAW:BOOL=ON"
1793 (string-append "-DOCE_INSTALL_PREFIX:PATH="
1794 (assoc-ref %outputs "out"))
1795 "-UCMAKE_INSTALL_RPATH")))
1797 `(("freetype" ,freetype)
1804 `(("python" ,python-wrapper)))
1805 (home-page "https://github.com/tpaviot/oce")
1806 (synopsis "Libraries for 3D modeling and numerical simulation")
1808 "Open CASCADE is a set of libraries for the development of applications
1809 dealing with 3D CAD data or requiring industrial 3D capabilities. It includes
1810 C++ class libraries providing services for 3D surface and solid modeling, CAD
1811 data exchange, and visualization. It is used for development of specialized
1812 software dealing with 3D models in design (CAD), manufacturing (CAM),
1813 numerical simulation (CAE), measurement equipment (CMM), and quality
1814 control (CAQ) domains.
1816 This is the ``Community Edition'' (OCE) of Open CASCADE, which gathers
1817 patches, improvements, and experiments contributed by users over the official
1818 Open CASCADE library.")
1819 (license (list license:lgpl2.1; OCE libraries, with an exception for the
1820 ; use of header files; see
1821 ; OCCT_LGPL_EXCEPTION.txt
1822 license:public-domain; files
1823 ; src/Standard/Standard_StdAllocator.hxx and
1824 ; src/NCollection/NCollection_StdAllocator.hxx
1825 license:expat; file src/OpenGl/OpenGl_glext.h
1826 license:bsd-3)))); test framework gtest
1828 (define-public opencascade-occt
1830 (name "opencascade-occt")
1836 (url "https://git.dev.opencascade.org/repos/occt.git")
1839 (string-map (lambda (x) (if (eq? x #\.) #\_ x))
1841 (file-name (git-file-name name version))
1843 (base32 "0bdywwxb6mk0ykbiajlvsb37295akqjp0a60y672qjfa67k0ljv4"))
1844 (modules '((guix build utils)))
1847 ;; Remove files specific to non-free operating systems.
1848 (delete-file-recursively "samples/ios")
1849 (delete-file-recursively "samples/mfc")
1850 (delete-file-recursively "samples/qt/FuncDemo")
1851 (delete-file "genconf.bat")
1852 (delete-file "gendoc.bat")
1853 (delete-file "genproj.bat")
1854 (delete-file "upgrade.bat")
1855 ;; Remove references to deleted files.
1856 (substitute* "dox/FILES_HTML.txt"
1857 ((".*standard.*") "" )
1858 ((".*UIKitSample.*") ""))
1860 (build-system cmake-build-system)
1862 '(;; There is no test target for make. OCCT provides an
1863 ;; 'Automated Testing System', which may be accessed after
1864 ;; installation via the draw.sh script. draw.sh is located in
1865 ;; the bin directory. For details see:
1866 ;; https://www.opencascade.com/doc/occt-7.3.0/overview/html/\
1867 ;; occt_dev_guides__tests.html
1869 ;; Configure without freeimage: attempting to link against the
1870 ;; freeimage version 3.17 library leads to 'undefined
1871 ;; reference' errors.
1873 (list "-DUSE_FREEIMAGE:BOOL=OFF"
1875 "-DUSE_VTK:BOOL=OFF"
1876 "-DBUILD_DOC_Overview:BOOL=OFF"
1877 "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON"
1878 "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON"
1879 "-UCMAKE_INSTALL_LIBDIR")))
1881 `(("doxygen" ,doxygen)
1882 ;("freeimage" ,freeimage)
1883 ("freetype" ,freetype)
1885 ("libxext" ,libxext)
1892 ;; TODO: build Overview documentation and add 'doc' output.
1893 (home-page "https://www.opencascade.com")
1894 (synopsis "Libraries for 3D modeling and numerical simulation")
1896 "Open CASCADE is a set of libraries for the development of applications
1897 dealing with 3D CAD data or requiring industrial 3D capabilities. It includes
1898 C++ class libraries providing services for 3D surface and solid modeling, CAD
1899 data exchange, and visualization. It is used for development of specialized
1900 software dealing with 3D models in design (CAD), manufacturing (CAM),
1901 numerical simulation (CAE), measurement equipment (CMM), and quality
1902 control (CAQ) domains.
1904 This is the certified version of the Open Cascade Technology (OCCT) library.")
1905 (license (list ;; OCCT library:
1906 license:lgpl2.1; with an exception for the use of header
1907 ; files, see OCCT_LGPL_EXCEPTION.txt.
1908 ;; Files src/OpenGl/glext.h, adm/cmake/cotire.cmake and
1909 ;; src/OpenGl/OpenGl_HaltonSampler.hxx:
1911 ;; Files src/ExprIntrp/ExprIntrp.tab.* and
1912 ;; src/StepFile/step.tab.*:
1913 license:gpl3+ ; with Bison 2.2 exception.
1914 ;; File src/NCollection/NCollection_UtfIterator.lxx:
1915 (license:non-copyleft
1916 "https://www.unicode.org/license.html")
1917 ;; File src/NCollection/NCollection_StdAllocator.hxx:
1918 license:public-domain))))
1928 (url "https://gitlab.onelab.info/gmsh/gmsh.git")
1930 (string-append "gmsh_"
1931 (string-map (lambda (x) (if (eq? x #\.) #\_ x))
1933 (file-name (git-file-name name version))
1935 (base32 "08rq4jajwmlpivnm9yifz2jhaivnz065lnk0h2zv773nwl9wf162"))
1936 (modules '((guix build utils)))
1938 ;; Remove non-free METIS code
1940 (delete-file-recursively "contrib/Metis")
1942 (build-system cmake-build-system)
1945 ("gfortran" ,gfortran)
1951 ("opencascade-oce" ,opencascade-oce)
1953 ("libxext" ,libxext)))
1955 `(("fontconfig" ,fontconfig)
1956 ("libxft" ,libxft)))
1958 `(#:configure-flags `("-DENABLE_METIS:BOOL=OFF"
1959 "-DENABLE_BUILD_SHARED:BOOL=ON"
1960 "-DENABLE_BUILD_DYNAMIC:BOOL=ON")))
1961 (home-page "http://gmsh.info/")
1962 (synopsis "3D finite element grid generator")
1963 (description "Gmsh is a 3D finite element grid generator with a built-in
1964 CAD engine and post-processor. Its design goal is to provide a fast, light
1965 and user-friendly meshing tool with parametric input and advanced
1966 visualization capabilities. Gmsh is built around four modules: geometry,
1967 mesh, solver and post-processing. The specification of any input to these
1968 modules is done either interactively using the graphical user interface or in
1969 ASCII text files using Gmsh's own scripting language.")
1970 (license license:gpl2+)))
1972 (define-public maxflow
1975 ;; Versioning is ambiguous: the git tag matching this commit is ‘3.0.5’,
1976 ;; which matches CMakeLists.txt, but README.md and CHANGES say ‘3.04’.
1981 (url "https://github.com/gerddie/maxflow.git")
1983 (file-name (git-file-name name version))
1986 "0rll38whw55h0vcjrrwdnh9ascvxby0ph7n1l0d12z17cg215kkb"))))
1987 (build-system cmake-build-system)
1988 (home-page "https://pub.ist.ac.at/~vnk/software.html")
1989 (synopsis "Library implementing Maxflow algorithm")
1990 (description "An implementation of the maxflow algorithm described in
1991 @cite{An Experimental Comparison of Min-Cut/Max-Flow Algorithms for
1992 Energy Minimization in Computer Vision.\n
1993 Yuri Boykov and Vladimir Kolmogorov.\n
1994 In IEEE Transactions on Pattern Analysis and Machine Intelligence,\n
1996 (license license:gpl3+)))
1998 (define-public petsc
2005 ;; The *-lite-* tarball does not contain the *large* documentation
2006 (uri (string-append "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/"
2007 "petsc-lite-" version ".tar.gz"))
2009 (base32 "1645nwwcp9bcnfnxikk480mhbbacdvhsay2c401818hk97dqj5nx"))))
2010 (outputs '("out" ; libraries and headers
2011 "examples")) ; ~30MiB of examples
2012 (build-system gnu-build-system)
2014 `(("python" ,python-2)))
2016 `(("gfortran" ,gfortran)
2018 ("superlu" ,superlu)
2019 ;; leaving out hdf5 and fftw, as petsc expects them to be built with mpi
2020 ;; leaving out opengl, as configuration seems to only be for mac
2023 `(#:test-target "test"
2024 #:parallel-build? #f ; build is parallel by default
2030 ;; Honor (parallel-job-count) for build. Do not use --with-make-np,
2031 ;; whose value is dumped to $out/lib/petsc/conf/petscvariables.
2032 (list (format #f "MAKE_NP=~a" (parallel-job-count)))
2034 (modify-phases %standard-phases
2036 ;; PETSc's configure script is actually a python script, so we can't
2037 ;; run it with bash.
2038 (lambda* (#:key outputs (configure-flags '())
2040 (let* ((prefix (assoc-ref outputs "out"))
2041 (flags `(,(string-append "--prefix=" prefix)
2042 ,@configure-flags)))
2043 (format #t "build directory: ~s~%" (getcwd))
2044 (format #t "configure flags: ~s~%" flags)
2045 (apply invoke "./configure" flags))))
2046 (add-after 'configure 'clean-local-references
2047 (lambda* (#:key outputs #:allow-other-keys)
2048 (let ((out (assoc-ref outputs "out")))
2049 (substitute* (find-files "." "^petsc(conf|machineinfo).h$")
2050 ;; Prevent build directory from leaking into compiled code
2052 ;; Scrub timestamp for reproducibility
2053 ((".*Libraries compiled on.*") ""))
2054 (substitute* (find-files "." "petscvariables")
2055 ;; Do not expose build machine characteristics, set to defaults.
2056 (("MAKE_NP = [:digit:]+") "MAKE_NP = 2")
2057 (("NPMAX = [:digit:]+") "NPMAX = 2"))
2059 (add-after 'install 'clean-install
2060 ;; Try to keep installed files from leaking build directory names.
2061 (lambda* (#:key inputs outputs #:allow-other-keys)
2062 (let ((out (assoc-ref outputs "out")))
2063 (substitute* (map (lambda (file)
2064 (string-append out "/lib/petsc/conf/" file))
2065 '("petscvariables"))
2067 ;; Make compiler references point to the store
2068 (substitute* (string-append out "/lib/petsc/conf/petscvariables")
2069 (("= (gcc|g\\+\\+|gfortran)" _ compiler)
2070 (string-append "= " (which compiler))))
2071 ;; PETSc installs some build logs, which aren't necessary.
2072 (for-each (lambda (file)
2073 (let ((f (string-append out "/lib/petsc/conf/" file)))
2074 (when (file-exists? f)
2076 '("configure.log" "make.log" "gmake.log"
2077 "test.log" "error.log" "RDict.db"
2078 "PETScBuildInternal.cmake"
2079 ;; Once installed, should uninstall with Guix
2082 (add-after 'install 'move-examples
2083 (lambda* (#:key outputs #:allow-other-keys)
2084 (let* ((out (assoc-ref outputs "out"))
2085 (examples (assoc-ref outputs "examples"))
2086 (exdir (string-append out "/share/petsc/examples"))
2087 (exdir' (string-append examples "/share/petsc/examples")))
2088 (copy-recursively exdir exdir')
2089 (delete-file-recursively exdir)
2091 (home-page "https://www.mcs.anl.gov/petsc")
2092 (synopsis "Library to solve PDEs")
2093 (description "PETSc, pronounced PET-see (the S is silent), is a suite of
2094 data structures and routines for the scalable (parallel) solution of
2095 scientific applications modeled by partial differential equations.")
2096 (license (license:non-copyleft
2097 "https://www.mcs.anl.gov/petsc/documentation/copyright.html"))))
2099 (define-public petsc-complex
2100 (package (inherit petsc)
2101 (name "petsc-complex")
2103 (substitute-keyword-arguments (package-arguments petsc)
2104 ((#:configure-flags cf)
2105 `(cons "--with-scalar-type=complex" ,cf))))
2106 (synopsis "Library to solve PDEs (with complex scalars)")))
2108 (define-public petsc-openmpi
2109 (package (inherit petsc)
2110 (name "petsc-openmpi")
2112 `(("hdf5" ,hdf5-parallel-openmpi)
2113 ("hypre" ,hypre-openmpi)
2115 ("mumps" ,mumps-openmpi)
2116 ("openmpi" ,openmpi)
2117 ("scalapack" ,scalapack)
2118 ("scotch" ,pt-scotch32)
2119 ,@(package-inputs petsc)))
2121 (substitute-keyword-arguments (package-arguments petsc)
2122 ((#:configure-flags cf)
2124 "--with-mpiexec=mpirun"
2127 "--with-scalapack=1"
2129 ,(string-append "--with-mpi-dir="
2130 (assoc-ref %build-inputs "openmpi"))
2131 ,(string-append "--with-hdf5-include="
2132 (assoc-ref %build-inputs "hdf5") "/include")
2133 ,(string-append "--with-hdf5-lib="
2134 (assoc-ref %build-inputs "hdf5") "/lib/libhdf5.a")
2135 ,@(delete "--with-mpi=0" ,cf)))
2137 `(modify-phases ,phases
2138 (add-before 'configure 'mpi-setup
2139 ,%openmpi-setup)))))
2140 (synopsis "Library to solve PDEs (with MUMPS and MPI support)")))
2142 (define-public petsc-complex-openmpi
2143 (package (inherit petsc-complex)
2144 (name "petsc-complex-openmpi")
2146 `(("openmpi" ,openmpi)
2147 ,@(package-inputs petsc-complex)))
2149 (substitute-keyword-arguments (package-arguments petsc-complex)
2150 ((#:configure-flags cf)
2151 ``("--with-mpiexec=mpirun"
2152 ,(string-append "--with-mpi-dir="
2153 (assoc-ref %build-inputs "openmpi"))
2154 ,@(delete "--with-mpi=0" ,cf)))
2156 `(modify-phases ,phases
2157 (add-before 'configure 'mpi-setup
2158 ,%openmpi-setup)))))
2159 (synopsis "Library to solve PDEs (with complex scalars and MPI support)")))
2161 (define-public python-petsc4py
2163 (name "python-petsc4py")
2168 (uri (pypi-uri "petsc4py" version))
2171 "1rm1qj5wlkhxl39by9n78lh3gbmii31wsnb8j1rr5hvfr5xgbx2q"))))
2172 (build-system python-build-system)
2175 (modify-phases %standard-phases
2176 (add-before 'build 'pre-build
2178 ;; Define path to PETSc installation.
2179 (setenv "PETSC_DIR" (assoc-ref %build-inputs "petsc"))
2181 (add-before 'check 'mpi-setup
2184 `(("petsc" ,petsc-openmpi)
2185 ("python-numpy" ,python-numpy)))
2186 (home-page "https://bitbucket.org/petsc/petsc4py/")
2187 (synopsis "Python bindings for PETSc")
2188 (description "PETSc, the Portable, Extensible Toolkit for
2189 Scientific Computation, is a suite of data structures and routines for
2190 the scalable (parallel) solution of scientific applications modeled by
2191 partial differential equations. It employs the MPI standard for all
2192 message-passing communication. @code{petsc4py} provides Python
2193 bindings to almost all functions of PETSc.")
2194 (license license:bsd-3)))
2196 (define-public python-kiwisolver
2198 (name "python-kiwisolver")
2202 (uri (pypi-uri "kiwisolver" version))
2205 "0y22ci86znwwwfhbmvbgdfnbi6lv5gv2xkdlxvjw7lml43ayafyf"))))
2206 (build-system python-build-system)
2207 (home-page "https://github.com/nucleic/kiwi")
2208 (synopsis "Fast implementation of the Cassowary constraint solver")
2210 "Kiwi is an efficient C++ implementation of the Cassowary constraint
2211 solving algorithm. Kiwi has been designed from the ground up to be
2212 lightweight and fast. Kiwi ranges from 10x to 500x faster than the original
2213 Cassowary solver with typical use cases gaining a 40x improvement. Memory
2214 savings are consistently > 5x.")
2215 (license license:bsd-3)))
2217 (define-public python2-kiwisolver
2218 (package-with-python2 python-kiwisolver))
2220 (define-public slepc
2227 (uri (string-append "http://slepc.upv.es/download/distrib/slepc-"
2231 "1yq84q9wannc8xwapxpay4ypdd675picwi395hhsdvng9q6hf5j8"))))
2232 (build-system gnu-build-system)
2234 `(("python" ,python-2)
2235 ("petsc:examples" ,petsc "examples"))) ;for gmakegen.py script
2237 `(("arpack" ,arpack-ng)
2238 ("gfortran" ,gfortran)))
2240 `(("petsc" ,petsc)))
2242 `(#:parallel-build? #f ;build is parallel by default
2244 `(,(string-append "--with-arpack-dir="
2245 (assoc-ref %build-inputs "arpack") "/lib"))
2246 #:make-flags ;honor (parallel-job-count)
2247 `(,(format #f "MAKE_NP=~a" (parallel-job-count))
2248 ,(string-append "PETSCCONFIGDIR="
2249 (assoc-ref %build-inputs "petsc:examples")
2250 "/share/petsc/examples/config"))
2252 (modify-phases %standard-phases
2254 ;; configure is a python script, so we can't run it with bash.
2255 (lambda* (#:key inputs outputs (configure-flags '())
2257 (let* ((prefix (assoc-ref outputs "out"))
2258 (flags `(,(string-append "--prefix=" prefix)
2259 ,@configure-flags)))
2260 (format #t "build directory: ~s~%" (getcwd))
2261 (format #t "configure flags: ~s~%" flags)
2262 (setenv "SLEPC_DIR" (getcwd))
2263 (setenv "PETSC_DIR" (assoc-ref inputs "petsc"))
2264 (apply invoke "./configure" flags))))
2265 (add-after 'install 'delete-doc
2266 ;; TODO: SLEPc installs HTML documentation alongside headers in
2267 ;; $out/include. We'd like to move them to share/doc, but delete
2268 ;; them for now, as they are incomplete and installing the complete
2269 ;; documentation is difficult.
2270 (lambda* (#:key outputs #:allow-other-keys)
2271 (let* ((out (assoc-ref outputs "out")))
2272 (for-each delete-file (find-files out "\\.html$"))
2274 (add-after 'install 'clean-install
2275 ;; Clean up unnecessary build logs from installation.
2276 (lambda* (#:key outputs #:allow-other-keys)
2277 (let ((out (assoc-ref outputs "out")))
2278 (for-each (lambda (file)
2279 (let ((f (string-append out "/lib/slepc/conf/" file)))
2280 (when (file-exists? f)
2282 '("configure.log" "make.log" "gmake.log"
2283 "test.log" "error.log" "RDict.db"
2286 (home-page "http://slepc.upv.es")
2287 (synopsis "Scalable library for eigenproblems")
2288 (description "SLEPc is a software library for the solution of large sparse
2289 eigenproblems on parallel computers. It can be used for the solution of
2290 linear eigenvalue problems formulated in either standard or generalized form,
2291 as well as other related problems such as the singular value decomposition.
2292 The emphasis of the software is on methods and techniques appropriate for
2293 problems in which the associated matrices are sparse, for example, those
2294 arising after the discretization of partial differential equations.")
2295 (license license:bsd-2)))
2297 (define-public slepc-complex
2298 (package (inherit slepc)
2299 (name "slepc-complex")
2301 `(("petsc" ,petsc-complex)
2302 ,@(alist-delete "petsc" (package-propagated-inputs slepc))))
2303 (synopsis "Scalable library for eigenproblems (with complex scalars)")))
2305 (define-public slepc-openmpi
2306 (package (inherit slepc)
2307 (name "slepc-openmpi")
2309 (substitute-keyword-arguments (package-arguments slepc)
2310 ((#:phases phases '%standard-phases)
2311 `(modify-phases ,phases
2312 (add-before 'check 'mpi-setup
2313 ,%openmpi-setup)))))
2316 ("arpack" ,arpack-ng-openmpi)
2317 ,@(alist-delete "arpack" (package-inputs slepc))))
2319 `(("petsc" ,petsc-openmpi)
2320 ,@(alist-delete "petsc" (package-propagated-inputs slepc))))
2321 (synopsis "Scalable library for eigenproblems (with MPI support)")))
2323 (define-public slepc-complex-openmpi
2324 (package (inherit slepc-openmpi)
2325 (name "slepc-complex-openmpi")
2327 `(("petsc" ,petsc-complex-openmpi)
2328 ,@(alist-delete "petsc" (package-propagated-inputs slepc-openmpi))))
2329 (synopsis "Scalable library for eigenproblems (with complex scalars and MPI support)")))
2331 (define-public python-slepc4py
2333 (name "python-slepc4py")
2338 (uri (pypi-uri "slepc4py" version))
2341 "1ksp08kxf4wg408b9nn39z3qfhy643j22d4rfbl30vzxk2rxh4lq"))))
2342 (build-system python-build-system)
2345 (modify-phases %standard-phases
2346 (add-before 'build 'pre-build
2348 ;; Define path to PETSc installation.
2349 (setenv "PETSC_DIR" (assoc-ref %build-inputs "petsc"))
2350 ;; Define path to SLEPc installation.
2351 (setenv "SLEPC_DIR" (assoc-ref %build-inputs "slepc"))
2353 (add-before 'check 'mpi-setup
2356 `(("python-numpy" ,python-numpy)
2357 ("python-petsc4py" ,python-petsc4py)
2358 ("slepc" ,slepc-openmpi)))
2359 (home-page "https://bitbucket.org/slepc/slepc4py/")
2360 (synopsis "Python bindings for SLEPc")
2361 (description "SLEPc, the Scalable Library for Eigenvalue Problem
2362 Computations, is based on PETSc, the Portable, Extensible Toolkit for
2363 Scientific Computation. It employs the MPI standard for all
2364 message-passing communication. @code{slepc4py} provides Python
2365 bindings to almost all functions of SLEPc.")
2366 (license license:bsd-3)))
2368 (define-public mumps
2375 (uri (string-append "http://mumps.enseeiht.fr/MUMPS_"
2379 "0jklh54x4y3ik1zkw6db7766kakjm5910diyaghfxxf8vwsgr26r"))
2380 (patches (search-patches "mumps-build-parallelism.patch"
2381 "mumps-shared-libseq.patch"
2382 "mumps-shared-mumps.patch"
2383 "mumps-shared-pord.patch"))))
2384 (build-system gnu-build-system)
2386 `(("fortran" ,gfortran)
2387 ;; These are required for linking against mumps, but we let the user
2388 ;; declare the dependency.
2391 ("scotch" ,scotch)))
2393 `(#:modules ((ice-9 match)
2396 ,@%gnu-build-system-modules)
2398 (modify-phases %standard-phases
2400 (lambda* (#:key inputs #:allow-other-keys)
2401 (call-with-output-file "Makefile.inc"
2412 INCSEQ = -I$(topdir)/libseq
2413 LIBSEQ = $(topdir)/libseq/libmpiseq.a
2414 LIBSEQNEEDED = libseqneeded~;
2418 AR = ar vr # rules require trailing space, ugh...
2421 LIBBLAS = -Wl,-rpath=$(BLASDIR) -Wl,-rpath='$$ORIGIN' -L$(BLASDIR) -lopenblas~@[
2423 SCALAP = -Wl,-rpath=$(SCALAPDIR) -Wl,-rpath='$$ORIGIN' -L$(SCALAPDIR) -lscalapack~]
2424 LIBOTHERS = -pthread
2427 OPTF = -O2 -DALLOW_NON_INIT $(PIC)
2431 LIBS = $(SCALAP) $(LIBSEQ)
2432 LPORDDIR = $(topdir)/PORD/lib
2433 IPORD = -I$(topdir)/PORD/include
2434 LPORD = $(LPORDDIR)/libpord.a
2435 ORDERINGSF = -Dpord~@[
2437 IMETIS = -I$(METISDIR)/include
2438 LMETIS = -Wl,-rpath $(METISDIR)/lib -L$(METISDIR)/lib -lmetis
2439 ORDERINGSF += -Dmetis~]~@[~:{
2441 ISCOTCH = -I$(SCOTCHDIR)/include
2442 LSCOTCH = -Wl,-rpath $(SCOTCHDIR)/lib -L$(SCOTCHDIR)/lib ~a-lesmumps -lscotch -lscotcherr
2443 ORDERINGSF += ~a~}~]
2444 ORDERINGSC = $(ORDERINGSF)
2445 LORDERINGS = $(LPORD) $(LMETIS) $(LSCOTCH) $(LIBSEQ)
2446 IORDERINGSF = $(ISCOTCH)
2447 IORDERINGSC = $(IPORD) $(IMETIS) $(ISCOTCH)"
2448 (assoc-ref inputs "mpi")
2449 (assoc-ref inputs "blas")
2450 (assoc-ref inputs "scalapack")
2451 (assoc-ref inputs "metis")
2452 (match (list (assoc-ref inputs "pt-scotch")
2453 (assoc-ref inputs "scotch"))
2457 `((,scotch "" "-Dscotch")))
2460 "-lptesmumps -lptscotch -lptscotcherr "
2461 "-Dptscotch")))))))))
2463 ;; By default only the d-precision library is built. Make with "all"
2464 ;; target so that all precision libraries and examples are built.
2466 (invoke "make" "all"
2467 (format #f "-j~a" (parallel-job-count)))))
2469 ;; Run the simple test drivers, which read test input from stdin:
2470 ;; from the "real" input for the single- and double-precision
2471 ;; testers, and from the "cmplx" input for complex-precision
2472 ;; testers. The EXEC-PREFIX key is used by the mumps-openmpi
2473 ;; package to prefix execution with "mpirun".
2474 (lambda* (#:key (exec-prefix '()) #:allow-other-keys)
2475 (with-directory-excursion "examples"
2478 (let ((tester (apply open-pipe*
2481 ,(string-append "./" prec
2483 (input (open-input-file
2484 (string-append "input_simpletest_" type))))
2486 (dump-port input tester)
2488 (zero? (close-pipe tester)))))
2490 '("real" "real" "cmplx" "cmplx")))))
2492 (lambda* (#:key outputs #:allow-other-keys)
2493 (let* ((out (assoc-ref outputs "out"))
2494 (libdir (string-append out "/lib")))
2495 (copy-recursively "lib" libdir)
2496 (copy-recursively "include" (string-append out "/include"))
2497 (when (file-exists? "libseq/libmpiseq.a")
2498 (install-file "libseq/libmpiseq.a" libdir))
2499 (when (file-exists? "libseq/libmpiseq.so")
2500 (install-file "libseq/libmpiseq.so" libdir))
2502 (home-page "http://mumps.enseeiht.fr")
2503 (synopsis "Multifrontal sparse direct solver")
2505 "MUMPS (MUltifrontal Massively Parallel sparse direct Solver) solves a
2506 sparse system of linear equations A x = b using Gaussian elimination.")
2507 (license license:cecill-c)))
2509 (define-public mumps-metis
2510 (package (inherit mumps)
2511 (name "mumps-metis")
2513 (alist-delete "scotch" (package-inputs mumps)))))
2515 (define-public mumps-openmpi
2516 (package (inherit mumps)
2517 (name "mumps-openmpi")
2520 ("scalapack" ,scalapack)
2521 ("pt-scotch" ,pt-scotch)
2522 ,@(alist-delete "scotch" (package-inputs mumps))))
2524 (substitute-keyword-arguments (package-arguments mumps)
2526 `(modify-phases ,phases
2527 (add-before 'check 'mpi-setup
2531 ((assoc-ref ,phases 'check)
2532 #:exec-prefix '("mpirun" "-n" "2"))))))))
2533 (synopsis "Multifrontal sparse direct solver (with MPI)")))
2535 (define-public mumps-metis-openmpi
2536 (package (inherit mumps-openmpi)
2537 (name "mumps-metis-openmpi")
2539 (alist-delete "pt-scotch" (package-inputs mumps-openmpi)))))
2541 (define-public ruby-asciimath
2543 (name "ruby-asciimath")
2548 (uri (rubygems-uri "asciimath" version))
2551 "1d80kiph5mc78zps7si1hv48kv4k12mzaq8jk5kb3pqpjdr72qmc"))))
2552 (build-system ruby-build-system)
2555 (modify-phases %standard-phases
2557 ;; https://github.com/asciidoctor/asciimath/commit/1c06fdc8086077f4785479f78b0823a4a72d7948
2558 (add-after 'unpack 'patch-remove-spurious-backslashes
2560 (substitute* "spec/parser_spec.rb"
2565 `(("bundler" ,bundler)
2566 ("ruby-rspec" ,ruby-rspec)))
2567 (synopsis "AsciiMath parsing and conversion library")
2569 "A pure Ruby AsciiMath parsing and conversion library. AsciiMath is an
2570 easy-to-write markup language for mathematics.")
2571 (home-page "https://github.com/asciidoctor/asciimath")
2572 (license license:expat)))
2574 (define-public superlu
2581 (uri (string-append "https://portal.nersc.gov/project/sparse/superlu/"
2582 "superlu_" version ".tar.gz"))
2584 (base32 "0qzlb7cd608q62kyppd0a8c65l03vrwqql6gsm465rky23b6dyr8"))
2585 (modules '((guix build utils)))
2587 ;; Replace the non-free implementation of MC64 with a stub adapted
2590 (use-modules (ice-9 regex)
2592 (call-with-output-file "SRC/mc64ad.c"
2597 void mc64id_(int *a) {
2598 fprintf (stderr, \"SuperLU: non-free MC64 not available. Aborting.\\n\");
2601 void mc64ad_ (int *a, int *b, int *c, int *d, int *e, double *f, int *g,
2602 int *h, int *i, int *j, int *k, double *l, int *m, int *n) {
2603 fprintf (stderr, \"SuperLU: non-free MC64 not available. Aborting.\\n\");
2606 ;; Remove the corresponding license verbiage. MC64 license follows
2607 ;; a "------" line separator.
2608 (with-atomic-file-replacement "License.txt"
2609 (let ((rx (make-regexp "-{8}")))
2612 (let ((line (read-line in 'concat)))
2613 (unless (regexp-exec rx line)
2617 (build-system cmake-build-system)
2621 `(("blas" ,openblas)
2622 ("gfortran" ,gfortran)))
2624 `(#:configure-flags '("-Denable_blaslib:BOOL=NO" ;do not use internal cblas
2625 "-DTPL_BLAS_LIBRARIES=openblas"
2626 "-DBUILD_SHARED_LIBS:BOOL=YES")))
2627 (home-page "https://portal.nersc.gov/project/sparse/superlu/")
2628 (synopsis "Supernodal direct solver for sparse linear systems")
2630 "SuperLU is a general purpose library for the direct solution of large,
2631 sparse, nonsymmetric systems of linear equations on high performance machines.
2632 The library is written in C and is callable from either C or Fortran. The
2633 library routines perform an LU decomposition with partial pivoting and
2634 triangular system solves through forward and back substitution. The library
2635 also provides threshold-based ILU factorization preconditioners.")
2636 (license (list license:bsd-3
2637 license:gpl2+ ;EXAMPLE/*fgmr.c
2638 (license:fsf-free "file://SRC/colamd.h")))))
2640 (define-public superlu-dist
2642 (name "superlu-dist")
2647 (uri (string-append "https://portal.nersc.gov/project/sparse/superlu/"
2648 "superlu_dist_" version ".tar.gz"))
2650 (base32 "1ynmwqajc9sc3my2hssa5k9s58ggvizqv9rdss0j7w99pbh5mnvw"))
2651 (modules '((guix build utils)))
2653 ;; Replace the non-free implementation of MC64 with a stub
2655 (call-with-output-file "SRC/mc64ad_dist.c"
2660 void mc64id_dist(int *a) {
2661 fprintf (stderr, \"SuperLU_DIST: non-free MC64 not available. Aborting.\\n\");
2664 void mc64ad_dist (int *a, int *b, int *c, int *d, int *e, double *f, int *g,
2665 int *h, int *i, int *j, int *k, double *l, int *m, int *n) {
2666 fprintf (stderr, \"SuperLU_DIST: non-free MC64 not available. Aborting.\\n\");
2669 (substitute* "SRC/util.c" ;adjust default algorithm
2670 (("RowPerm[[:blank:]]*=[[:blank:]]*LargeDiag_MC64;")
2671 ;; TODO: set to "LargeDiag_AWPM" once combinatorial-blas has
2672 ;; general (i.e. non-square) processor-grid support.
2673 "RowPerm = NOROWPERM;"))
2675 (patches (search-patches "superlu-dist-scotchmetis.patch"
2676 "superlu-dist-awpm-grid.patch"))))
2677 (build-system cmake-build-system)
2681 `(("gfortran" ,gfortran)
2684 ("combblas" ,combinatorial-blas)))
2686 `(("mpi" ,openmpi) ;headers include MPI heades
2687 ("parmetis" ,pt-scotch32 "metis")
2688 ("pt-scotch" ,pt-scotch32)))
2690 `(#:parallel-tests? #f ;tests use MPI and OpenMP
2691 #:configure-flags (list "-DBUILD_SHARED_LIBS:BOOL=YES"
2692 "-DTPL_ENABLE_COMBBLASLIB=YES"
2693 "-DTPL_BLAS_LIBRARIES=-lopenblas"
2694 "-DTPL_LAPACK_LIBRARIES=-llapack"
2695 (string-append "-DTPL_PARMETIS_LIBRARIES="
2697 '("ptscotchparmetis" "ptscotch" "ptscotcherr"
2698 "scotchmetis" "scotch" "scotcherr")
2700 (string-append "-DTPL_PARMETIS_INCLUDE_DIRS="
2701 (assoc-ref %build-inputs "parmetis")
2703 "-DTPL_ENABLE_COMBBLASLIB=ON"
2704 (string-append "-DTPL_COMBBLAS_INCLUDE_DIRS="
2705 (assoc-ref %build-inputs "combblas")
2706 "/include/CombBLAS;"
2707 (assoc-ref %build-inputs "combblas")
2708 "/include/BipartiteMatchings")
2709 "-DTPL_COMBBLAS_LIBRARIES=CombBLAS")
2711 (modify-phases %standard-phases
2712 (add-before 'configure 'set-c++-standard
2714 (substitute* "CMakeLists.txt"
2715 ;; AWPM headers require C++14
2716 (("CMAKE_CXX_STANDARD 11") "CMAKE_CXX_STANDARD 14"))))
2717 (add-before 'check 'mpi-setup
2719 (add-before 'check 'omp-setup
2720 (lambda _ (setenv "OMP_NUM_THREADS" "1") #t)))))
2721 (home-page (package-home-page superlu))
2722 (synopsis "Parallel supernodal direct solver")
2724 "SuperLU_DIST is a parallel extension to the serial SuperLU library.
2725 It is targeted for distributed memory parallel machines. SuperLU_DIST is
2726 implemented in ANSI C, and MPI for communications.")
2727 (license license:bsd-3)))
2729 (define-public scotch
2736 (uri (string-append "https://gforge.inria.fr/frs/download.php/"
2737 "latestfile/298/scotch_" version ".tar.gz"))
2739 (base32 "1ky4k9r6jvajhqaqnnx6h8fkmds2yxgp70dpr1qzwcyhi2nhqvv8"))
2740 (patches (search-patches "scotch-build-parallelism.patch"
2741 "scotch-integer-declarations.patch"))))
2742 (build-system gnu-build-system)
2748 (outputs '("out" "metis"))
2750 `(#:make-flags (list (string-append "prefix=" %output))
2752 (modify-phases %standard-phases
2754 'unpack 'chdir-to-src
2755 (lambda _ (chdir "src") #t))
2759 (call-with-output-file "Makefile.inc"
2773 CFLAGS = -O2 -g -fPIC $(CPPFLAGS)
2774 LDFLAGS = -lz -lm -lrt -lpthread
2776 LEX = flex -Pscotchyy -olex.yy.c
2781 YACC = bison -pscotchyy -y -b y
2783 '("COMMON_FILE_COMPRESS_GZ"
2785 "COMMON_RANDOM_FIXED_SEED"
2786 "INTSIZE64" ;use 'int64_t'
2787 ;; Prevents symbolc clashes with libesmumps
2789 ;; XXX: Causes invalid frees in superlu-dist tests
2791 ;; "SCOTCH_PTHREAD_NUMBER=2"
2792 "restrict=__restrict"))))
2794 (add-after 'build 'build-esmumps
2797 (format #f "-j~a" (parallel-job-count))
2799 (add-before 'install 'make-install-dirs
2800 (lambda* (#:key outputs #:allow-other-keys)
2801 (mkdir (assoc-ref outputs "out"))))
2802 (add-after 'install 'install-metis
2803 (lambda* (#:key outputs #:allow-other-keys)
2804 (let ((out (assoc-ref outputs "metis")))
2806 ;; metis files are not installed with 'make install'
2807 (for-each (lambda (f)
2808 (install-file f (string-append out "/include")))
2809 (find-files "../include/" ".*metis\\.h"))
2810 (for-each (lambda (f)
2811 (install-file f (string-append out "/lib")))
2812 (find-files "../lib/" ".*metis\\..*"))
2814 (home-page "https://www.labri.fr/perso/pelegrin/scotch/")
2815 (synopsis "Programs and libraries for graph algorithms")
2816 (description "SCOTCH is a set of programs and libraries which implement
2817 the static mapping and sparse matrix reordering algorithms developed within
2818 the SCOTCH project. Its purpose is to apply graph theory, with a divide and
2819 conquer approach, to scientific computing problems such as graph and mesh
2820 partitioning, static mapping, and sparse matrix ordering, in application
2821 domains ranging from structural mechanics to operating systems or
2823 ;; See LICENSE_en.txt
2824 (license license:cecill-c)))
2826 (define-public scotch32
2827 ;; This is the 'INTSIZE32' variant, which uses 32-bit integers, as needed by
2828 ;; some applications.
2829 (package (inherit scotch)
2832 (substitute-keyword-arguments (package-arguments scotch)
2833 ((#:phases scotch-phases)
2834 `(modify-phases ,scotch-phases
2838 (call-with-output-file "Makefile.inc"
2852 CFLAGS = -O2 -g -fPIC $(CPPFLAGS)
2853 LDFLAGS = -lz -lm -lrt -lpthread
2855 LEX = flex -Pscotchyy -olex.yy.c
2860 YACC = bison -pscotchyy -y -b y
2862 '("COMMON_FILE_COMPRESS_GZ"
2864 "COMMON_RANDOM_FIXED_SEED"
2865 "INTSIZE32" ;use 32-bit integers. See INSTALL.txt
2866 ;; Prevents symbolc clashes with libesmumps
2868 ;; XXX: Causes invalid frees in superlu-dist tests
2870 ;; "SCOTCH_PTHREAD_NUMBER=2"
2871 "restrict=__restrict"))))))))))
2873 "Programs and libraries for graph algorithms (32-bit integers)")))
2875 (define-public pt-scotch
2876 (package (inherit scotch)
2879 `(("openmpi" ,openmpi))) ;Headers include MPI headers
2881 (substitute-keyword-arguments (package-arguments scotch)
2882 ((#:phases scotch-phases)
2883 `(modify-phases ,scotch-phases
2887 (invoke "make" (format #f "-j~a" (parallel-job-count))
2888 "ptscotch" "ptesmumps")
2890 ;; Install the serial metis compatibility library
2891 (invoke "make" "-C" "libscotchmetis" "install")))
2892 (add-before 'check 'mpi-setup
2896 (invoke "make" "ptcheck")))))))
2897 (synopsis "Programs and libraries for graph algorithms (with MPI)")))
2899 (define-public pt-scotch32
2900 (package (inherit scotch32)
2901 (name "pt-scotch32")
2903 `(("openmpi" ,openmpi))) ;headers include MPI headers
2905 (substitute-keyword-arguments (package-arguments scotch32)
2906 ((#:phases scotch32-phases)
2907 `(modify-phases ,scotch32-phases
2910 (invoke "make" (format #f "-j~a" (parallel-job-count))
2911 "ptscotch" "ptesmumps")
2912 ;; Install the serial metis compatibility library
2913 (invoke "make" "-C" "libscotchmetis" "install")))
2914 (add-before 'check 'mpi-setup
2918 (invoke "make" "ptcheck")))))))
2920 "Programs and libraries for graph algorithms (with MPI and 32-bit integers)")))
2922 (define-public metis
2929 (uri (string-append "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/"
2930 "metis-" version ".tar.gz"))
2933 "1cjxgh41r8k6j029yxs8msp3z6lcnpm16g5pvckk35kc7zhfpykn"))))
2934 (build-system cmake-build-system)
2936 `(("blas" ,openblas)))
2938 `(#:tests? #f ;no tests
2939 #:configure-flags `("-DSHARED=ON"
2940 ,(string-append "-DGKLIB_PATH=" (getcwd)
2941 "/metis-" ,version "/GKlib"))))
2942 (home-page "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview")
2943 (synopsis "Graph partitioning and fill-reducing matrix ordering library")
2945 "METIS is a set of serial programs for partitioning graphs, partitioning
2946 finite element meshes, and producing fill-reducing orderings for sparse
2947 matrices. The algorithms implemented in METIS are based on the multilevel
2948 recursive-bisection, multilevel k-way, and multi-constraint partitioning
2950 (license license:asl2.0))) ;As of version 5.0.3
2952 (define-public p4est
2959 (uri (string-append "http://p4est.github.io/release/p4est-"
2963 "16h267z256kxcxfjs390qqzv19hr58vrj4x8lndb7alnk2vca8n5"))))
2964 (build-system gnu-build-system)
2966 `(("fortran" ,gfortran)
2971 `(#:configure-flags `(,(string-append "BLAS_LIBS=-L"
2972 (assoc-ref %build-inputs "blas")
2974 ,(string-append "LAPACK_LIBS=-L"
2975 (assoc-ref %build-inputs "lapack")
2977 #:phases (modify-phases %standard-phases
2978 (add-before 'check 'mpi-setup
2980 (home-page "http://www.p4est.org")
2981 (synopsis "Adaptive mesh refinement on forests of octrees")
2983 "The p4est software library enables the dynamic management of a
2984 collection of adaptive octrees, conveniently called a forest of octrees.
2985 p4est is designed to work in parallel and scales to hundreds of thousands of
2987 (license license:gpl2+)))
2989 (define-public p4est-openmpi
2990 (package (inherit p4est)
2991 (name "p4est-openmpi")
2994 ,@(package-inputs p4est)))
2996 (substitute-keyword-arguments (package-arguments p4est)
2997 ((#:configure-flags cf)
2998 ``("--enable-mpi" ,@,cf))))
2999 (synopsis "Parallel adaptive mesh refinement on forests of octrees")))
3001 (define-public gsegrafix
3008 (uri (string-append "mirror://gnu/" name "/" name "-"
3012 "1b13hvx063zv970y750bx41wpx6hwd5ngjhbdrna8w8yy5kmxcda"))))
3013 (build-system gnu-build-system)
3015 `(#:configure-flags '("LDFLAGS=-lm")))
3017 `(("libgnomecanvas" ,libgnomecanvas)
3018 ("libbonoboui" ,libbonoboui)
3019 ("libgnomeui" ,libgnomeui)
3020 ("libgnomeprintui" ,libgnomeprintui)
3023 `(("pkg-config" ,pkg-config)))
3024 (home-page "https://www.gnu.org/software/gsegrafix/")
3025 (synopsis "GNOME application to create scientific and engineering plots")
3026 (description "GSEGrafix is an application which produces high-quality graphical
3027 plots for science and engineering. Plots are specified via simple ASCII
3028 parameter files and data files and are presented in an anti-aliased GNOME
3029 canvas. The program supports rectangular two-dimensional plots, histograms,
3030 polar-axis plots and three-dimensional plots. Plots can be printed or saved
3031 to BMP, JPEG or PNG image formats.")
3032 (license license:gpl3+)))
3034 (define-public maxima
3041 (uri (string-append "mirror://sourceforge/maxima/Maxima-source/"
3042 version "-source/" name "-" version ".tar.gz"))
3045 "0xyahp4c6509haxh4n1swiqm3421gplkdisa0zypclh3252sbzfw"))
3046 (patches (search-patches "maxima-defsystem-mkdir.patch"))))
3047 (build-system gnu-build-system)
3050 ("gnuplot" ,gnuplot) ;for plots
3052 ("tk" ,tk))) ;Tcl/Tk is used by 'xmaxima'
3054 `(("texinfo" ,texinfo)
3056 ("python" ,python)))
3059 (list "--enable-gcl"
3060 (string-append "--with-posix-shell="
3061 (assoc-ref %build-inputs "bash")
3063 (string-append "--with-wish="
3064 (assoc-ref %build-inputs "tk")
3066 (let ((v ,(package-version tk)))
3067 (string-take v (string-index-right v #\.)))))
3068 ;; By default Maxima attempts to write temporary files to
3069 ;; '/tmp/nix-build-maxima-*', which won't exist at run time.
3070 ;; Work around that.
3071 #:make-flags (list "TMPDIR=/tmp")
3073 (modify-phases %standard-phases
3074 (add-after 'unpack 'patch-paths
3075 (lambda* (#:key inputs #:allow-other-keys)
3076 (let* ((sed (string-append (assoc-ref inputs "sed") "/bin/sed"))
3077 (coreutils (assoc-ref inputs "coreutils"))
3078 (dirname (string-append coreutils "/bin/dirname"))
3079 (head (string-append coreutils "/bin/head"))
3080 (perl (string-append (assoc-ref inputs "perl") "/bin/perl"))
3081 (python (string-append (assoc-ref inputs "python")
3083 (substitute* "src/maxima.in"
3084 (("sed ") (string-append sed " "))
3085 (("dirname") dirname)
3087 (substitute* "doc/info/Makefile.in"
3088 (("/usr/bin/env perl") perl))
3089 (substitute* "doc/info/build_html.sh.in"
3090 (("python") python))
3092 (add-before 'check 'pre-check
3094 (chmod "src/maxima" #o555)
3098 ;; This is derived from the testing code in the "debian/rules" file
3099 ;; of Debian's Maxima package.
3100 ;; If Maxima can successfully run this, the binary to be installed
3106 "--batch-string=\"run_testsuite();\" "
3107 "| grep -q \"No unexpected errors found\""))))
3108 ;; Make sure the doc and emacs files are found in the
3109 ;; standard location. Also configure maxima to find gnuplot
3110 ;; without having it on the PATH.
3111 (add-after 'install 'post-install
3112 (lambda* (#:key outputs inputs #:allow-other-keys)
3113 (let* ((gnuplot (assoc-ref inputs "gnuplot"))
3114 (out (assoc-ref outputs "out"))
3115 (datadir (string-append out "/share/maxima/" ,version))
3116 (binutils (string-append (assoc-ref inputs "binutils")
3118 (with-directory-excursion out
3119 (mkdir-p "share/emacs")
3120 (mkdir-p "share/doc")
3122 (string-append datadir "/doc/")
3123 (string-append out "/share/doc/maxima"))
3124 (with-atomic-file-replacement
3125 (string-append datadir "/share/maxima-init.lisp")
3127 (format out "~a ~s~a~%"
3128 "(setf $gnuplot_command "
3129 (string-append gnuplot "/bin/gnuplot") ")")
3130 (dump-port in out))))
3131 ;; Ensure that Maxima will have access to the GNU binutils
3132 ;; components at runtime.
3133 (wrap-program (string-append out "/bin/maxima")
3134 `("PATH" prefix (,binutils))))
3136 (home-page "http://maxima.sourceforge.net")
3137 (synopsis "Numeric and symbolic expression manipulation")
3138 (description "Maxima is a system for the manipulation of symbolic and
3139 numerical expressions. It yields high precision numeric results by using
3140 exact fractions, arbitrary precision integers, and variable precision floating
3142 ;; Some files are lgpl2.1+. Some are gpl2+. Some explicitly state gpl1+.
3143 ;; Others simply say "GNU General Public License" without stating a
3144 ;; version (which implicitly means gpl1+).
3145 ;; At least one file (src/maxima.asd) says "version 2."
3146 ;; GPLv2 only is therefore the smallest subset.
3147 (license license:gpl2)))
3149 (define-public wxmaxima
3157 (url "https://github.com/wxMaxima-developers/wxmaxima.git")
3158 (commit (string-append "Version-" version))))
3159 (file-name (git-file-name name version))
3161 (base32 "09ciip0wkahps5jdsqqr72bwjrd15bacw38zp23v3hm71xfk8hky"))))
3162 (build-system cmake-build-system)
3164 `(("gettext" ,gettext-minimal)
3165 ("xorg-server" ,xorg-server-for-tests)))
3166 ;; TODO: Add libomp for multithreading support.
3167 ;; As of right now, enabling libomp causes the imageCells.wxm test to fail.
3169 `(("wxwidgets" ,wxwidgets)
3172 ("adwaita-icon-theme" ,adwaita-icon-theme)
3174 ("shared-mime-info" ,shared-mime-info)))
3176 `(#:test-target "test"
3178 (modify-phases %standard-phases
3179 (add-before 'check 'pre-check
3181 ;; Tests require a running X server.
3182 (system "Xvfb :1 &")
3183 (setenv "DISPLAY" ":1")
3184 (setenv "HOME" (getcwd))
3186 (add-after 'install 'wrap-program
3187 (lambda* (#:key inputs outputs #:allow-other-keys)
3188 (wrap-program (string-append (assoc-ref outputs "out")
3191 (,(string-append (assoc-ref inputs "maxima")
3193 ;; For GtkFileChooserDialog.
3194 `("GSETTINGS_SCHEMA_DIR" =
3195 (,(string-append (assoc-ref inputs "gtk+")
3196 "/share/glib-2.0/schemas")))
3197 `("XDG_DATA_DIRS" ":" prefix
3198 (;; Needed by gdk-pixbuf to know supported icon formats.
3200 (assoc-ref inputs "shared-mime-info") "/share")
3201 ;; The default icon theme of GTK+.
3203 (assoc-ref inputs "adwaita-icon-theme") "/share"))))
3205 (home-page "https://wxmaxima-developers.github.io/wxmaxima/")
3206 (synopsis "Graphical user interface for the Maxima computer algebra system")
3208 "wxMaxima is a graphical user interface for the Maxima computer algebra
3209 system. It eases the use of Maxima by making most of its commands available
3210 through a menu system and by providing input dialogs for commands that require
3211 more than one argument. It also implements its own display engine that
3212 outputs mathematical symbols directly instead of depicting them with ASCII
3215 wxMaxima also features 2D and 3D inline plots, simple animations, mixing of
3216 text and mathematical calculations to create documents, exporting of input and
3217 output to TeX, and a browser for Maxima's manual including command index and
3218 full text searching.")
3219 (license license:gpl2+)))
3221 (define-public armadillo
3227 (uri (string-append "mirror://sourceforge/arma/armadillo-"
3231 "1ka1vd9fcmvp12qkcm4888dkfqwnalvv00x04wy29f3nx3qwczby"))))
3232 (build-system cmake-build-system)
3233 (arguments `(#:tests? #f)) ; no test target
3235 `(("openblas" ,openblas)
3237 ("arpack" ,arpack-ng)))
3238 (home-page "http://arma.sourceforge.net/")
3239 (synopsis "C++ linear algebra library")
3241 "Armadillo is a C++ linear algebra library, aiming towards a good balance
3242 between speed and ease of use. It is useful for algorithm development
3243 directly in C++, or quick conversion of research code into production
3244 environments. It can be used for machine learning, pattern recognition,
3245 signal processing, bioinformatics, statistics, econometrics, etc. The library
3246 provides efficient classes for vectors, matrices and cubes, as well as 150+
3247 associated functions (e.g., contiguous and non-contiguous submatrix views).")
3248 (license license:asl2.0)))
3250 (define-public muparser
3251 ;; When switching download sites, muparser re-issued a 2.2.5 release with a
3252 ;; different hash. In order to make `guix package --upgrade` work correctly,
3253 ;; we set a Guix packaging revision.
3254 ;; When the next version of muparser is released, we can remove
3255 ;; UPSTREAM-VERSION and REVISION and use the plain VERSION.
3256 (let ((upstream-version "2.2.5")
3260 (version (string-append upstream-version "-" revision))
3265 (url "https://github.com/beltoforion/muparser.git")
3266 (commit (string-append "v" upstream-version))))
3267 (file-name (git-file-name name version))
3269 (base32 "0f0g4995xngf1pp3zr4p6ai2f8v6f8bxwa0k8ayjjiv1l8h44m24"))))
3270 (build-system gnu-build-system)
3272 `(#:configure-flags '("--enable-samples=no")
3273 #:tests? #f)) ;no "check" target
3274 (home-page "http://muparser.beltoforion.de/")
3275 (synopsis "Fast parser library for mathematical expressions")
3277 "muParser is an extensible high performance math parser library. It is
3278 based on transforming an expression into a bytecode and precalculating constant
3280 (license license:expat))))
3282 (define-public openblas
3289 (uri (string-append "mirror://sourceforge/openblas/v" version "/OpenBLAS%20"
3290 version "%20version.tar.gz"))
3291 (file-name (string-append name "-" version ".tar.gz"))
3294 "0jbdjsi0qsxahdcm42agnn1y7xpmg0hrhwjsxg0zbhs9wwy3p568"))))
3295 (build-system gnu-build-system)
3297 `(#:test-target "test"
3298 ;; DYNAMIC_ARCH is only supported on x86. When it is disabled and no
3299 ;; TARGET is specified, OpenBLAS will tune itself to the build host, so
3300 ;; we need to disable substitutions.
3302 ,(let ((system (or (%current-target-system) (%current-system))))
3303 (or (string-prefix? "x86_64" system)
3304 (string-prefix? "i686" system)
3305 (string-prefix? "mips" system)
3306 (string-prefix? "aarch64" system)))
3308 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
3310 "MAKE_NB_JOBS=0" ;use jobserver for submakes
3312 ;; This is the maximum number of threads OpenBLAS will ever use (that
3313 ;; is, if $OPENBLAS_NUM_THREADS is greater than that, then NUM_THREADS
3314 ;; is used.) If we don't set it, the makefile sets it to the number
3315 ;; of cores of the build machine, which is obviously wrong.
3318 ;; Build the library for all supported CPUs. This allows
3319 ;; switching CPU targets at runtime with the environment variable
3320 ;; OPENBLAS_CORETYPE=<type>, where "type" is a supported CPU type.
3321 ;; Unfortunately, this is not supported on non-x86 architectures,
3322 ;; where it leads to failed builds.
3323 ,@(let ((system (or (%current-target-system) (%current-system))))
3325 ((or (string-prefix? "x86_64" system)
3326 (string-prefix? "i686" system))
3327 '("DYNAMIC_ARCH=1"))
3328 ;; On MIPS we force the "SICORTEX" TARGET, as for the other
3329 ;; two available MIPS targets special extended instructions
3330 ;; for Loongson cores are used.
3331 ((string-prefix? "mips" system)
3332 '("TARGET=SICORTEX"))
3333 ;; On aarch64 force the generic 'armv8-a' target
3334 ((string-prefix? "aarch64" system)
3337 ;; no configure script
3339 (modify-phases %standard-phases
3341 (add-before 'build 'set-extralib
3342 (lambda* (#:key inputs #:allow-other-keys)
3343 ;; Get libgfortran found when building in utest.
3345 (string-append "-L" (assoc-ref inputs "fortran-lib")
3349 `(("fortran-lib" ,gfortran "lib")))
3352 ("fortran" ,gfortran)
3354 (home-page "https://www.openblas.net/")
3355 (synopsis "Optimized BLAS library based on GotoBLAS")
3357 "OpenBLAS is a BLAS library forked from the GotoBLAS2-1.13 BSD version.")
3358 (license license:bsd-3)))
3360 (define-public openblas-ilp64
3361 (package/inherit openblas
3362 (name "openblas-ilp64")
3363 (supported-systems '("x86_64-linux" "aarch64-linux" "mips64el-linux"))
3365 (substitute-keyword-arguments (package-arguments openblas)
3366 ((#:make-flags flags '())
3367 `(append (list "INTERFACE64=1" "LIBNAMESUFFIX=ilp64")
3369 (synopsis "Optimized BLAS library based on GotoBLAS (ILP64 version)")
3370 (license license:bsd-3)))
3372 (define* (make-blis implementation #:optional substitutable?)
3373 "Return a BLIS package with the given IMPLEMENTATION (see config/ in the
3374 source tree for a list of implementations.)
3376 SUBSTITUTABLE? determines whether the package is made available as a
3379 Currently the specialization must be selected at configure-time, but work is
3380 underway to allow BLIS to select the right optimized kernels at run time:
3381 <https://github.com/flame/blis/issues/129>."
3383 (name (if (string=? implementation "reference")
3385 (string-append "blis-" implementation)))
3387 (home-page "https://github.com/flame/blis")
3390 (uri (git-reference (url home-page) (commit version)))
3393 "1wr79a50nm4abhw8w3sn96nmwp5mrzifcigk7khw9qcgyyyqayfh"))
3394 (file-name (git-file-name "blis" version))))
3395 (build-system gnu-build-system)
3397 `(#:test-target "test"
3399 #:substitutable? ,substitutable?
3401 #:phases (modify-phases %standard-phases
3403 (lambda* (#:key outputs #:allow-other-keys)
3404 ;; This is a home-made 'configure' script.
3405 (let ((out (assoc-ref outputs "out")))
3406 (invoke "./configure" "-p" out
3410 "--enable-threading=openmp"
3413 (add-before 'check 'show-test-output
3415 ;; By default "make check" is silent. Make it verbose.
3416 (system "tail -F output.testsuite &")
3418 (synopsis "High-performance basic linear algebra (BLAS) routines")
3420 "BLIS is a portable software framework for instantiating high-performance
3421 BLAS-like dense linear algebra libraries. The framework was designed to
3422 isolate essential kernels of computation that, when optimized, immediately
3423 enable optimized implementations of most of its commonly used and
3424 computationally intensive operations. While BLIS exports a new BLAS-like API,
3425 it also includes a BLAS compatibility layer which gives application developers
3426 access to BLIS implementations via traditional BLAS routine calls.")
3427 (license license:bsd-3)))
3430 ;; This is the "reference" implementation, which is the non-optimized but
3431 ;; portable variant (no assembly).
3432 (make-blis "reference" #t))
3434 (define ignorance blis)
3436 (define-syntax-rule (blis/x86_64 processor)
3437 "Expand to a package specialized for PROCESSOR."
3439 (inherit (make-blis processor))
3440 (supported-systems '("x86_64-linux"))))
3442 (define-public blis-sandybridge
3443 ;; BLIS specialized for Sandy Bridge processors (launched 2011):
3444 ;; <http://ark.intel.com/products/codename/29900/Sandy-Bridge>.
3445 (blis/x86_64 "sandybridge"))
3447 (define-public blis-haswell
3448 ;; BLIS specialized for Haswell processors (launched 2013):
3449 ;; <http://ark.intel.com/products/codename/42174/Haswell>.
3450 (blis/x86_64 "haswell"))
3452 (define-public blis-knl
3453 ;; BLIS specialized for Knights Landing processor (launched 2016):
3454 ;; <http://ark.intel.com/products/series/92650/Intel-Xeon-Phi-x200-Product-Family>.
3455 (blis/x86_64 "knl"))
3458 (define-public openlibm
3466 (url "https://github.com/JuliaLang/openlibm.git")
3467 (commit (string-append "v" version))))
3468 (file-name (git-file-name name version))
3470 (base32 "08wfchmmr5200fvmn1kwq9byc1fhsq46hn0y5k8scdl74771c7gh"))))
3471 (build-system gnu-build-system)
3474 (list (string-append "prefix=" (assoc-ref %outputs "out")))
3476 ;; no configure script
3477 (modify-phases %standard-phases (delete 'configure))
3478 #:tests? #f)) ;the tests are part of the default target
3479 (home-page "https://openlibm.org/")
3480 (synopsis "Portable C mathematical library (libm)")
3482 "OpenLibm is an effort to have a high quality, portable, standalone C
3483 mathematical library (libm). It can be used standalone in applications and
3484 programming language implementations. The project was born out of a need to
3485 have a good libm for the Julia programming language that worked consistently
3486 across compilers and operating systems, and in 32-bit and 64-bit
3488 ;; Each architecture has its own make target, and there is none for mips.
3489 (supported-systems (delete "mips64el-linux" %supported-systems))
3490 ;; See LICENSE.md for details.
3491 (license (list license:expat
3494 license:public-domain
3495 license:lgpl2.1+))))
3497 (define-public openspecfun
3499 (name "openspecfun")
3505 (url "https://github.com/JuliaLang/openspecfun.git")
3506 (commit (string-append "v" version))))
3507 (file-name (git-file-name name version))
3509 (base32 "0pfw6l3ch7isz403llx7inxlvavqh01jh1hb9dpidi86sjjx9kfh"))))
3510 (build-system gnu-build-system)
3512 '(#:tests? #f ; no "check" target
3514 (list (string-append "prefix=" (assoc-ref %outputs "out")))
3516 (modify-phases %standard-phases
3517 (delete 'configure)))) ; no configure script
3519 `(("fortran" ,gfortran)))
3520 (home-page "https://github.com/JuliaLang/openspecfun")
3521 (synopsis "Collection of special mathematical functions")
3523 "Openspecfun provides AMOS and Faddeeva. AMOS (from Netlib) is a
3524 portable package for Bessel Functions of a Complex Argument and Nonnegative
3525 Order; it contains subroutines for computing Bessel functions and Airy
3526 functions. Faddeeva allows computing the various error functions of arbitrary
3527 complex arguments (Faddeeva function, error function, complementary error
3528 function, scaled complementary error function, imaginary error function, and
3529 Dawson function); given these, one can also easily compute Voigt functions,
3530 Fresnel integrals, and similar related functions as well.")
3531 ;; Faddeeva is released under the Expat license; AMOS is included as
3532 ;; public domain software.
3533 (license (list license:expat license:public-domain))))
3535 (define-public suitesparse
3537 (name "suitesparse")
3543 (url "https://github.com/DrTimothyAldenDavis/SuiteSparse.git")
3544 (commit (string-append "v" version))))
3545 (file-name (git-file-name name version))
3548 "174p3l78kv9gaa0i5hflyai2ydwnjzh34k9938sl4aa3li0543s8"))
3549 (patches (search-patches "suitesparse-mongoose-cmake.patch"))
3550 (modules '((guix build utils)))
3552 ;; Remove bundled metis source
3554 (delete-file-recursively "metis-5.1.0")
3556 (build-system gnu-build-system)
3558 '(#:tests? #f ;no "check" target
3563 "MY_METIS_LIB=-lmetis"
3564 ;; Flags for cmake (required to build GraphBLAS and Mongoose)
3565 (string-append "CMAKE_OPTIONS=-DCMAKE_INSTALL_PREFIX="
3566 (assoc-ref %outputs "out")
3567 " -DCMAKE_VERBOSE_MAKEFILE=ON"
3568 " -DCMAKE_C_FLAGS_RELEASE=\"$(CFLAGS) $(CPPFLAGS)\""
3569 " -DCMAKE_CXX_FLAGS_RELEASE=\"$(CXXFLAGS) $(CPPFLAGS)\""
3570 " -DCMAKE_SKIP_RPATH=TRUE"
3571 " -DCMAKE_BUILD_TYPE=Release")
3572 (string-append "INSTALL_LIB="
3573 (assoc-ref %outputs "out") "/lib")
3574 (string-append "INSTALL_INCLUDE="
3575 (assoc-ref %outputs "out") "/include")
3578 (modify-phases %standard-phases
3579 (delete 'configure)))) ;no configure script
3585 `(("cmake" ,cmake-minimal)
3587 (home-page "http://faculty.cse.tamu.edu/davis/suitesparse.html")
3588 (synopsis "Suite of sparse matrix software")
3590 "SuiteSparse is a suite of sparse matrix algorithms, including: UMFPACK,
3591 multifrontal LU factorization; CHOLMOD, supernodal Cholesky; SPQR,
3592 multifrontal QR; KLU and BTF, sparse LU factorization, well-suited for circuit
3593 simulation; ordering methods (AMD, CAMD, COLAMD, and CCOLAMD); CSparse and
3594 CXSparse, a concise sparse Cholesky factorization package; and many other
3597 ;; AMD, CAMD, BTF, COLAMD, CCOLAMD, CSparse, CXSparse, KLU, LDL
3599 ;; GPUQREngine, RBio, SuiteSparse_GPURuntime, SuiteSparseQR, UMFPACK
3600 (license (list license:gpl2+ license:lgpl2.1+))))
3602 (define-public atlas
3608 (uri (string-append "mirror://sourceforge/math-atlas/Stable/"
3609 version "/atlas" version ".tar.bz2"))
3612 "1dyjlq3fiparvm8ypwk6rsmjzmnwk81l88gkishphpvc79ryp216"))))
3613 (build-system gnu-build-system)
3614 (home-page "http://math-atlas.sourceforge.net/")
3615 (inputs `(("gfortran" ,gfortran)
3616 ("lapack-tar" ,(package-source lapack))))
3617 (outputs '("out" "doc"))
3618 ;; For the moment we drop support for MIPS at it fails to compile. See
3619 ;; https://lists.gnu.org/archive/html/guix-devel/2014-11/msg00516.html
3620 (supported-systems (delete "mips64el-linux" %supported-systems))
3622 `(#:parallel-build? #f
3623 #:parallel-tests? #f
3625 ;; ATLAS tunes itself for the machine it is built on, as explained at
3626 ;; <http://lists.gnu.org/archive/html/guix-devel/2014-10/msg00305.html>.
3627 ;; For this reason, we want users to build it locally instead of using
3631 #:modules ((srfi srfi-26)
3632 (guix build gnu-build-system)
3635 `(;; Generate position independent code suitable for dynamic libraries
3636 ;; and use WALL timer to get more accurate timing.
3637 "-Fa" "alg" "-fPIC" "-D" "c" "-DWALL"
3640 ,,(if (string-match "64" (%current-system))
3643 ;; Disable parallel build as it gives errors: atlas_pthread.h is
3644 ;; needed to compile C files before it is generated.
3645 "-Ss" "pmake" "make -j 1"
3646 ;; Probe is failing for MIPS. We therefore define the system
3647 ;; architecture explicitly by setting (-A) MACHINETYPE = 49
3648 ;; 'MIPSR1xK' and (-V) ISA = 1 'none'.
3649 ,,@(if (string-prefix? "mips" (%current-system))
3650 (list "-A" "49" "-V" "1")
3652 ;; Generate shared libraries.
3654 ;; Build a full LAPACK library.
3655 ,(string-append "--with-netlib-lapack-tarfile="
3656 (assoc-ref %build-inputs "lapack-tar")))
3658 (modify-phases %standard-phases
3659 (add-after 'install 'install-doc
3660 (lambda* (#:key outputs inputs #:allow-other-keys)
3661 (let ((doc (string-append (assoc-ref outputs "doc")
3662 "/share/doc/atlas")))
3664 (for-each (cut install-file <> doc)
3665 (find-files "../ATLAS/doc" ".*"))
3667 (add-after 'check 'check-pt
3668 (lambda _ (invoke "make" "ptcheck")))
3669 ;; Fix files required to run configure.
3670 (add-before 'configure 'fix-/bin/sh
3672 ;; Use `sh', not `/bin/sh'.
3673 (substitute* (find-files "." "Makefile|configure|SpewMakeInc\\.c")
3677 ;; Fix /bin/sh in generated make files.
3678 (add-after 'configure 'fix-/bin/sh-in-generated-files
3680 (substitute* (find-files "." "^[Mm]ake\\.inc.*")
3684 ;; ATLAS configure program does not accepts the default flags
3685 ;; passed by the 'gnu-build-system'.
3687 (lambda* (#:key native-inputs inputs outputs
3688 (configure-flags '())
3689 #:allow-other-keys #:rest args)
3690 (let* ((prefix (assoc-ref outputs "out"))
3691 (bash (or (and=> (assoc-ref
3692 (or native-inputs inputs) "bash")
3693 (cut string-append <> "/bin/bash"))
3695 (flags `(,(string-append "--prefix=" prefix)
3697 (abs-srcdir (getcwd))
3698 (srcdir (string-append "../" (basename abs-srcdir))))
3699 (format #t "source directory: ~s (relative from build: ~s)~%"
3703 (format #t "build directory: ~s~%" (getcwd))
3704 (format #t "configure flags: ~s~%" flags)
3706 (string-append srcdir "/configure")
3708 (synopsis "Automatically Tuned Linear Algebra Software")
3710 "ATLAS is an automatically tuned linear algebra software library
3711 providing C and Fortran77 interfaces to a portably efficient BLAS
3712 implementation, as well as a few routines from LAPACK.
3714 Optimization occurs at build time. For this reason, the library is built on
3715 the machine where it is installed, without resorting to pre-built substitutes.
3717 Before building the library, CPU throttling should be disabled. This can be
3718 done in the BIOS, or, on GNU/Linux, with the following command:
3721 # cpupower --governor performance
3724 Failure to do so will result in a library with poor performance.")
3725 (license license:bsd-3)))
3734 (uri (string-append "https://github.com/g-truc/glm/releases/download/"
3735 version "/glm-" version ".zip"))
3737 (base32 "1l0pi1qi37mk6s0yrkrw07lspv4gcqnr9ryg3521hrl77ff37dwx"))
3738 (patches (search-patches "glm-restore-install-target.patch"))))
3739 (build-system cmake-build-system)
3741 `(("unzip" ,unzip)))
3742 (home-page "https://glm.g-truc.net/")
3743 (synopsis "OpenGL Mathematics library")
3744 (description "OpenGL Mathematics (GLM) is a header-only C++ mathematics
3745 library for graphics software based on the OpenGL Shading Language (GLSL)
3747 (license license:expat)))
3749 (define-public lpsolve
3756 (uri (string-append "mirror://sourceforge/lpsolve/lpsolve/" version
3757 "/lp_solve_" version "_source.tar.gz"))
3760 "12pj1idjz31r7c2mb5w03vy1cmvycvbkx9z29s40qdmkp1i7q6i0"))
3761 (modules '((guix build utils)))
3764 (substitute* (list "lp_solve/ccc" "lpsolve55/ccc")
3766 ;; Pretend to be on a 64 bit platform to obtain a common directory
3767 ;; name for the build results on all architectures; nothing else
3768 ;; seems to depend on it.
3769 (("^PLATFORM=.*$") "PLATFORM=ux64\n")
3771 ;; The check for 'isnan' as it is written fails with
3772 ;; "non-floating-point argument in call to function
3773 ;; ‘__builtin_isnan’", which leads to the 'NOISNAN' cpp macro
3774 ;; definition, which in turn leads to bad things. Fix the feature
3776 (("isnan\\(0\\)") "isnan(0.)"))
3778 (build-system gnu-build-system)
3780 `(#:tests? #f ; no check target
3782 (modify-phases %standard-phases
3783 (delete 'configure) ; no configure script
3786 (with-directory-excursion "lpsolve55"
3787 (invoke "bash" "ccc"))
3788 (with-directory-excursion "lp_solve"
3789 (invoke "bash" "ccc"))
3792 (lambda* (#:key outputs #:allow-other-keys)
3793 (let* ((out (assoc-ref outputs "out"))
3794 (bin (string-append out "/bin"))
3795 (lib (string-append out "/lib"))
3796 ;; This is where LibreOffice expects to find the header
3797 ;; files, and where they are installed by Debian.
3798 (include (string-append out "/include/lpsolve")))
3799 (install-file "lpsolve55/bin/ux64/liblpsolve55.a" lib)
3800 (install-file "lpsolve55/bin/ux64/liblpsolve55.so" lib)
3801 (install-file "lp_solve/bin/ux64/lp_solve" bin)
3803 ;; Install a subset of the header files as on Debian
3804 ;; (plus lp_bit.h, which matches the regular expression).
3805 (for-each (lambda (name)
3806 (install-file name include))
3807 (find-files "." "lp_[HMSa-z].*\\.h$"))
3808 (with-directory-excursion "shared"
3809 (for-each (lambda (name)
3810 (install-file name include))
3811 (find-files "." "\\.h$")))
3813 (home-page "http://lpsolve.sourceforge.net/")
3814 (synopsis "Mixed integer linear programming (MILP) solver")
3816 "lp_solve is a mixed integer linear programming solver based on the
3817 revised simplex and the branch-and-bound methods.")
3818 (license license:lgpl2.1+)))
3820 (define-public dealii
3827 (uri (string-append "https://github.com/dealii/dealii/releases/"
3828 "download/v" version "/dealii-" version ".tar.gz"))
3831 "0xhjv0gzswpjbc43xbrpwfc5848g508l01855nszx3g5gwzlhnzw"))
3832 (modules '((guix build utils)))
3834 ;; Remove bundled sources: UMFPACK, TBB, muParser, and boost
3836 (delete-file-recursively "bundled")
3838 (build-system cmake-build-system)
3846 ("arpack" ,arpack-ng)
3847 ("muparser" ,muparser)
3848 ("gfortran" ,gfortran)
3849 ("suitesparse" ,suitesparse))) ;for UMFPACK
3851 `(#:build-type "DebugRelease" ;only supports Release, Debug, or DebugRelease
3853 ;; Work around a bug in libsuitesparseconfig linking
3854 ;; see https://github.com/dealii/dealii/issues/4745
3855 '("-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON")))
3856 (home-page "https://www.dealii.org")
3857 (synopsis "Finite element library")
3859 "Deal.II is a C++ program library targeted at the computational solution
3860 of partial differential equations using adaptive finite elements. The main
3861 aim of deal.II is to enable rapid development of modern finite element codes,
3862 using among other aspects adaptive meshes and a wide array of tools often used
3863 in finite element programs.")
3864 (license license:lgpl2.1+)))
3866 (define-public dealii-openmpi
3867 (package (inherit dealii)
3868 (name "dealii-openmpi")
3871 ;;Supported only with MPI:
3872 ("hdf5" ,hdf5-parallel-openmpi) ;TODO: have petsc-openmpi propagate?
3873 ("p4est" ,p4est-openmpi)
3874 ("petsc" ,petsc-openmpi)
3875 ("slepc" ,slepc-openmpi)
3876 ("metis" ,metis) ;for MUMPS
3877 ("scalapack" ,scalapack) ;for MUMPS
3878 ("mumps" ,mumps-metis-openmpi) ;configure supports only metis orderings
3879 ("arpack" ,arpack-ng-openmpi)
3880 ,@(fold alist-delete (package-inputs dealii)
3881 '("p4est" "arpack"))))
3883 (substitute-keyword-arguments (package-arguments dealii)
3884 ((#:configure-flags cf)
3885 `(cons "-DDEAL_II_WITH_MPI:BOOL=ON"
3887 ((#:phases phases '%standard-phases)
3888 `(modify-phases ,phases
3889 (add-before 'check 'mpi-setup
3890 ,%openmpi-setup)))))
3891 (synopsis "Finite element library (with MPI support)")))
3893 (define-public flann
3902 "http://www.cs.ubc.ca/research/flann/uploads/FLANN/flann-"
3903 version "-src.zip"))
3906 "022w8hph7bli5zbpnk3z1qh1c2sl5hm8fw2ccim651ynn0hr7fyz"))
3907 (patches (search-patches "flann-cmake-3.11.patch"))))
3908 (build-system cmake-build-system)
3910 "octave")) ;46 MiB .mex file that pulls Octave
3912 `(("unzip" ,unzip)))
3915 ("octave" ,octave-cli)
3916 ("python" ,python-2) ; print syntax
3917 ;; ("python2-numpy" ,python2-numpy) ; only required for the tests
3920 `(;; The 'share/flann/octave' contains a .mex file, which is an ELF file
3921 ;; taken 46 MiB unstripped, and 6 MiB stripped.
3922 #:strip-directories '("lib" "lib64" "libexec"
3923 "bin" "sbin" "share/flann/octave")
3925 ;; Save 12 MiB by not installing .a files. Passing
3926 ;; '-DBUILD_STATIC_LIBS=OFF' has no effect.
3927 #:phases (modify-phases %standard-phases
3928 (add-before 'configure 'set-octave-directory
3929 (lambda* (#:key outputs #:allow-other-keys)
3930 ;; Install the .mex file in the "octave" output.
3931 (let ((out (assoc-ref outputs "octave")))
3932 (substitute* "src/matlab/CMakeLists.txt"
3933 (("share/flann/octave")
3934 (string-append out "/share/flann/octave")))
3936 (add-after 'install 'remove-static-libraries
3937 (lambda* (#:key outputs #:allow-other-keys)
3938 (let* ((out (assoc-ref outputs "out"))
3939 (lib (string-append out "/lib")))
3940 (for-each delete-file
3941 (find-files lib "\\.a$"))
3944 #:tests? #f)) ; The test data are downloaded from the Internet.
3945 (home-page "http://www.cs.ubc.ca/research/flann/")
3946 (synopsis "Library for approximate nearest neighbors computation")
3947 (description "FLANN is a library for performing fast approximate
3948 nearest neighbor searches in high dimensional spaces. It implements a
3949 collection of algorithms and a system for automatically choosing the best
3950 algorithm and optimum parameters depending on the dataset.
3952 FLANN is written in C++ and contains bindings for C, Octave and Python.")
3953 (license (license:non-copyleft "file://COPYING"
3954 "See COPYING in the distribution."))))
3956 (define-public wcalc
3963 (uri (string-append "mirror://sourceforge/w-calc/Wcalc/" version "/"
3964 "wcalc-" version ".tar.bz2"))
3967 "1vi8dl6rccqiq1apmpwawyg2ywx6a1ic1d3cvkf2hlwk1z11fb0f"))))
3968 (build-system gnu-build-system)
3971 ("readline" ,readline)))
3972 (home-page "http://w-calc.sourceforge.net/index.php")
3973 (synopsis "Flexible command-line scientific calculator")
3974 (description "Wcalc is a very capable calculator. It has standard functions
3975 (sin, asin, and sinh for example, in either radians or degrees), many
3976 pre-defined constants (pi, e, c, etc.), support for using variables, \"active\"
3977 variables, a command history, hex/octal/binary input and output, unit
3978 conversions, embedded comments, and an expandable expression entry field. It
3979 evaluates expressions using the standard order of operations.")
3980 (license license:gpl2+)))
3988 (uri (string-append "mirror://sourceforge/xaos/XaoS/" version
3989 "/xaos-" version ".tar.gz"))
3992 "15cd1cx1dyygw6g2nhjqq3bsfdj8sj8m4va9n75i0f3ryww3x7wq"))))
3993 (build-system gnu-build-system)
3994 (native-inputs `(("gettext" ,gettext-minimal)))
3995 (inputs `(("libx11" ,libx11)
4000 `(#:tests? #f ;no "check" target
4001 #:make-flags '("LOCALEDIR=$DATAROOTDIR/locale")))
4002 (synopsis "Real-time fractal zoomer")
4003 (description "GNU XaoS is a graphical program that generates fractal
4004 patterns and allows you to zoom in and out of them infinitely in a fluid,
4005 continuous manner. It also includes tutorials that help to explain how fractals
4006 are built. It can generate many different fractal types such as the Mandelbrot
4008 (home-page "https://www.gnu.org/software/xaos/")
4009 (license license:gpl2+)))
4011 (define-public hypre
4019 (url "https://github.com/LLNL/hypre.git")
4020 (commit (string-append "v" version))))
4021 (file-name (git-file-name name version))
4023 (base32 "1lvh4ybqkriyqfg2zmic6mrg1981qv1i9vry1fdgsabn81hb71g4"))
4024 (modules '((guix build utils)))
4027 ;; Remove use of __DATE__ and __TIME__ for reproducibility;
4028 ;; substitute the release date.
4029 (substitute* "src/utilities/HYPRE_utilities.h"
4030 (("Date Compiled: .*$")
4031 "Date Compiled: Oct 19 2018 15:23:00 +0000\"\n"))
4033 (build-system gnu-build-system)
4034 (outputs '("out" ; 6.1 MiB of headers and libraries
4035 "doc")) ; 4.8 MiB of documentation
4039 ("perl" ,perl) ; needed to run 'ppmquant' during tests
4040 ("texlive" ,(texlive-union (list texlive-xypic
4042 texlive-latex-hyperref
4044 ("ghostscript" ,ghostscript)))
4046 `(("blas" ,openblas)
4047 ("lapack" ,lapack)))
4049 `(#:modules ((srfi srfi-1)
4050 ,@%gnu-build-system-modules)
4051 #:configure-flags '("--enable-shared"
4059 (modify-phases %standard-phases
4060 (add-before 'build 'set-HOME
4062 ;; FIXME: texlive-union does not find the built
4063 ;; metafonts, so it tries to generate them in HOME.
4064 (setenv "HOME" "/tmp")
4066 (add-before 'configure 'chdir-src
4067 (lambda _ (chdir "src")))
4069 (lambda* (#:key build target configure-flags
4070 #:allow-other-keys #:rest args)
4071 (let* ((configure (assoc-ref %standard-phases 'configure)))
4074 (list #:configure-flags
4075 (cons (string-append
4076 "--host=" (or target build))
4077 configure-flags)))))))
4078 (add-after 'build 'build-docs
4080 (invoke "make" "-Cdocs" "pdf" "html")))
4083 (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/hypre/lib"))
4084 (setenv "PATH" (string-append "." ":" (getenv "PATH")))
4085 (invoke "make" "check" "CHECKRUN=")
4086 (for-each (lambda (filename)
4087 (let ((size (stat:size (stat filename))))
4088 (when (positive? size)
4089 (error (format #f "~a size ~d; error indication~%"
4091 (find-files "test" ".*\\.err$"))
4093 (add-after 'install 'install-docs
4094 (lambda* (#:key outputs #:allow-other-keys)
4095 ;; Custom install because docs/Makefile doesn't honor ${docdir}.
4096 (let* ((doc (assoc-ref outputs "doc"))
4097 (docdir (string-append doc "/share/doc/hypre-" ,version)))
4098 (with-directory-excursion "docs"
4099 (for-each (lambda (base)
4100 (install-file (string-append base ".pdf") docdir)
4101 (copy-recursively base docdir)) ; html docs
4102 '("HYPRE_usr_manual"
4103 "HYPRE_ref_manual")))
4105 (home-page "http://www.llnl.gov/casc/hypre/")
4106 (synopsis "Library of solvers and preconditioners for linear equations")
4108 "HYPRE is a software library of high performance preconditioners and
4109 solvers for the solution of large, sparse linear systems of equations. It
4110 features multigrid solvers for both structured and unstructured grid
4112 (license license:lgpl2.1)))
4114 (define-public hypre-openmpi
4115 (package (inherit hypre)
4116 (name "hypre-openmpi")
4119 ,@(package-inputs hypre)))
4121 (substitute-keyword-arguments (package-arguments hypre)
4122 ((#:configure-flags flags)
4124 ,@(delete "--without-MPI" ,flags)))
4126 `(modify-phases ,phases
4127 (add-before 'check 'mpi-setup
4128 ,%openmpi-setup)))))
4129 (synopsis "Parallel solvers and preconditioners for linear equations")
4131 "HYPRE is a software library of high performance preconditioners and
4132 solvers for the solution of large, sparse linear systems of equations on
4133 parallel computers. It features parallel multigrid solvers for both
4134 structured and unstructured grid problems.")))
4136 (define-public matio
4143 (uri (string-append "mirror://sourceforge/matio/matio/" version "/"
4144 "matio-" version ".tar.gz"))
4147 "0y2qymgxank8wdiwc68ap8bxdzrhvyw86i29yh3xgn4z1njfd9ir"))))
4148 (build-system gnu-build-system)
4152 (home-page "http://matio.sourceforge.net/")
4153 (synopsis "Library for reading and writing MAT files")
4154 (description "Matio is a library for reading and writing MAT files. It
4155 supports compressed MAT files, as well as newer (version 7.3) MAT files.")
4156 (license license:bsd-2)))
4163 (origin (method url-fetch)
4164 (uri (string-append "https://github.com/VcDevel/Vc/releases/"
4165 "download/" version "/Vc-" version ".tar.gz"))
4168 "17qili8bf8r78cng65yf4qmgna8kiqjqbgcqbric6v9j6nkhkrk8"))))
4169 (build-system cmake-build-system)
4172 '("-DBUILD_TESTING=ON"
4173 ;; By default, Vc will optimize for the CPU of the build machine.
4174 ;; Setting this to "none" makes it create portable binaries. See
4175 ;; "cmake/OptimizeForArchitecture.cmake".
4176 "-DTARGET_ARCHITECTURE=none")
4177 #:phases (modify-phases %standard-phases
4178 (add-after 'unpack 'copy-testdata
4179 (lambda* (#:key inputs native-inputs #:allow-other-keys)
4180 (let ((testdata (assoc-ref (or native-inputs inputs)
4182 (copy-recursively testdata "tests/testdata")
4185 `(("virtest" ,virtest)
4187 ;; This is a submodule in the git project, but not part of the
4188 ;; released sources. See the git branch for the commit to take.
4189 ("testdata" ,(let ((commit "9ada1f34d6a41f1b5553d6223f277eae72c039d3"))
4193 (url "https://github.com/VcDevel/vc-testdata")
4194 (commit "9ada1f34d6a41f1b5553d6223f277eae72c039d3")))
4195 (file-name (git-file-name "vc-testdata"
4196 (string-take commit 7)))
4199 "1hkhqib03qlcq412ym2dciynfxcdr2ygqhnplz4l1vissr1wnqn2")))))))
4200 (synopsis "SIMD vector classes for C++")
4201 (description "Vc provides portable, zero-overhead C++ types for explicitly
4202 data-parallel programming. It is a library designed to ease explicit
4203 vectorization of C++ code. Its types enable explicitly stating data-parallel
4204 operations on multiple values. The parallelism is therefore added via the type
4205 system. Vc has an intuitive API and provides portability between different
4206 compilers and compiler versions as well as portability between different vector
4207 instruction sets. Thus, an application written with Vc can be compiled for:
4210 @item SSE2 up to SSE4.2 or SSE4a
4213 @item NEON (in development)
4214 @item NVIDIA GPUs / CUDA (in development)
4216 (home-page "https://github.com/VcDevel/Vc")
4217 ;; "No support_???.cpp file exists for this architecture."
4218 (supported-systems '("x86_64-linux" "i686-linux"))
4219 (license license:bsd-3)))
4221 (define-public reducelcs
4222 ;; This is the last commit which is available upstream, no
4223 ;; release happened since 2010.
4224 (let ((commit "474f88deb968061abe8cf11c959e02319b8ae5c0")
4228 (version (string-append "1.0-" revision "." (string-take commit 7)))
4233 (url "https://github.com/gdv/Reduce-Expand-for-LCS")
4235 (file-name (string-append name "-" version "-checkout"))
4238 "1rllzcfwc042c336mhq262a8ha90x6afq30kvk60r7i4761j4yjm"))))
4239 (build-system gnu-build-system)
4241 `(("openlibm" ,openlibm)))
4243 `(#:tests? #f ; no tests
4245 (modify-phases %standard-phases
4246 (delete 'configure) ; No configure script exists.
4247 (replace 'install ; No install phase exists.
4248 (lambda* (#:key outputs #:allow-other-keys)
4249 (let* ((out (assoc-ref outputs "out"))
4250 (bin (string-append out "/bin")))
4251 (install-file "Approximation" bin)
4252 (install-file "CollectResults" bin)
4253 (install-file "GenerateInstances" bin)
4255 (synopsis "Approximate Longest Commons Subsequence computation tool")
4257 "@code{reduceLCS} is an implementation of the Reduce-Expand
4258 algorithm for LCS. It is a fast program to compute the approximate
4259 Longest Commons Subsequence of a set of strings.")
4260 (home-page "https://github.com/gdv/Reduce-Expand-for-LCS")
4261 (license license:gpl3+))))
4263 (define-public jacal
4270 "http://groups.csail.mit.edu/mac/ftpdir/scm/jacal-"
4273 "055zrn12a1dmy0dqkwrkq3fklbhg3yir6vn0lacp4mvbg8573a3q"))
4274 (patches (search-patches "jacal-fix-texinfo.patch"))))
4275 (build-system gnu-build-system)
4278 (modify-phases %standard-phases
4279 (add-before 'build 'pre-build
4280 ;; Don't use upstream's script - it really doesn't fit into
4281 ;; Guix's functional paradigm.
4282 (lambda* (#:key inputs outputs #:allow-other-keys)
4283 (substitute* "Makefile"
4284 (("^install: install-script") "install: "))))
4285 (add-after 'install 'post-install
4286 ;; Instead, we provide our own simplified script.
4287 (lambda* (#:key inputs outputs #:allow-other-keys)
4288 (let ((wrapper (string-append (assoc-ref outputs "out")
4290 (format (open wrapper (logior O_WRONLY O_CREAT))
4291 (string-append "#!~a\nexec ~a/bin/scm -ip1 "
4292 "-e '(slib:load \"~a/lib/jacal/math\") "
4295 (assoc-ref inputs "scm")
4296 (assoc-ref outputs "out"))
4297 (chmod wrapper #o555))))
4299 (lambda* (#:key outputs #:allow-other-keys)
4300 (invoke "./configure"
4301 (string-append "--prefix="
4302 (assoc-ref outputs "out"))))))))
4303 (inputs `(("scm" ,scm)))
4304 (native-inputs `(("unzip" ,unzip)
4305 ("texinfo" ,texinfo)))
4306 (synopsis "Symbolic mathematics system")
4307 (description "GNU JACAL is an interactive symbolic mathematics program based on
4308 Scheme. It manipulate and simplify a range of mathematical expressions such
4309 as equations, scalars, vectors, and matrices.")
4310 (home-page "https://www.gnu.org/software/jacal/")
4311 (license license:gpl3+)))
4317 (home-page "https://github.com/Z3Prover/z3")
4320 (uri (git-reference (url home-page)
4321 (commit (string-append "z3-" version))))
4322 (file-name (git-file-name name version))
4325 "0hprcdwhhyjigmhhk6514m71bnmvqci9r8gglrqilgx424r6ff7q"))))
4326 (build-system gnu-build-system)
4328 `(#:imported-modules ((guix build python-build-system)
4329 ,@%gnu-build-system-modules)
4330 #:modules (((guix build python-build-system) #:select (site-packages))
4331 (guix build gnu-build-system)
4334 (modify-phases %standard-phases
4335 (add-after 'unpack 'enable-bytecode-determinism
4337 (setenv "PYTHONHASHSEED" "0")
4339 (add-after 'unpack 'fix-compatability
4340 ;; Versions after 4.8.3 have immintrin.h IFDEFed for Windows only.
4342 (substitute* "src/util/mpz.cpp"
4343 (("#include <immintrin.h>") ""))
4345 (add-before 'configure 'bootstrap
4347 (invoke "python" "scripts/mk_make.py")))
4348 ;; work around gnu-build-system's setting --enable-fast-install
4349 ;; (z3's `configure' is a wrapper around the above python file,
4350 ;; which fails when passed --enable-fast-install)
4352 (lambda* (#:key inputs outputs #:allow-other-keys)
4353 (invoke "./configure"
4355 (string-append "--prefix=" (assoc-ref outputs "out"))
4356 (string-append "--pypkgdir=" (site-packages inputs outputs)))))
4357 (add-after 'configure 'change-directory
4361 (add-before 'check 'make-test-z3
4363 ;; Build the test suite executable.
4364 (invoke "make" "test-z3" "-j"
4365 (number->string (parallel-job-count)))))
4368 ;; Run all the tests that don't require arguments.
4369 (invoke "./test-z3" "/a"))))))
4372 ("python" ,python-wrapper)))
4373 (synopsis "Theorem prover")
4374 (description "Z3 is a theorem prover and @dfn{satisfiability modulo
4375 theories} (SMT) solver. It provides a C/C++ API, as well as Python bindings.")
4376 (license license:expat)))
4381 (version "2018.11.001")
4384 (uri (string-append "http://elpa.mpcdf.mpg.de/html/Releases/"
4385 version "/elpa-" version ".tar.gz"))
4388 "05hv3v5i6xmziaizw350ff72y1c3k662r85fm3xfdrkclj5zw9yc"))))
4389 (build-system gnu-build-system)
4391 `(("fortran" ,gfortran)
4392 ("perl" ,perl))) ;for configure and deps
4394 `(("blas" ,openblas)))
4399 ;; ELPA unfortunately does not support runtime dispatch, so we can
4400 ;; only enable the "generic" kernels. See the "Cross compilation"
4401 ;; section of INSTALL.md.
4403 "--disable-sse" "--disable-sse-assembly" ;Require SSE3
4404 "--disable-avx" "--disable-avx2" "--disable-avx512"
4405 ,(string-append "CFLAGS=-O3 "
4406 "-funsafe-loop-optimizations -funsafe-math-optimizations "
4407 "-ftree-vect-loop-version -ftree-vectorize "
4408 ,(let ((system (or (%current-target-system)
4409 (%current-system))))
4411 ((or (string-prefix? "x86_64" system)
4412 (string-prefix? "i686" system))
4415 #:parallel-tests? #f ;tests are multi-threaded, via BLAS
4417 (modify-phases %standard-phases
4418 (add-before 'configure 'patch-header-generation
4420 (substitute* "configure"
4421 (("^ *make.*top_srcdir=\"\\$srcdir\"" &)
4422 (string-append & " CPP=\"$CPP\"")))
4424 (add-before 'check 'setup-tests
4426 ;; Decrease test time and RAM use by computing fewer eigenvalues.
4427 ;; The flags are (MATRIX-SIZE, EIGENVALUES, BLOCK-SIZE), where
4428 ;; the default is (500, 250, 16) for C tests and (5000, 150, 16)
4429 ;; for Fortran. This also causes several tests to pass that
4430 ;; otherwise would otherwise fail with matrix size 5000; possibly
4431 ;; due to floating point tolerances that are too tight.
4432 (setenv "TEST_FLAGS" "1500 50 16") ;from elpa.spec
4433 (setenv "OMP_NUM_THREADS" (number->string (parallel-job-count)))
4434 (substitute* "Makefile"
4435 ;; Test scripts are generated, patch the shebang
4436 (("#!/bin/bash") (string-append "#!" (which "sh"))))
4438 (home-page "http://elpa.mpcdf.mpg.de")
4439 (synopsis "Eigenvalue solvers for symmetric matrices")
4441 "The ELPA library provides efficient and scalable direct eigensolvers for
4442 symmetric matrices.")
4443 (license license:lgpl3)))
4445 (define-public elpa-openmpi
4446 (package (inherit elpa)
4447 (name "elpa-openmpi")
4450 ("scalapack" ,scalapack)
4451 ,@(package-inputs elpa)))
4453 (substitute-keyword-arguments (package-arguments elpa)
4454 ((#:configure-flags cf '())
4455 `(cons "--with-mpi=yes" (delete "--with-mpi=no" ,cf)))
4456 ((#:phases phases '%standard-phases)
4457 `(modify-phases ,phases
4458 (add-before 'check 'mpi-setup
4460 ;; Tests use 2 mpi tasks by default, use our remaining build
4461 ;; cores as OpenMP threads.
4462 (setenv "OMP_NUM_THREADS" (number->string
4463 (max (quotient (parallel-job-count) 2)
4465 (,%openmpi-setup)))))))
4466 (synopsis "Eigenvalue solvers for symmetric matrices (with MPI support)")))
4468 (define-public elemental
4475 (url "https://github.com/elemental/Elemental.git")
4476 (commit (string-append "v" version))))
4477 (file-name (git-file-name name version))
4480 "1687xpjjzig27y2pnqv7hv09smpijyfdpz7qjgmcxf4shfajlfkc"))))
4481 (build-system cmake-build-system)
4482 (home-page "https://github.com/elemental/Elemental")
4484 `(("gfortran" ,gfortran)))
4486 `(("blas" ,openblas)
4487 ("gfortran:lib" ,gfortran "lib")
4496 `(#:build-type "Release" ;default RelWithDebInfo not supported
4497 #:configure-flags `("-DEL_DISABLE_PARMETIS:BOOL=YES"
4498 "-DEL_AVOID_COMPLEX_MPI:BOOL=NO"
4499 "-DEL_CACHE_WARNINGS:BOOL=YES"
4500 "-DEL_TESTS:BOOL=YES"
4501 "-DCMAKE_INSTALL_LIBDIR=lib"
4502 "-DGFORTRAN_LIB=gfortran")
4503 #:phases (modify-phases %standard-phases
4504 (add-before 'check 'mpi-setup
4506 (add-before 'check 'setup-tests
4508 ;; Parallelism is done at the MPI layer.
4509 (setenv "OMP_NUM_THREADS" "1")
4511 (add-after 'install 'remove-tests
4512 (lambda* (#:key outputs #:allow-other-keys)
4513 ;; Tests are installed, with no easy configuration
4514 ;; switch to prevent this, so delete them.
4515 (delete-file-recursively
4516 (string-append (assoc-ref outputs "out") "/bin"))
4518 (synopsis "Dense and sparse-direct linear algebra and optimization")
4519 (description "Elemental is a modern C++ library for distributed-memory
4520 dense and sparse-direct linear algebra, conic optimization, and lattice
4522 (license license:bsd-2)))
4524 (define-public mcrl2
4527 (version "201908.0")
4531 "https://www.mcrl2.org/download/release/mcrl2-"
4535 "1i4xgl2d5fgiz1mwi50cyfkrrcpm8nxfayfjgmhq7chs58wlhfsz"))))
4540 ("qtbase" ,qtbase)))
4541 (build-system cmake-build-system)
4542 (synopsis "Toolset for the mCRL2 formal specification language")
4544 "@dfn{mCRL2} (micro Common Representation Language 2) is a formal
4545 specification language for describing concurrent discrete event systems. Its
4546 toolset supports analysis and automatic verification, linearisation, simulation,
4547 state-space exploration and generation, and tools to optimise and analyse
4548 specifications. Also, state spaces can be manipulated, visualised and
4550 (home-page "https://mcrl2.org")
4551 (license license:boost1.0)))
4553 (define-public mcrl2-minimal
4556 (name "mcrl2-minimal")
4558 `(("boost" ,boost)))
4560 '(#:configure-flags '("-DMCRL2_ENABLE_GUI_TOOLS=OFF")))))
4562 (define-public tcalc
4569 (uri (string-append "https://sites.google.com/site/mohammedisam2000/tcalc/tcalc-"
4573 "0jq806m4dqfia85nppfm75mml9w57g0cgv4cdw9bp3zymda83s0m"))))
4574 (build-system gnu-build-system)
4575 (synopsis "The terminal calculator")
4577 "The terminal calculator is a small program to help users of the GNU/Linux
4578 terminal do calculations simply and quickly. The formula to be calculated can
4579 be fed to @command{tcalc} through the command line.")
4580 (home-page "https://sites.google.com/site/mohammedisam2000/tcalc")
4581 (license license:gpl3+)))
4583 (define-public sundials
4590 (uri (string-append "https://computation.llnl.gov/projects/sundials/download/"
4591 "sundials-" version ".tar.gz"))
4594 "090s8ymhd0g1s1d44fa73r5yi32hb4biwahhbfi327zd64yn8kd2"))))
4595 (build-system cmake-build-system)
4597 `(("python" ,python-2))) ;for tests; syntax incompatible with python 3
4599 `(("fortran" ,gfortran) ;for fcmix
4601 ("suitesparse" ,suitesparse))) ;TODO: Add hypre
4603 `(#:configure-flags `("-DEXAMPLES_ENABLE_C:BOOL=ON"
4604 "-DEXAMPLES_ENABLE_CXX:BOOL=ON"
4605 "-DEXAMPLES_ENABLE_F77:BOOL=ON"
4606 "-DEXAMPLES_ENABLE_F90:BOOL=ON"
4607 "-DEXAMPLES_INSTALL:BOOL=OFF"
4609 "-DFCMIX_ENABLE:BOOL=ON"
4611 "-DKLU_ENABLE:BOOL=ON"
4612 ,(string-append "-DKLU_INCLUDE_DIR="
4613 (assoc-ref %build-inputs "suitesparse")
4615 ,(string-append "-DKLU_LIBRARY_DIR="
4616 (assoc-ref %build-inputs "suitesparse")
4618 (home-page "https://computation.llnl.gov/projects/sundials")
4619 (synopsis "Suite of nonlinear and differential/algebraic equation solvers")
4620 (description "SUNDIALS is a family of software packages implemented with
4621 the goal of providing robust time integrators and nonlinear solvers that can
4622 easily be incorporated into existing simulation codes.")
4623 (license license:bsd-3)))
4625 (define-public sundials-openmpi
4626 (package (inherit sundials)
4627 (name "sundials-openmpi")
4630 ("petsc" ,petsc-openmpi) ;support in SUNDIALS requires MPI
4631 ,@(package-inputs sundials)))
4633 (substitute-keyword-arguments (package-arguments sundials)
4634 ((#:configure-flags flags '())
4635 `(cons* "-DMPI_ENABLE:BOOL=ON"
4636 "-DPETSC_ENABLE:BOOL=ON"
4637 (string-append "-DPETSC_INCLUDE_DIR="
4638 (assoc-ref %build-inputs "petsc")
4640 (string-append "-DPETSC_LIBRARY_DIR="
4641 (assoc-ref %build-inputs "petsc")
4644 ((#:phases phases '%standard-phases)
4645 `(modify-phases ,phases
4646 (add-before 'check 'mpi-setup
4647 ,%openmpi-setup)))))
4648 (synopsis "SUNDIALS with OpenMPI support")))
4650 (define-public combinatorial-blas
4652 (name "combinatorial-blas")
4657 (uri (string-append "http://eecs.berkeley.edu/~aydin/CombBLAS_FILES/"
4659 (match (string-split version #\.)
4660 ((major minor patch)
4661 (string-append major minor "_" patch))) ;e.g. "16_2"
4665 "1a9wbgdqyy1whhfc0yl0yqkax3amnqa6iihhq48d063gc0jwfd9a"))
4666 (patches (search-patches "combinatorial-blas-awpm.patch"
4667 "combinatorial-blas-io-fix.patch"))))
4668 (build-system cmake-build-system)
4671 ("test-data" ,(origin
4673 (uri (string-append "https://people.eecs.berkeley.edu/~aydin/"
4674 "CombBLAS_FILES/testdata_combblas1.6.1.tgz"))
4677 "01y2781cy3fww7znmidrp85mf8zx0c905w5vzvk1mgrmhhynim87"))))))
4679 `(#:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES"
4680 "-DCMAKE_CXX_FLAGS=-DUSE_FUNNEL")
4681 #:parallel-tests? #f ;tests use 'mpiexec -n4'
4683 (modify-phases %standard-phases
4684 (add-before 'check 'mpi-setup
4686 (add-before 'check 'test-setup
4687 (lambda* (#:key inputs #:allow-other-keys)
4688 (setenv "OMP_NUM_THREADS" "2")
4689 (invoke "tar" "xf" (assoc-ref inputs "test-data")))))))
4690 (home-page "https://people.eecs.berkeley.edu/~aydin/CombBLAS/html/")
4691 (synopsis "Linear algebra primitives for graph analytics")
4692 (description "The Combinatorial BLAS (CombBLAS) is an extensible
4693 distributed-memory parallel graph library offering a small but powerful set of
4694 linear algebra primitives specifically targeting graph analytics.")
4696 license:gpl2+ ;include/psort/(funnel|sort)*.h
4697 license:x11 ;usort and psort
4698 license:bsd-3)))) ;CombBLAS and MersenneTwister.h
4700 (define-public dune-common
4702 (name "dune-common")
4707 (uri (string-append "https://dune-project.org/download/"
4708 version "/dune-common-" version ".tar.gz"))
4711 "140q1zh44cr5yrjwg4b5ga803rkqv55vk30l2cqm29aklj1wb0rw"))))
4712 (build-system cmake-build-system)
4715 (modify-phases %standard-phases
4716 (add-after 'build 'build-tests
4717 (lambda* (#:key make-flags #:allow-other-keys)
4718 (apply invoke "make" "build_tests" make-flags))))))
4722 ("openblas" ,openblas)
4724 ("superlu" ,superlu)))
4726 `(("gfortran" ,gfortran)
4727 ("pkg-config" ,pkg-config)))
4728 (home-page "https://dune-project.org/")
4729 (synopsis "Distributed and Unified Numerics Environment")
4730 (description "DUNE, the Distributed and Unified Numerics Environment is a
4731 modular toolbox for solving @dfn{partial differential equations} (PDEs) with
4732 grid-based methods. It supports the easy implementation of methods like
4733 @dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite
4734 Differences} (FD).")
4735 ;; GPL version 2 with "runtime exception" to make it behave like LGPLv2.
4736 (license license:gpl2)))
4738 (define-public dune-geometry
4740 (name "dune-geometry")
4745 (uri (string-append "https://dune-project.org/download/"
4746 version "/dune-geometry-" version ".tar.gz"))
4749 "1cicvlwbyyw76npicnblxckyvhbfn3ip8isydiv3hlrlz8zcg5nr"))))
4750 (build-system cmake-build-system)
4753 (modify-phases %standard-phases
4754 (add-after 'build 'build-tests
4755 (lambda* (#:key make-flags #:allow-other-keys)
4756 (apply invoke "make" "build_tests" make-flags))))))
4758 `(("dune-common" ,dune-common)
4760 ("openblas" ,openblas)
4762 ("python" ,python)))
4764 `(("gfortran" ,gfortran)
4765 ("pkg-config" ,pkg-config)))
4766 (home-page "https://dune-project.org/")
4767 (synopsis "Distributed and Unified Numerics Environment")
4768 (description "DUNE, the Distributed and Unified Numerics Environment is a
4769 modular toolbox for solving @dfn{partial differential equations} (PDEs) with
4770 grid-based methods. It supports the easy implementation of methods like
4771 @dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite
4774 This package contains the basic DUNE geometry classes.")
4775 ;; GPL version 2 with "runtime exception"
4776 (license license:gpl2)))
4778 (define-public dune-uggrid
4780 (name "dune-uggrid")
4786 (url "https://gitlab.dune-project.org/staging/dune-uggrid.git")
4787 (commit (string-append "v" version))))
4788 (file-name (git-file-name name version))
4791 "192miqgmfj6jwk969gydzpbv9ki7jg5nky3ydnrwa2nq29b5xkh0"))))
4792 (build-system cmake-build-system)
4795 (modify-phases %standard-phases
4796 (add-after 'build 'build-tests
4797 (lambda* (#:key make-flags #:allow-other-keys)
4798 (apply invoke "make" "build_tests" make-flags))))))
4800 `(("dune-common" ,dune-common)))
4802 `(("gfortran" ,gfortran)
4803 ("pkg-config" ,pkg-config)))
4804 (home-page "https://dune-project.org/")
4805 (synopsis "Distributed and Unified Numerics Environment")
4806 (description "DUNE, the Distributed and Unified Numerics Environment is a
4807 modular toolbox for solving @dfn{partial differential equations} (PDEs) with
4808 grid-based methods. It supports the easy implementation of methods like
4809 @dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite
4812 This package contains the DUNE UG grid classes.")
4813 (license license:lgpl2.1)))
4815 (define-public dune-grid
4822 (uri (string-append "https://dune-project.org/download/"
4823 version "/dune-grid-" version ".tar.gz"))
4826 "17fjz30qazjgl11sryyxnw9klai4yz1ji4bs68013xcxc5hdv27s"))))
4827 (build-system cmake-build-system)
4830 (modify-phases %standard-phases
4831 (add-after 'build 'build-tests
4832 (lambda* (#:key make-flags #:allow-other-keys)
4833 (apply invoke "make" "build_tests" make-flags))))))
4835 `(("dune-common" ,dune-common)
4836 ("dune-geometry" ,dune-geometry)
4839 ("openblas" ,openblas)
4840 ("python" ,python)))
4842 `(("dune-uggrid" ,dune-uggrid)))
4844 `(("gfortran" ,gfortran)
4845 ("pkg-config" ,pkg-config)))
4846 (home-page "https://dune-project.org/")
4847 (synopsis "Distributed and Unified Numerics Environment")
4848 (description "DUNE, the Distributed and Unified Numerics Environment is a
4849 modular toolbox for solving @dfn{partial differential equations} (PDEs) with
4850 grid-based methods. It supports the easy implementation of methods like
4851 @dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite
4854 This package contains the basic DUNE grid classes.")
4855 ;; GPL version 2 with "runtime exception"
4856 (license license:gpl2)))
4858 (define-public dune-istl
4865 (uri (string-append "https://dune-project.org/download/"
4866 version "/dune-istl-" version ".tar.gz"))
4869 "0gl3wgz5rs6sb4m83440ny45sbx7z7lnbi3gx6r9nm3rvy5j33f9"))
4870 (patches (search-patches "dune-istl-2.7-fix-non-mpi-tests.patch"))))
4871 (build-system cmake-build-system)
4874 (modify-phases %standard-phases
4875 (add-after 'build 'build-tests
4876 (lambda* (#:key make-flags #:allow-other-keys)
4877 (apply invoke "make" "build_tests" make-flags))))))
4879 `(("dune-common" ,dune-common)
4882 ("suitesparse" ,suitesparse)
4883 ("superlu" ,superlu)
4884 ("openblas" ,openblas)
4886 ("python" ,python)))
4888 `(("gfortran" ,gfortran)
4889 ("pkg-config" ,pkg-config)))
4890 (home-page "https://dune-project.org/")
4891 (synopsis "Distributed and Unified Numerics Environment")
4892 (description "DUNE, the Distributed and Unified Numerics Environment is a
4893 modular toolbox for solving @dfn{partial differential equations} (PDEs) with
4896 This is the iterative solver template library which provides generic sparse
4897 matrix/vector classes and a variety of solvers based on these classes. A
4898 special feature is the use of templates to exploit the recursive block
4899 structure of finite element matrices at compile time. Available solvers
4900 include Krylov methods, (block-) incomplete decompositions and
4901 aggregation-based algebraic multigrid.")
4902 ;; GPL version 2 with "runtime exception"
4903 (license license:gpl2)))
4905 (define-public dune-localfunctions
4907 (name "dune-localfunctions")
4912 (uri (string-append "https://dune-project.org/download/"
4913 version "/dune-localfunctions-" version ".tar.gz"))
4916 "1yih59h6vngii696bx1c2vil02lriij4kz0nc583mjn9kiaqxfqd"))))
4917 (build-system cmake-build-system)
4920 (modify-phases %standard-phases
4921 (add-after 'build 'build-tests
4922 (lambda* (#:key make-flags #:allow-other-keys)
4923 (apply invoke "make" "build_tests" make-flags))))))
4925 `(("dune-common" ,dune-common)
4926 ("dune-geometry" ,dune-geometry)
4929 ("superlu" ,superlu)
4932 `(("gfortran" ,gfortran)
4933 ("pkg-config" ,pkg-config)))
4934 (home-page "https://dune-project.org/")
4935 (synopsis "Distributed and Unified Numerics Environment") ; TODO
4936 (description "This DUNE module provides interface and implementation for
4937 shape functions defined on the DUNE reference elements. In addition to the
4938 shape function, interpolation operators and special keys are provided which
4939 can be used to assemble global function spaces on finite-element grids.
4941 This package provides an interface and implementation for shape functions
4942 defined on the DUNE reference elements. In addition to the shape function,
4943 interpolation operators and special keys are provided which can be used to
4944 assemble global function spaces on finite-element grids.")
4945 ;; GPL version 2 with "runtime exception"
4946 (license license:gpl2)))
4948 (define-public dune-alugrid
4950 (name "dune-alugrid")
4951 (version "2.7.0-git-81d35682")
4956 (url "https://gitlab.dune-project.org/extensions/dune-alugrid.git")
4957 (commit "81d356827c84454b971937db02c02b90bbcd7fe5")))
4958 (file-name (git-file-name name version))
4961 "0z54lwfp53prcrs94k8gwh047l9z642jll3l56xlyfr69z0b2zz1"))))
4962 (build-system cmake-build-system)
4965 (modify-phases %standard-phases
4966 (add-after 'unpack 'patch-include
4968 (substitute* "dune/alugrid/test/test-alugrid.cc"
4969 (("doc/grids/gridfactory/testgrids")
4970 "doc/dune-grid/grids/gridfactory/testgrids"))
4972 (add-after 'build 'build-tests
4973 (lambda* (#:key inputs make-flags #:allow-other-keys)
4974 (setenv "CPLUS_INCLUDE_PATH"
4975 (string-append (assoc-ref inputs "dune-grid") "/share"))
4976 (apply invoke "make" "build_tests" make-flags))))))
4978 `(("dune-common" ,dune-common)
4979 ("dune-geometry" ,dune-geometry)
4980 ("dune-grid" ,dune-grid)
4983 ("openblas" ,openblas)
4985 ("superlu" ,superlu)
4989 `(("gfortran" ,gfortran)
4990 ("pkg-config" ,pkg-config)))
4991 (home-page "https://dune-project.org/")
4992 (synopsis "Distributed and Unified Numerics Environment")
4993 (description "ALUGrid is an adaptive, loadbalancing, unstructured
4994 implementation of the DUNE grid interface supporting either simplices or
4996 (license license:gpl2+)))
4998 (define-public dune-subgrid
5000 (name "dune-subgrid")
5001 (version "2.7.0-git-2103a363")
5006 (url "https://git.imp.fu-berlin.de/agnumpde/dune-subgrid")
5007 (commit "2103a363f32e8d7b60e66eee7ddecf969f6cf762")))
5008 (file-name (git-file-name name version))
5011 "1wsjlypd3835c3arqjkw836cxx5q67zy447wa65q634lf6f6v9ia"))))
5012 (build-system cmake-build-system)
5015 (modify-phases %standard-phases
5016 (add-after 'build 'build-tests
5017 (lambda* (#:key make-flags #:allow-other-keys)
5018 (apply invoke "make" "build_tests" make-flags))))))
5020 `(("dune-common" ,dune-common)
5021 ("dune-geometry" ,dune-geometry)
5022 ("dune-grid" ,dune-grid)
5025 ("openblas" ,openblas)
5028 `(("gfortran" ,gfortran)
5029 ("pkg-config" ,pkg-config)))
5030 (home-page "http://numerik.mi.fu-berlin.de/dune-subgrid/index.php")
5031 (synopsis "Distributed and Unified Numerics Environment")
5032 (description "The dune-subgrid module marks elements of
5033 another hierarchical dune grid. The set of marked elements can then be
5034 accessed as a hierarchical dune grid in its own right. Dune-Subgrid
5035 provides the full grid interface including adaptive mesh refinement.")
5036 (license license:gpl2+)))
5038 (define-public dune-typetree
5040 (name "dune-typetree")
5046 (url "https://gitlab.dune-project.org/staging/dune-typetree.git")
5047 (commit (string-append "v" version))))
5048 (file-name (git-file-name name version))
5051 "1rhv25yg0q1hw50c8wlfqhgwrjl4mh62zq9v14ilwgzbfgxmpiy7"))))
5052 (build-system cmake-build-system)
5055 (modify-phases %standard-phases
5056 (add-after 'build 'build-tests
5057 (lambda* (#:key make-flags #:allow-other-keys)
5058 (apply invoke "make" "build_tests" make-flags))))))
5060 `(("dune-common" ,dune-common)
5062 ("openblas" ,openblas)
5065 ("superlu" ,superlu)
5068 `(("gfortran" ,gfortran)
5069 ("pkg-config" ,pkg-config)))
5070 (home-page "https://dune-project.org/")
5071 (synopsis "Distributed and Unified Numerics Environment")
5072 (description "TypeTree is a template library for constructing and
5073 operating on statically typed trees of objects.")
5074 ;; Either GPL version 2 with "runtime exception" or LGPLv3+.
5075 (license (list license:lgpl3+ license:gpl2))))
5077 (define-public dune-functions
5079 (name "dune-functions")
5085 (url "https://gitlab.dune-project.org/staging/dune-functions.git")
5086 (commit (string-append "v" version))))
5087 (file-name (git-file-name name version))
5090 "1na4gcih0kin37ksj2xj07ds04v7zx53pjdhm1hzy55jjfqdjk8h"))))
5091 (build-system cmake-build-system)
5094 (modify-phases %standard-phases
5095 (add-after 'unpack 'disable-failing-tests
5098 ;; unable to load GMSH file in this test
5099 "--exclude-regex gridviewfunctionspacebasistest")
5101 (add-after 'build 'build-tests
5102 (lambda* (#:key make-flags #:allow-other-keys)
5103 (apply invoke "make" "build_tests" make-flags))))))
5105 `(("dune-common" ,dune-common)
5106 ("dune-istl" ,dune-istl)
5107 ("dune-localfunctions" ,dune-localfunctions)
5108 ("dune-grid" ,dune-grid)
5109 ("dune-geometry" ,dune-geometry)
5110 ("dune-typetree" ,dune-typetree)
5111 ("openblas" ,openblas)
5114 ("superlu" ,superlu)
5117 `(("gfortran" ,gfortran)
5118 ("pkg-config" ,pkg-config)))
5119 (home-page "https://dune-project.org/")
5120 (synopsis "Distributed and Unified Numerics Environment")
5121 (description "The dune-functions module provides an abstraction layer for
5122 global finite element functions. Its two main concepts are functions
5123 implemented as callable objects, and bases of finite element spaces.")
5124 ;; Either GPL version 2 with "runtime exception" or LGPLv3+.
5125 (license (list license:lgpl3+ license:gpl2))))
5127 (define-public dune-pdelab
5129 (name "dune-pdelab")
5130 (version "2.7.0-git-476fe437")
5135 (url "https://gitlab.dune-project.org/pdelab/dune-pdelab")
5136 (commit "476fe43763fa6f459c5e4658e2a2b4b5582db834")))
5137 (file-name (git-file-name name version))
5140 "0cs36piqzn6rq0j2ih3ab3q3q9yg199wk72k5qi86pkzh7i7fdn1"))))
5141 (build-system cmake-build-system)
5142 (arguments '(#:tests? #f)) ; XXX: the tests cannot be compiled
5144 `(("dune-common" ,dune-common)
5145 ("dune-istl" ,dune-istl)
5146 ("dune-localfunctions" ,dune-localfunctions)
5147 ("dune-geometry" ,dune-geometry)
5148 ("dune-grid" ,dune-grid)
5149 ("dune-typetree" ,dune-typetree)
5150 ("dune-functions" ,dune-functions)
5152 ("openblas" ,openblas)
5156 ("superlu" ,superlu)
5159 `(("gfortran" ,gfortran)
5160 ("pkg-config" ,pkg-config)))
5161 (home-page "https://dune-project.org/")
5162 (synopsis "Differential equations solver toolbox")
5163 (description "PDELab is a partial differential equations solver toolbox
5164 built on top of DUNE, the Distributed and Unified Numerics Environment.")
5165 ;; Either GPL version 2 with "runtime exception" or LGPLv3+.
5166 (license (list license:lgpl3+ license:gpl2))))
5168 (define add-openmpi-to-dune-package
5169 (let ((dune-package?
5170 (lambda (p) (string-prefix? "dune-" (package-name p)))))
5173 (if (dune-package? p)
5174 (package (inherit p)
5175 (name (string-append (package-name p) "-openmpi"))
5176 (inputs `(,@(package-inputs p)
5177 ("openmpi" ,openmpi)))
5179 (substitute-keyword-arguments (package-arguments p)
5180 ((#:phases phases '%standard-phases)
5181 `(modify-phases ,phases
5182 (add-before 'check 'mpi-setup
5183 ,%openmpi-setup)))))
5184 (synopsis (string-append (package-synopsis p) " (with MPI support)")))
5186 (negate dune-package?))))
5188 (define-public dune-common-openmpi
5189 (add-openmpi-to-dune-package dune-common))
5191 (define-public dune-geometry-openmpi
5192 (add-openmpi-to-dune-package dune-geometry))
5194 (define-public dune-istl-openmpi
5195 (add-openmpi-to-dune-package dune-istl))
5197 (define-public dune-typetree-openmpi
5198 (add-openmpi-to-dune-package dune-typetree))
5200 (define-public dune-uggrid-openmpi
5201 (add-openmpi-to-dune-package dune-uggrid))
5203 (define-public dune-grid-openmpi
5204 (add-openmpi-to-dune-package dune-grid))
5206 (define-public dune-alugrid-openmpi
5207 (add-openmpi-to-dune-package dune-alugrid))
5209 (define-public dune-subgrid-openmpi
5210 (add-openmpi-to-dune-package dune-subgrid))
5212 (define-public dune-localfunctions-openmpi
5213 (add-openmpi-to-dune-package dune-localfunctions))
5215 (define-public dune-functions-openmpi
5216 (add-openmpi-to-dune-package dune-functions))
5218 (define-public dune-pdelab-openmpi
5219 (add-openmpi-to-dune-package dune-pdelab))
5221 (define-public mlucas
5229 "https://mersenneforum.org/mayer/src/C/mlucas_v" version ".txz"))
5231 (base32 "0h4xj6pyyac79ka5ibqjilfa3s9j3yxnzgpwc57b54kfh2bj3447"))))
5232 (build-system gnu-build-system)
5234 `(("python2" ,python-2)))
5236 `(#:tests? #f ; no tests
5238 (modify-phases %standard-phases
5242 (call-with-output-file "Makefile"
5244 (format port "CC = gcc
5245 CFLAGS = -O3 ~a -DUSE_THREADS
5246 LDLIBS = -lm -lpthread -lrt
5247 Mlucas: $(addsuffix .o,$(basename $(wildcard *.c)))
5249 ,(let ((system (or (%current-target-system)
5250 (%current-system))))
5252 ((string-prefix? "x86_64" system) "-DUSE_SSE2")
5256 (lambda* (#:key outputs #:allow-other-keys)
5257 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
5258 (install-file "Mlucas" bin)
5259 (install-file "primenet.py" bin))
5261 (home-page "https://www.mersenne.org")
5262 (synopsis "Great Internet Mersenne Prime Search (GIMPS) distributed computing client")
5263 (description "Mlucas performs Lucas-Lehmer primality testing of Mersenne
5264 numbers in search of a world-record prime. You may use it to test any
5265 suitable number as you wish, but it is preferable that you do so in a
5266 coordinated fashion, as part of the Great Internet Mersenne Prime
5267 Search (GIMPS). Mlucas also includes a simple Python script for assignment
5268 management via the GIMPS project's Primenet server.")
5269 (license license:gpl2+)))
5271 (define-public nauty
5278 "https://pallini.di.uniroma1.it/"
5279 "nauty" (string-join (string-split version #\.) "")
5283 "1p4mxf8q5wm47nxyskxbqwa5p1vvkycv1zgswvnk9nsn6vff0al6"))))
5284 (build-system gnu-build-system)
5285 (outputs '("out" "lib"))
5287 `(#:test-target "checks"
5289 (modify-phases %standard-phases
5290 ;; Default make target does not build all available
5291 ;; executables. Create them now.
5292 (add-after 'build 'build-extra-programs
5294 (for-each (lambda (target) (invoke "make" target))
5295 '("blisstog" "bliss2dre" "checks6" "sumlines"))
5297 ;; Upstream does not provide any install target.
5299 (lambda* (#:key outputs #:allow-other-keys)
5300 (let* ((out (assoc-ref outputs "out"))
5301 (lib-output (assoc-ref outputs "lib"))
5302 (bin (string-append out "/bin"))
5303 (doc (string-append out "/share/doc/nauty/"))
5304 (include (string-append lib-output "/include/nauty"))
5305 (lib (string-append lib-output "/lib/nauty")))
5306 (for-each (lambda (f) (install-file f bin))
5307 '("dreadnaut" "NRswitchg" "addedgeg" "amtog" "biplabg"
5308 "blisstog" "bliss2dre" "catg" "checks6" "complg"
5309 "converseg" "copyg" "countg" "cubhamg" "deledgeg"
5310 "delptg" "directg" "dretodot" "dretog" "genbg"
5311 "genbgL" "geng" "genquarticg" "genrang" "genspecialg"
5312 "gentourng" "gentreeg" "hamheuristic" "labelg"
5313 "linegraphg" "listg" "multig" "newedgeg" "pickg"
5314 "planarg" "ranlabg" "shortg" "showg" "subdivideg"
5315 "sumlines" "twohamg" "vcolg" "watercluster2"))
5316 (for-each (lambda (f) (install-file f include))
5317 (find-files "." "\\.h$"))
5318 (for-each (lambda (f) (install-file f lib))
5319 (find-files "." "\\.a$"))
5320 (for-each (lambda (f) (install-file f doc))
5321 (append '("formats.txt" "README" "schreier.txt")
5322 (find-files "." "\\.pdf$")))))))))
5324 `(("gmp" ,gmp))) ;for sumlines
5325 (home-page "https://pallini.di.uniroma1.it/")
5326 (synopsis "Library for graph automorphisms")
5327 (description "@code{nauty} (No AUTomorphisms, Yes?) is a set of
5328 procedures for computing automorphism groups of graphs and digraphs.
5330 @code{nauty} computes graph information in the form of a set of
5331 generators, the size of the group, and the orbits of the group; it can
5332 also produce a canonical label. The @code{nauty} suite is written in
5333 C and comes with a command-line interface, a collection of
5334 command-line tools, and an Application Programming Interface (API).
5336 This package provides the static libraries required to run programs
5337 compiled against the nauty library.")
5338 (license license:asl2.0)))
5347 (uri (string-append "https://www.bugseng.com/products/ppl/download/"
5348 "ftp/releases/" version
5349 "/ppl-" version ".tar.gz"))
5352 "1j5aji1g2vmdvc0gqz45n2ll2l2f6czca04wiyfl5g3sm3a6vhvb"))))
5353 (build-system gnu-build-system)
5359 (home-page "https://www.bugseng.com/parma-polyhedra-library")
5361 "Parma Polyhedra Library for computations with polyhedra")
5363 "The Parma Polyhedra Library (PPL) provides numerical abstractions
5364 especially targeted at applications in the field of analysis and
5365 verification of complex systems. These abstractions include convex
5366 polyhedra, defined as the intersection of a finite number of (open or
5367 closed) halfspaces, each described by a linear inequality (strict or
5368 non-strict) with rational coefficients; some special classes of polyhedra
5369 shapes that offer interesting complexity/precision tradeoffs; and grids
5370 which represent regularly spaced points that satisfy a set of linear
5371 congruence relations. The library also supports finite powersets and
5372 products of (any kind of) polyhedra and grids, a mixed integer linear
5373 programming problem solver using an exact-arithmetic version of the simplex
5374 algorithm, a parametric integer programming solver, and primitives for
5375 termination analysis via the automatic synthesis of linear ranking
5377 (license license:gpl3+)))
5379 (define-public speedcrunch
5381 (name "speedcrunch")
5387 (url "https://bitbucket.org/heldercorreia/speedcrunch.git")
5388 (commit (string-append "release-" version))))
5389 (file-name (git-file-name name version))
5392 "0vh7cd1915bjqzkdp3sk25ngy8cq624mkh8c53c5bnzk357kb0fk"))))
5393 (build-system cmake-build-system)
5394 (inputs `(("qtbase" ,qtbase)))
5395 (native-inputs `(("qttools" ,qttools)))
5398 (modify-phases %standard-phases
5399 (add-after 'unpack 'chdir-to-src
5400 (lambda _ (chdir "src") #t)))))
5401 (synopsis "High-precision scientific calculator")
5403 "SpeedCrunch is a high-precision scientific calculator. It features a
5404 syntax-highlighted scrollable display and is designed to be fully used via
5405 keyboard. Some distinctive features are auto-completion of functions and
5406 variables, a formula book, and quick insertion of constants from various
5407 fields of knowledge.")
5408 (home-page "https://speedcrunch.org/")
5409 (license license:gpl2+)))
5411 (define-public minisat
5412 ;; This is the last commit which is available upstream, no
5413 ;; release happened since 2010.
5414 (let ((commit "37dc6c67e2af26379d88ce349eb9c4c6160e8543")
5418 (version (string-append "2.2.0-" revision "." (string-take commit 7)))
5423 (url "https://github.com/niklasso/minisat.git")
5425 (file-name (string-append name "-" version "-checkout"))
5428 "091hf3qkm197s5r7xcr3m07xsdwyz2rqk1hc9kj0hn13imz09irq"))
5430 (search-patches "minisat-friend-declaration.patch"
5431 "minisat-install.patch"))))
5432 (build-system gnu-build-system)
5434 '(#:make-flags (list (string-append "prefix=" %output))
5435 #:tests? #f ;no check target
5437 (modify-phases %standard-phases
5438 (delete 'configure))))
5440 `(("zlib:static" ,zlib "static")
5443 "Small, yet efficient, SAT solver")
5445 "MiniSat is a minimalistic, open-source SAT solver, developed to help
5446 researchers and developers alike to get started on SAT.")
5448 "http://minisat.se/MiniSat.html")
5449 (license license:expat))))
5451 (define-public libqalculate
5453 (name "libqalculate")
5459 (url "https://github.com/Qalculate/libqalculate/")
5460 (commit (string-append "v" version))))
5461 (file-name (git-file-name name version))
5463 (base32 "1vbaza9c7159xf2ym90l0xkyj2mp6c3hbghhsqn29yvz08fda9df"))
5465 (search-patches "libqalculate-3.8.0-libcurl-ssl-fix.patch"))))
5466 (build-system gnu-build-system)
5468 `(("pkg-config" ,pkg-config)
5469 ("gettext" ,gettext-minimal)
5470 ("intltool" ,intltool)
5471 ("automake" ,automake)
5472 ("autoconf" ,autoconf)
5473 ("libtool" ,libtool)
5474 ("doxygen" ,doxygen)
5479 ("libxml2" ,libxml2)
5482 ("gnuplot" ,gnuplot)
5483 ("readline" ,readline)
5484 ("libiconv" ,libiconv)))
5487 (modify-phases %standard-phases
5488 (add-before 'bootstrap 'setenv
5489 ;; Prevent the autogen.sh script to carry out the configure
5490 ;; script, which has not yet been patched to replace /bin/sh.
5492 (setenv "NOCONFIGURE" "TRUE")
5494 (home-page "https://qalculate.github.io/")
5495 (synopsis "Multi-purpose cli desktop calculator and library")
5497 "Libqalculate is a multi-purpose cli desktop calculator and library.
5498 It provides basic and advanced functionality. Features include customizable
5499 functions, unit calculations, and conversions, physical constants, symbolic
5500 calculations (including integrals and equations), arbitrary precision,
5501 uncertainty propagation, interval arithmetic, plotting and a user-friendly
5503 (license license:gpl2+)))
5505 (define-public qalculate-gtk
5507 (name "qalculate-gtk")
5513 (url "https://github.com/Qalculate/qalculate-gtk/")
5514 (commit (string-append "v" version))))
5515 (file-name (git-file-name name version))
5517 (base32 "0nsg6dzg5r7rzqr671nvrf1c50rjwpz7bxv5f20i4s7agizgv840"))))
5518 (build-system glib-or-gtk-build-system)
5520 `(("pkg-config" ,pkg-config)
5521 ("intltool" ,intltool)
5522 ("automake" ,automake)
5523 ("autoconf" ,autoconf)
5524 ("libtool" ,libtool)
5529 ("libqalculate" ,libqalculate)
5530 ("libxml2" ,libxml2)
5535 (modify-phases %standard-phases
5536 (add-before 'bootstrap 'setenv
5537 ;; Prevent the autogen.sh script to carry out the configure
5538 ;; script, which has not yet been patched to replace /bin/sh.
5540 (setenv "NOCONFIGURE" "TRUE")
5542 (add-before 'check 'add-pot-file
5543 ;; the file contains translations and are currently not in use
5544 ;; left out on purpose so add it to POTFILES.skip
5546 (with-output-to-file "po/POTFILES.skip"
5548 (format #t "data/shortcuts.ui~%")
5551 (home-page "https://qalculate.github.io/")
5552 (synopsis "Multi-purpose graphical desktop calculator")
5554 "Qalculate-gtk is the GTK frontend for libqalculate. It is a
5555 multi-purpose GUI desktop calculator. It provides basic and advanced
5556 functionality. Features include customizable functions, unit calculations,
5557 and conversions, physical constants, symbolic calculations (including
5558 integrals and equations), arbitrary precision, uncertainity propagation,
5559 interval arithmetic, plotting.")
5560 (license license:gpl2+)))