1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016 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 Eric Bavier <bavier@member.fsf.org>
6 ;;; Copyright © 2014 Federico Beffa <beffa@fbengineering.ch>
7 ;;; Copyright © 2014 Mathieu Lirzin <mathieu.lirzin@openmailbox.org>
8 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
10 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
11 ;;; Copyright © 2015, 2016, 2017, 2018 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 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 Paul Garlick <pgarlick@tourbillion-technology.com>
19 ;;; Copyright © 2017 Nils Gillmann <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 Tobias Geerinckx-Rice <me@tobias.gr>
24 ;;; Copyright © 2017 Dave Love <me@fx@gnu.org>
25 ;;; Copyright © 2018 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>
34 ;;; This file is part of GNU Guix.
36 ;;; GNU Guix is free software; you can redistribute it and/or modify it
37 ;;; under the terms of the GNU General Public License as published by
38 ;;; the Free Software Foundation; either version 3 of the License, or (at
39 ;;; your option) any later version.
41 ;;; GNU Guix is distributed in the hope that it will be useful, but
42 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
43 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
44 ;;; GNU General Public License for more details.
46 ;;; You should have received a copy of the GNU General Public License
47 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
49 (define-module (gnu packages maths)
50 #:use-module (ice-9 regex)
51 #:use-module (ice-9 match)
52 #:use-module (gnu packages)
53 #:use-module ((guix licenses) #:prefix license:)
54 #:use-module (guix packages)
55 #:use-module (guix download)
56 #:use-module (guix git-download)
57 #:use-module (guix utils)
58 #:use-module ((guix build utils) #:select (alist-replace))
59 #:use-module (guix build-system cmake)
60 #:use-module (guix build-system gnu)
61 #:use-module (guix build-system python)
62 #:use-module (guix build-system r)
63 #:use-module (guix build-system ruby)
64 #:use-module (gnu packages algebra)
65 #:use-module (gnu packages audio)
66 #:use-module (gnu packages autotools)
67 #:use-module (gnu packages base)
68 #:use-module (gnu packages bison)
69 #:use-module (gnu packages boost)
70 #:use-module (gnu packages check)
71 #:use-module (gnu packages cmake)
72 #:use-module (gnu packages compression)
73 #:use-module (gnu packages curl)
74 #:use-module (gnu packages cyrus-sasl)
75 #:use-module (gnu packages documentation)
76 #:use-module (gnu packages elf)
77 #:use-module (gnu packages flex)
78 #:use-module (gnu packages fltk)
79 #:use-module (gnu packages fontutils)
80 #:use-module (gnu packages gettext)
81 #:use-module (gnu packages gcc)
82 #:use-module (gnu packages gd)
83 #:use-module (gnu packages ghostscript)
84 #:use-module (gnu packages graphviz)
85 #:use-module (gnu packages gtk)
86 #:use-module (gnu packages image)
87 #:use-module (gnu packages java)
88 #:use-module (gnu packages less)
89 #:use-module (gnu packages lisp)
90 #:use-module (gnu packages linux)
91 #:use-module (gnu packages logging)
92 #:use-module (gnu packages lua)
93 #:use-module (gnu packages gnome)
94 #:use-module (gnu packages guile)
95 #:use-module (gnu packages xorg)
96 #:use-module (gnu packages gl)
97 #:use-module (gnu packages imagemagick)
98 #:use-module (gnu packages m4)
99 #:use-module (gnu packages mpi)
100 #:use-module (gnu packages multiprecision)
101 #:use-module (gnu packages netpbm)
102 #:use-module (gnu packages pcre)
103 #:use-module (gnu packages popt)
104 #:use-module (gnu packages perl)
105 #:use-module (gnu packages pkg-config)
106 #:use-module (gnu packages pulseaudio)
107 #:use-module (gnu packages python)
108 #:use-module (gnu packages python-web)
109 #:use-module (gnu packages python-xyz)
110 #:use-module (gnu packages qt)
111 #:use-module (gnu packages readline)
112 #:use-module (gnu packages ruby)
113 #:use-module (gnu packages tbb)
114 #:use-module (gnu packages scheme)
115 #:use-module (gnu packages shells)
116 #:use-module (gnu packages tcl)
117 #:use-module (gnu packages texinfo)
118 #:use-module (gnu packages tex)
119 #:use-module (gnu packages tls)
120 #:use-module (gnu packages version-control)
121 #:use-module (gnu packages wxwidgets)
122 #:use-module (gnu packages xml)
123 #:use-module (srfi srfi-1))
131 (uri (string-append "mirror://gnu/" name "/" name "-" version ".tar.gz"))
133 "1q1887ryqdr9sn0522hc7p16kqwlxxyz5dkmma8ar2nxplhgll7q"))))
134 (build-system gnu-build-system)
135 (inputs `(("gtk+" ,gtk+)
136 ("libxml2" ,libxml2)))
137 (native-inputs `(("pkg-config" ,pkg-config)))
138 (synopsis "Natural deduction first-order logic interface")
139 (description "Aris is a program for performing logical proofs. It supports
140 propositional and predicate logic, as well as Boolean algebra and
141 arithmetical logic. In addition to its predefined inference and equivalence
142 rules, Aris also supports references to older proofs. Its use of standard
143 logical symbols and its natural deduction interface make it easy to use for
145 (license license:gpl3+)
146 (home-page "https://www.gnu.org/software/aris/")))
148 (define-public c-graph
154 (uri (string-append "mirror://gnu/c-graph/c-graph-" version
157 "1hlvpzrh7hzzf533diyfiabzskddi8zx92av9hwkjw3l46z7qv01"))))
158 (build-system gnu-build-system)
160 `(("fortran" ,gfortran)))
161 (synopsis "Visualizing and demonstrating convolution")
163 "GNU C-Graph is a tool for demonstrating the theory of convolution.
164 Thus, it can serve as an excellent aid to students of signal and systems
165 theory in visualizing the convolution process. Rather than forcing the
166 student to write code, the program offers an intuitive interface with
167 interactive dialogs to guide them.")
168 (license license:gpl3+)
169 (home-page "https://www.gnu.org/software/c-graph/")))
178 (uri (string-append "https://github.com/stcorp/coda/releases/download/"
179 version "/coda-" version ".tar.gz"))
181 (base32 "1fbxd2afm7dshd92p10yy8dwbr9gc1h1fmnnnmr7d0c5lnw80245"))
182 (patches (search-patches "coda-use-system-libs.patch"))
183 (modules '((guix build utils)))
185 ;; Make sure we don't use the bundled software.
187 (for-each (lambda (d)
188 (delete-file-recursively (string-append "libcoda/" d)))
189 '("zlib" "pcre" "expat"))
192 `(("fortran" ,gfortran)
194 ("python-numpy" ,python-numpy)))
201 (build-system gnu-build-system)
203 '(#:configure-flags '("--with-hdf4" "--with-hdf5" "--enable-python"
204 "LIBS= -lz -lpcre -lexpat")))
205 (synopsis "A common interface to various earth observation data formats")
207 "The Common Data Access toolbox (CODA) provides a set of interfaces for
208 reading remote sensing data from earth observation data files. It consists of
209 command line applications and interfaces to the C, Fortran, Python, and Java
210 programming languages.")
211 (home-page "https://stcorp.nl/coda")
212 (license license:gpl2+)))
220 (uri (string-append "http://www.qhull.org/download/qhull-"
221 (car (string-split version #\.))
225 "0dm4b2xr3asy6w74khq2zg4gf26zsy3qf9sq7pf7lmrvbj911c3q"))))
226 (build-system cmake-build-system)
227 (synopsis "Calculate convex hulls and related structures")
229 "@code{Qhull} computes the convex hull, Delaunay triangulation, Voronoi
230 diagram, halfspace intersection about a point, furthest-site Delaunay
231 triangulation, and furthest-site Voronoi diagram. The source code runs in 2-d,
232 3-d, 4-d, and higher dimensions. @code{Qhull} implements the Quickhull
233 algorithm for computing the convex hull. It handles roundoff errors from
234 floating point arithmetic. It computes volumes, surface areas, and
235 approximations to the convex hull.
237 @code{Qhull} does not support triangulation of non-convex surfaces, mesh
238 generation of non-convex objects, medium-sized inputs in 9-D and higher, alpha
239 shapes, weighted Voronoi diagrams, Voronoi volumes, or constrained Delaunay
241 (home-page "http://qhull.org")
242 (license (license:non-copyleft "file://COPYING.txt"
243 "See COPYING in the distribution."))))
245 (define-public python-cvxopt
247 (name "python-cvxopt")
252 (url "https://github.com/cvxopt/cvxopt.git")
254 (file-name (git-file-name name version))
257 "05mnjil9palaa48xafdfh4f5pr4z7aqjr995rwl08qfyxs8y0crf"))))
258 (build-system python-build-system)
261 (modify-phases %standard-phases
262 (add-after 'unpack 'find-libraries
263 (lambda* (#:key inputs #:allow-other-keys)
264 (setenv "CVXOPT_BLAS_LIB" "openblas")
265 (setenv "CVXOPT_BUILD_FFTW" "1")
266 (setenv "CVXOPT_BUILD_GLPK" "1")
267 (setenv "CVXOPT_BUILD_GSL" "1")
274 ("openblas" ,openblas)
275 ("suitesparse" ,suitesparse)))
276 (home-page "https://www.cvxopt.org")
277 (synopsis "Python library for convex optimization")
279 "CVXOPT is a package for convex optimization based on the Python
280 programming language. Its main purpose is to make the development of software
281 for convex optimization applications straightforward by building on Python’s
282 extensive standard library and on the strengths of Python as a high-level
283 programming language.")
284 (license license:gpl3+)))
286 (define-public python2-cvxopt
287 (package-with-python2 python-cvxopt))
295 (uri (string-append "mirror://gnu/units/units-" version
298 "0y26kj349i048y4z3xrk90bvciw2j6ds3rka7r7yn3183hirr5b4"))))
299 (build-system gnu-build-system)
301 `(("readline" ,readline)
302 ("python" ,python-wrapper) ;for 'units_cur' script
303 ("python-requests" ,python-requests)))
305 `(#:phases (modify-phases %standard-phases
306 (add-after 'install 'wrap-units_cur
307 (lambda* (#:key outputs #:allow-other-keys)
308 (let* ((out (assoc-ref outputs "out"))
309 (bin (string-append out "/bin")))
310 (wrap-program (string-append bin "/units_cur")
311 `("PYTHONPATH" ":" prefix
312 ,(search-path-as-string->list (getenv "PYTHONPATH"))))
314 (synopsis "Conversion between thousands of scales")
316 "GNU Units converts numeric quantities between units of measure. It
317 can handle scale changes through adaptive usage of standard scale
318 prefixes (micro-, kilo-, etc.). It can also handle nonlinear
319 conversions such as Fahrenheit to Celsius. Its interpreter is powerful
320 enough to be used effectively as a scientific calculator.")
321 (license license:gpl3+)
322 (home-page "https://www.gnu.org/software/units/")))
324 (define-public double-conversion
326 (name "double-conversion")
328 (home-page "https://github.com/google/double-conversion")
331 (uri (git-reference (url home-page) (commit version)))
332 (file-name (git-file-name name version))
335 "123rb2p4snqagrybw66vnapchqdwn2rfpr1wcq0ya9gwbyl7xccx"))))
336 (build-system cmake-build-system)
338 '(#:test-target "test"
339 #:configure-flags '("-DBUILD_SHARED_LIBS=ON"
340 "-DBUILD_TESTING=ON")))
341 (synopsis "Conversion routines for IEEE doubles")
343 "The double-conversion library provides binary-decimal and decimal-binary
344 routines for IEEE doubles. The library consists of efficient conversion
345 routines that have been extracted from the V8 JavaScript engine.")
346 (license license:bsd-3)))
348 (define-public dionysus
354 (uri (string-append "mirror://gnu/dionysus/dionysus-" version
358 "194pzs1mlsj4ww6v37qq3961h5hckm5h805cv0r14xj3g9wfx2sk"))))
359 (build-system gnu-build-system)
360 (inputs `(("tcl" ,tcl))) ;for 'tclsh'
361 (synopsis "Local search for universal constants and scientific values")
363 "GNU Dionysus is a convenient system for quickly retrieving the values of
364 mathematical constants used in science and engineering. Values can be
365 searched using a simple command-line tool, choosing from three databases:
366 universal constants, atomic numbers, and constants related to
368 (license license:gpl3+)
369 (home-page "https://www.gnu.org/software/dionysus/")))
377 (uri (string-append "mirror://gnu/gsl/gsl-"
381 "1395y9hlhqadn5g9j8q22224fds5sd92jxi9czfavjj24myasq04"))
382 (patches (search-patches "gsl-test-i686.patch"))))
383 (build-system gnu-build-system)
385 `(;; Currently there are numerous tests that fail on "exotic"
386 ;; architectures such as aarch64 and ppc64le.
387 ,@(if (string-prefix? "aarch64-linux"
388 (or (%current-target-system) (%current-system)))
391 (home-page "https://www.gnu.org/software/gsl/")
392 (synopsis "Numerical library for C and C++")
394 "The GNU Scientific Library is a library for numerical analysis in C
395 and C++. It includes a wide range of mathematical routines, with over 1000
396 functions in total. Subject areas covered by the library include:
397 differential equations, linear algebra, Fast Fourier Transforms and random
399 (license license:gpl3+)))
408 (uri (string-append "mirror://gnu/glpk/glpk-"
412 "040sfaa9jclg2nqdh83w71sv9rc1sznpnfiripjdyr48cady50a2"))))
413 (build-system gnu-build-system)
417 `(#:configure-flags '("--with-gmp")))
418 (home-page "https://www.gnu.org/software/glpk/")
419 (synopsis "GNU Linear Programming Kit, supporting the MathProg language")
421 "GLPK is a C library for solving large-scale linear programming (LP),
422 mixed integer programming (MIP), and other related problems. It supports the
423 GNU MathProg modeling language, a subset of the AMPL language, and features a
424 translator for the language. In addition to the C library, a stand-alone
425 LP/MIP solver is included in the package.")
426 (license license:gpl3+)))
435 (uri (string-append "http://www.4ti2.de/version_" version
436 "/4ti2-" version ".tar.gz"))
439 "1frix3rnm9ffr93alqzw4cavxbfpf524l8rfbmcpyhwd3n1km0yl"))))
440 (build-system gnu-build-system)
442 `(("which" ,(@ (gnu packages base) which)))) ; for the tests
446 (home-page "http://www.4ti2.de/")
447 (synopsis "Mathematical tool suite for problems on linear spaces")
449 "4ti2 implements algorithms for solving algebraic, geometric and
450 combinatorial problems on linear spaces. Among others, it solves systems
451 of linear equations, computes extreme rays of polyhedral cones, solves
452 integer programming problems and computes Markov bases for statistics.")
453 (license license:gpl2+)))
455 (define-public cddlib
462 (uri (string-append "ftp://ftp.math.ethz.ch/users/fukudak/cdd/cddlib-"
463 (string-delete #\. version) ".tar.gz"))
466 "00zdgiqb91vx6gd2103h3ijij0llspsxc6zz3iw2bll39fvkl4xq"))))
467 (build-system gnu-build-system)
470 (home-page "https://www.inf.ethz.ch/personal/fukudak/cdd_home/index.html")
471 (synopsis "Library for convex hulls and extreme rays of polyhedra")
473 "The C-library cddlib implements the Double Description Method of
474 Motzkin et al. for generating all vertices (i.e. extreme points) and extreme
475 rays of a general convex polyhedron given by a system of linear inequalities
476 in arbitrary dimension. It can also be used for the converse operation of
477 computing convex hulls.")
478 (license license:gpl2+)))
480 (define-public arpack-ng
484 (home-page "https://github.com/opencollab/arpack-ng")
487 (uri (git-reference (url home-page) (commit version)))
488 (file-name (git-file-name name version))
491 "1wljl96yqxc9v8r49c37lscwkdp58kaacfb9p6s6nvpm31haax4y"))))
492 (build-system gnu-build-system)
494 `(("autoconf" ,autoconf)
495 ("automake" ,automake)
496 ("libtool" ,libtool)))
499 ("fortran" ,gfortran)))
500 (synopsis "Fortran subroutines for solving eigenvalue problems")
502 "ARPACK-NG is a collection of Fortran77 subroutines designed to solve
503 large scale eigenvalue problems.")
504 (license (license:non-copyleft "file://COPYING"
505 "See COPYING in the distribution."))))
507 (define-public arpack-ng-3.3.0
511 (name (package-name arpack-ng))
512 (home-page (package-home-page arpack-ng))
516 (uri (string-append home-page "/archive/" version ".tar.gz"))
517 (file-name (string-append name "-" version ".tar.gz"))
520 "1cz53wqzcf6czmcpfb3vb61xi0rn5bwhinczl65hpmbrglg82ndd"))))))
522 (define-public arpack-ng-openmpi
523 (package (inherit arpack-ng)
524 (name "arpack-ng-openmpi")
527 ,@(package-inputs arpack-ng)))
529 (substitute-keyword-arguments (package-arguments arpack-ng)
530 ((#:configure-flags _ '())
532 ((#:phases phases '%standard-phases)
533 `(modify-phases ,phases
534 (add-before 'check 'mpi-setup
536 (synopsis "Fortran subroutines for solving eigenvalue problems with MPI")))
538 (define-public lapack
545 (uri (string-append "http://www.netlib.org/lapack/lapack-"
549 "1j51r7n5w4k7r3lrvy7710xrpkg40wf4rqnmngfz6ck9ypckzign"))))
550 (build-system cmake-build-system)
551 (home-page "http://www.netlib.org/lapack/")
552 (inputs `(("fortran" ,gfortran)
553 ("python" ,python-2)))
555 `(#:configure-flags (list
556 "-DBUILD_SHARED_LIBS:BOOL=YES"
559 ;; Build the 'LAPACKE_clatms' functions.
560 "-DLAPACKE_WITH_TMG=ON")
562 (modify-phases %standard-phases
563 (add-before 'check 'patch-python
564 (lambda* (#:key inputs #:allow-other-keys)
565 (let ((python (assoc-ref inputs "python")))
566 (substitute* "lapack_testing.py"
567 (("/usr/bin/env python") python)))
569 (synopsis "Library for numerical linear algebra")
571 "LAPACK is a Fortran 90 library for solving the most commonly occurring
572 problems in numerical linear algebra.")
573 (license (license:non-copyleft "file://LICENSE"
574 "See LICENSE in the distribution."))))
576 (define-public scalapack
583 (uri (string-append "http://www.netlib.org/scalapack/scalapack-"
587 "0p1r61ss1fq0bs8ynnx7xq4wwsdvs32ljvwjnx6yxr8gd6pawx0c"))))
588 (build-system cmake-build-system)
591 ("fortran" ,gfortran)
592 ("lapack" ,lapack))) ;for testing only
594 `(#:configure-flags `("-DBUILD_SHARED_LIBS:BOOL=YES")
595 #:phases (modify-phases %standard-phases
596 (add-before 'check 'mpi-setup
598 (home-page "http://www.netlib.org/scalapack/")
599 (synopsis "Library for scalable numerical linear algebra")
601 "ScaLAPACK is a Fortran 90 library of high-performance linear algebra
602 routines on parallel distributed memory machines. ScaLAPACK solves dense and
603 banded linear systems, least squares problems, eigenvalue problems, and
604 singular value problems.")
605 (license (license:bsd-style "file://LICENSE"
606 "See LICENSE in the distribution."))))
608 (define-public gnuplot
614 (uri (string-append "mirror://sourceforge/gnuplot/gnuplot/"
619 "1jvh8xmd2cvrhlsg88kxwh55wkwx31sg50v1n59slfippl0g058m"))))
620 (build-system gnu-build-system)
621 (inputs `(("readline" ,readline)
627 `(("pkg-config" ,pkg-config)
628 ("texlive" ,texlive-tiny)))
629 (arguments `(#:configure-flags (list (string-append
630 "--with-texdir=" %output
631 "/texmf-local/tex/latex/gnuplot"))))
632 (home-page "http://www.gnuplot.info")
633 (synopsis "Command-line driven graphing utility")
634 (description "Gnuplot is a portable command-line driven graphing
635 utility. It was originally created to allow scientists and students to
636 visualize mathematical functions and data interactively, but has grown to
637 support many non-interactive uses such as web scripting. It is also used as a
638 plotting engine by third-party applications like Octave.")
639 ;; X11 Style with the additional restriction that derived works may only be
640 ;; distributed as patches to the original.
641 (license (license:fsf-free
642 "http://gnuplot.cvs.sourceforge.net/gnuplot/gnuplot/Copyright"))))
651 (uri (string-append "https://github.com/OkoSanto/GCTP/archive/v"
653 (file-name (string-append name "-" version ".tar.gz"))
656 "0l9aqnqynh9laicn5dxf3rsb1n14xiks79wbyqccirzmjqd1c1x4"))))
658 `(("fortran" ,gfortran)))
659 (build-system gnu-build-system)
660 (synopsis "General Cartographic Transformation Package (GCTP)")
662 "The General Cartographic Transformation Package (GCTP) is a system of
663 software routines designed to permit the transformation of coordinate pairs
664 from one map projection to another. The GCTP is the standard computer
665 software used by the National Mapping Division for map projection
667 (home-page "https://github.com/OkoSanto/GCTP")
668 (license license:public-domain))) ;https://www2.usgs.gov/laws/info_policies.html
677 (uri (string-append "https://support.hdfgroup.org/ftp/HDF/releases/HDF"
678 version "/src/hdf-" version ".tar.bz2"))
680 (base32 "1wz0586zh91pqb95wvr0pbh71a8rz358fdj6n2ksp85x2cis9lsm"))
681 (patches (search-patches "hdf4-architectures.patch"
682 "hdf4-reproducibility.patch"
683 "hdf4-shared-fortran.patch"))))
684 (build-system gnu-build-system)
686 `(("gfortran" ,gfortran)
691 ("libjpeg" ,libjpeg)))
693 `(#:parallel-tests? #f
694 #:configure-flags '("--enable-shared")
696 (modify-phases %standard-phases
697 ;; This is inspired by two of Debian's patches.
698 (add-before 'configure 'add-more-aarch64-support
700 (substitute* '("mfhdf/ncgen/ncgen.l"
701 "mfhdf/ncgen/ncgenyy.c"
702 "mfhdf/libsrc/netcdf.h.in")
703 (("AIX5L64") "__aarch64__"))
705 (add-before 'configure 'patchbuild
708 '("mfhdf/hdfimport/testutil.sh.in" "hdf/util/testutil.sh.in")
710 (("/bin/mkdir") "mkdir"))
711 (substitute* (find-files "." "^Makefile\\.in$")
712 (("@HDF_BUILD_XDR_TRUE@XDR_ADD = \
713 -R\\$\\(abs_top_builddir\\)/mfhdf/xdr/\\.libs") "")
714 (("@HDF_BUILD_SHARED_TRUE@AM_LDFLAGS = \
715 -R\\$\\(abs_top_builddir\\)/mfhdf/libsrc/\\.libs \
716 -R\\$\\(abs_top_builddir\\)/hdf/src/\\.libs \\$\\(XDR_ADD\\)") ""))
718 (add-after 'configure 'patch-settings
720 ;; libhdf4.settings contains the full path of the
721 ;; compilers used, and its contents are included in
722 ;; .so-files. We truncate the hashes to avoid
723 ;; unnecessary store references to those compilers:
724 (substitute* "libhdf4.settings"
725 (("(/gnu/store/)([a-Z0-9]*)" all prefix hash)
726 (string-append prefix (string-take hash 10) "...")))
729 (home-page "https://www.hdfgroup.org/products/hdf4/")
731 "Library and multi-object file format for storing and managing data")
732 (description "HDF4 is a library and multi-object file format for storing
733 and managing data between machines. HDF4 is an older hierarchical data format,
734 incompatible with HDF5.")
736 (license:non-copyleft
737 "https://www.hdfgroup.org/ftp/HDF/HDF_Current/src/unpacked/COPYING"))))
739 (define-public hdf4-alt
744 (substitute-keyword-arguments (package-arguments hdf4)
745 ((#:configure-flags flags) `(cons* "--disable-netcdf" ,flags))))
747 "HDF4 without netCDF API, can be combined with the regular netCDF library")))
756 (uri (list (string-append "https://support.hdfgroup.org/ftp/HDF5/releases/"
757 "hdf5-" (version-major+minor version)
758 "/hdf5-" version "/src/hdf5-"
760 (string-append "https://support.hdfgroup.org/ftp/HDF5/"
763 (take (string-split version #\.) 2))
764 "/src/hdf5-" version ".tar.bz2")))
766 (base32 "0f3jfbqpaaq21ighi40qzs52nb52kc2d2yjk541rjmsx20b3ih2r"))
767 (patches (list (search-patch "hdf5-config-date.patch")))))
768 (build-system gnu-build-system)
772 `(("gfortran" ,gfortran)))
773 (outputs '("out" ; core library
774 "fortran")) ; fortran interface
776 `(;; Some of the users, notably Flann, need the C++ interface.
777 #:configure-flags '("--enable-cxx"
779 "--enable-fortran2003")
780 ;; Use -fPIC to allow the R bindings to link with the static libraries
781 #:make-flags (list "CFLAGS=-fPIC"
784 (modify-phases %standard-phases
785 (add-before 'configure 'patch-configure
786 (lambda* (#:key outputs #:allow-other-keys)
787 (substitute* "configure"
789 (substitute* "fortran/src/Makefile.in"
790 (("libhdf5_fortran_la_LDFLAGS =")
791 (string-append "libhdf5_fortran_la_LDFLAGS = -Wl-rpath="
792 (assoc-ref outputs "fortran") "/lib")))
793 (substitute* "hl/fortran/src/Makefile.in"
794 (("libhdf5hl_fortran_la_LDFLAGS =")
795 (string-append "libhdf5hl_fortran_la_LDFLAGS = -Wl,-rpath="
796 (assoc-ref outputs "fortran") "/lib")))
798 (add-after 'configure 'patch-settings
800 ;; libhdf5.settings contains the full path of the
801 ;; compilers used, and its contents are included in
802 ;; libhdf5.so. We truncate the hashes to avoid
803 ;; unnecessary store references to those compilers:
804 (substitute* "src/libhdf5.settings"
805 (("(/gnu/store/)([a-Z0-9]*)" all prefix hash)
806 (string-append prefix (string-take hash 10) "..."))
807 ;; Don't record the build-time kernel version to make the
808 ;; settings file reproducible.
809 (("Uname information:.*")
810 "Uname information: Linux\n"))
812 (add-after 'install 'patch-references
813 (lambda* (#:key inputs outputs #:allow-other-keys)
814 (let ((bin (string-append (assoc-ref outputs "out") "/bin"))
815 (zlib (assoc-ref inputs "zlib")))
816 (substitute* (find-files bin "h5p?cc")
818 (string-append "-L" zlib "/lib " lib)))
820 (add-after 'install 'split
821 (lambda* (#:key inputs outputs #:allow-other-keys)
822 ;; Move all fortran-related files
823 (let* ((out (assoc-ref outputs "out"))
824 (bin (string-append out "/bin"))
825 (lib (string-append out "/lib"))
826 (inc (string-append out "/include"))
827 (ex (string-append out "/share/hdf5_examples/fortran"))
828 (fort (assoc-ref outputs "fortran"))
829 (fbin (string-append fort "/bin"))
830 (flib (string-append fort "/lib"))
831 (finc (string-append fort "/include"))
832 (fex (string-append fort "/share/hdf5_examples/fortran")))
837 ;; Note: When built with --enable-parallel, the 'h5fc' file
838 ;; doesn't exist, hence this condition.
839 (when (file-exists? (string-append bin "/h5fc"))
840 (rename-file (string-append bin "/h5fc")
841 (string-append fbin "/h5fc")))
842 (for-each (lambda (file)
844 (string-append flib "/" (basename file))))
845 (find-files lib ".*fortran.*"))
846 (for-each (lambda (file)
848 (string-append finc "/" (basename file))))
849 (find-files inc ".*mod"))
850 (for-each (lambda (file)
852 (string-append fex "/" (basename file))))
853 (find-files ex ".*"))
854 (delete-file-recursively ex))
856 (home-page "http://www.hdfgroup.org")
857 (synopsis "Management suite for extremely large and complex data")
858 (description "HDF5 is a suite that makes possible the management of
859 extremely large and complex data collections.")
860 (license (license:x11-style
861 "http://www.hdfgroup.org/ftp/HDF5/current/src/unpacked/COPYING"))))
863 (define-public hdf5-1.10
864 (package (inherit hdf5)
869 (uri (list (string-append "https://support.hdfgroup.org/ftp/HDF5/releases/"
870 "hdf5-" (version-major+minor version)
871 "/hdf5-" version "/src/hdf5-"
873 (string-append "https://support.hdfgroup.org/ftp/HDF5/"
876 (take (string-split version #\.) 2))
877 "/src/hdf5-" version ".tar.bz2")))
879 (base32 "1pr85fa1sh2ky6ai2hs3f21lp252grl2cq3wbyi4rh7dm83gyrqj"))
880 (patches (list (search-patch "hdf5-config-date.patch")))))))
882 (define-public hdf-java
890 "http://www.hdfgroup.org/ftp/HDF5/releases/HDF-JAVA/hdfjni-"
891 version "/src/CMake-hdfjava-" version ".tar.gz"))
893 (base32 "0m1gp2aspcblqzmpqbdpfp6giskws85ds6p5gz8sx7asyp7wznpr"))
894 (modules '((guix build utils)))
895 (snippet ; Make sure we don't use the bundled sources and binaries.
897 (for-each delete-file
898 (list "SZip.tar.gz" "ZLib.tar.gz" "JPEG8d.tar.gz"
899 "HDF4.tar.gz" "HDF5.tar.gz"))
900 (delete-file-recursively ,(string-append "hdfjava-" version "/lib"))
902 (build-system gnu-build-system)
904 `(("jdk" ,icedtea "jdk")
905 ("automake" ,automake) ; For up to date 'config.guess' and 'config.sub'.
907 ("hamcrest-core" ,java-hamcrest-core)
908 ("junit" ,java-junit)
909 ("slf4j-simple" ,java-slf4j-simple)))
915 ("slf4j-api" ,java-slf4j-api)))
918 (list (string-append "--target=" ,(or (%current-target-system) (%current-system)))
919 (string-append "--with-jdk=" (assoc-ref %build-inputs "jdk") "/include,"
920 (assoc-ref %build-inputs "jdk") "/lib" )
921 (string-append "--with-hdf4=" (assoc-ref %build-inputs "hdf4") "/lib")
922 (string-append "--with-hdf5=" (assoc-ref %build-inputs "hdf5") "/lib"))
925 (list (string-append "HDFLIB=" (assoc-ref %build-inputs "hdf4") "/lib")
926 (string-append "HDF5LIB=" (assoc-ref %build-inputs "hdf5") "/lib")
927 (string-append "ZLIB=" (assoc-ref %build-inputs "zlib") "/lib/libz.so")
928 (string-append "JPEGLIB="
929 (assoc-ref %build-inputs "libjpeg") "/lib/libjpeg.so")
933 (modify-phases %standard-phases
934 (add-before 'configure 'chdir-to-source
935 (lambda _ (chdir ,(string-append "hdfjava-" version))))
936 (add-before 'configure 'patch-build
937 (lambda* (#:key inputs outputs #:allow-other-keys)
938 (substitute* "configure"
939 (("COPT=\"") "COPT=\"-O2 ") ; CFLAGS is ignored in Makefiles
940 (("/bin/cat") (which "cat")))
941 ;; Set classpath for compilation
942 (substitute* '("hdf/hdf5lib/Makefile.in"
943 "hdf/hdf5lib/exceptions/Makefile.in"
944 "hdf/hdflib/Makefile.in")
945 (("\\$\\(TOP\\)/lib/slf4j-api-1\\.7\\.5\\.jar")
946 (string-append (assoc-ref inputs "slf4j-api")
947 "/share/java/slf4j-api.jar")))
948 ;; Replace outdated config.sub and config.guess:
949 (with-directory-excursion "config"
950 (for-each (lambda (file)
952 (string-append (assoc-ref inputs "automake")
953 "/share/automake-1.15/" file) file))
954 '("config.sub" "config.guess")))
955 (mkdir-p (string-append (assoc-ref outputs "out")))
956 ;; Set classpath for tests
957 (let* ((build-dir (getcwd))
958 (lib (string-append build-dir "/lib"))
959 (jhdf (string-append lib "/jhdf.jar"))
960 (jhdf5 (string-append lib "/jhdf5.jar"))
963 (string-append (assoc-ref inputs i)
964 "/share/java/" i ".jar"))
965 '("junit" "hamcrest-core" "slf4j-api" "slf4j-simple")))
967 (string-join `("." ,build-dir ,jhdf ,jhdf5 ,@testjars) ":")))
969 (substitute* '("test/hdf5lib/Makefile.in"
970 "test/hdf5lib/junit.sh.in"
971 "examples/runExample.sh.in")
973 (string-append (assoc-ref inputs "coreutils")
976 (string-append (assoc-ref inputs "coreutils")
978 (("CLASSPATH=[^\n]*")
979 (string-append "CLASSPATH=" class-path)))
980 (setenv "CLASSPATH" class-path))
982 (add-before 'check 'build-examples
984 (zero? (apply system* `("javac"
985 ,@(find-files "examples" ".*\\.java")))))))
989 #:parallel-tests? #f ))
990 (home-page "https://support.hdfgroup.org/products/java")
991 (synopsis "Java interface for the HDF4 and HDF5 libraries")
992 (description "Java HDF Interface (JHI) and Java HDF5 Interface (JHI5) use
993 the Java Native Interface to wrap the HDF4 and HDF5 libraries, which are
996 ;; BSD-style license:
997 (license (license:x11-style
998 "https://support.hdfgroup.org/ftp/HDF5/hdf-java\
999 /current/src/unpacked/COPYING"))))
1001 (define-public hdf-eos2
1008 (uri "ftp://edhs1.gsfc.nasa.gov\
1009 /edhs/hdfeos/latest_release/HDF-EOS2.19v1.00.tar.Z")
1011 (base32 "0c9fcz25s292ldap12wxmlrvnyz99z24p63d8fwx51bf8s0s1zrz"))
1012 (patches (search-patches "hdf-eos2-remove-gctp.patch"
1013 "hdf-eos2-build-shared.patch"
1014 "hdf-eos2-fortrantests.patch"))))
1015 (build-system gnu-build-system)
1017 `(("gfortran" ,gfortran)))
1019 `(("hdf4" ,hdf4-alt) ; assume most HDF-EOS2 users won't use the HDF4 netCDF API
1021 ("libjpeg" ,libjpeg)
1024 `( #:configure-flags '("--enable-install-include" "--enable-shared"
1025 "CC=h4cc -Df2cFortran" "LIBS=-lgctp")
1026 #:parallel-tests? #f))
1027 (home-page "http://hdfeos.org/software/library.php#HDF-EOS2")
1028 (synopsis "HDF4-based data format for NASA's Earth Observing System")
1029 (description "HDF-EOS2 is a software library built on HDF4 which supports
1030 the construction of data structures used in NASA's Earth Observing
1031 System (Grid, Point and Swath).")
1033 ;; Source files carry a permissive license header.
1034 (license (license:non-copyleft home-page))))
1036 (define-public hdf-eos5
1042 (uri (string-append "ftp://edhs1.gsfc.nasa.gov\
1043 /edhs/hdfeos5/latest_release/HDF-EOS5." version ".tar.Z"))
1046 "1p83333nzzy8rn5chxlm0hrkjjnhh2w1ji8ac0f9q4xzg838i58i"))
1047 (patches (search-patches "hdf-eos5-build-shared.patch"
1048 "hdf-eos5-remove-gctp.patch"
1049 "hdf-eos5-fix-szip.patch"
1050 "hdf-eos5-fortrantests.patch"))))
1052 `(("gfortran" ,gfortran)))
1053 (build-system gnu-build-system)
1059 `(#:configure-flags '("--enable-install-include" "--enable-shared"
1060 "CC=h5cc -Df2cFortran" "LIBS=-lgctp")
1061 #:parallel-tests? #f))
1062 (synopsis "HDF5-based data format for NASA's Earth Observing System")
1064 "HDF-EOS5 is a software library built on HDF5 to support the construction
1065 of data structures used in NASA's Earth Observing System (Grid, Point and
1067 (home-page "http://www.hdfeos.org/software/library.php#HDF-EOS5")
1069 ;; Source files carry a permissive license header.
1070 (license (license:non-copyleft home-page))))
1072 (define-public hdf5-parallel-openmpi
1073 (package (inherit hdf5)
1074 (name "hdf5-parallel-openmpi")
1077 ,@(package-inputs hdf5)))
1079 (substitute-keyword-arguments (package-arguments hdf5)
1080 ((#:configure-flags flags)
1081 ``("--enable-parallel" ,@(delete "--enable-cxx" ,flags)))
1083 `(modify-phases ,phases
1084 (add-after 'build 'mpi-setup
1086 (add-before 'check 'patch-tests
1088 ;; OpenMPI's mpirun will exit with non-zero status if it
1089 ;; detects an "abnormal termination", i.e. any process not
1090 ;; calling MPI_Finalize(). Since the test is explicitely
1091 ;; avoiding MPI_Finalize so as not to have at_exit and thus
1092 ;; H5C_flush_cache from being called, mpirun will always
1093 ;; complain, so turn this test off.
1094 (substitute* "testpar/Makefile"
1095 (("(^TEST_PROG_PARA.*)t_pflush1(.*)" front back)
1096 (string-append front back "\n")))
1097 (substitute* "tools/h5diff/testph5diff.sh"
1098 (("/bin/sh") (which "sh")))
1100 (synopsis "Management suite for data with parallel IO support")))
1102 (define-public h5check
1109 (uri (string-append "http://www.hdfgroup.org/ftp/HDF5/tools/"
1110 "h5check/src/h5check-" version ".tar.gz"))
1113 "1gm76jbwhz9adbxgn14zx8cj33dmjdr2g5xcy0m9c2gakp8w59kj"))))
1114 (build-system gnu-build-system)
1115 (inputs `(("hdf5" ,hdf5))) ;h5cc for tests
1116 (home-page "https://www.hdfgroup.org/products/hdf5_tools/h5check.html")
1117 (synopsis "HDF5 format checker")
1118 (description "@code{h5check} is a validation tool for verifying that an
1119 HDF5 file is encoded according to the HDF File Format Specification.")
1120 (license (license:x11-style "file://COPYING"))))
1128 (uri (string-append "mirror://sourceforge/itpp/itpp/"
1133 "14ddy2xnb6sgp4hiax9v5sv4pr4l4dd4ps76nfha3nrpr1ikhcqm"))))
1134 (build-system cmake-build-system)
1135 (arguments `(#:tests? #f)) ; Tests require googletest *sources*
1136 (inputs `(("lapack" ,lapack)
1138 ;; FIXME: Even though the fonts are available dvips complains:
1139 ;; "Font cmmi10 not found; characters will be left blank."
1141 `(("texlive" ,texlive-tiny)
1142 ("ghostscript" ,ghostscript)
1143 ("doxygen" ,doxygen)))
1144 (home-page "http://itpp.sourceforge.net")
1145 (synopsis "C++ library of maths, signal processing and communication classes")
1146 (description "IT++ is a C++ library of mathematical, signal processing and
1147 communication classes and functions. Its main use is in simulation of
1148 communication systems and for performing research in the area of
1149 communications. The kernel of the library consists of generic vector and
1150 matrix classes, and a set of accompanying routines. Such a kernel makes IT++
1151 similar to MATLAB, GNU Octave or SciPy.")
1152 (license license:gpl3+)))
1154 (define-public netcdf
1161 (uri (string-append "ftp://ftp.unidata.ucar.edu/pub/netcdf/"
1162 "netcdf-" version ".tar.gz"))
1165 "1blc7ik5yin7i0ls2kag0a9xjk12m0dzx6v1x88az3ras3scci2d"))
1166 (patches (search-patches "netcdf-date-time.patch"
1167 "netcdf-tst_h_par.patch"))))
1168 (build-system gnu-build-system)
1171 ("doxygen" ,doxygen)
1172 ("graphviz" ,graphviz)))
1174 `(("hdf4" ,hdf4-alt)
1177 ("libjpeg" ,libjpeg)))
1179 `(#:configure-flags '("--enable-doxygen" "--enable-dot" "--enable-hdf4")
1181 #:phases (modify-phases %standard-phases
1182 (add-before 'configure 'fix-source-date
1184 ;; As we ${SOURCE_DATE_EPOCH} evaluates to "1" in the build
1185 ;; environment, `date -u -d ${SOURCE_DATE_EPOCH}` will evaluate
1186 ;; to '1st hour of the current day', and therefore makes the
1187 ;; package not reproducible.
1188 (substitute* "./configure"
1189 (("date -u -d \"\\$\\{SOURCE_DATE_EPOCH\\}\"")
1190 "date --date='@0'"))
1192 (add-after 'configure 'patch-settings
1194 ;; libnetcdf.settings contains the full filename of the compilers
1195 ;; used to build the library. We truncate the hashes of those
1196 ;; filenames to avoid unnecessary references to the corresponding
1198 (substitute* "libnetcdf.settings"
1199 (("(/gnu/store/)([a-Z0-9]*)" all prefix hash)
1200 (string-append prefix (string-take hash 10) "...")))
1203 #:parallel-tests? #f)) ;various race conditions
1204 (home-page "http://www.unidata.ucar.edu/software/netcdf/")
1205 (synopsis "Library for scientific data")
1206 (description "NetCDF is an interface for scientific data access and a
1207 software library that provides an implementation of the interface. The netCDF
1208 library defines a machine-independent format for representing scientific data.
1209 Together, the interface, library, and format support the creation, access, and
1210 sharing of scientific data.")
1211 (license (license:x11-style "file://COPYRIGHT"))))
1213 (define-public netcdf-parallel-openmpi
1214 (package (inherit netcdf)
1215 (name "netcdf-parallel-openmpi")
1218 ,@(alist-replace "hdf5" (list hdf5-parallel-openmpi)
1219 (package-inputs netcdf))))
1220 ;; TODO: Replace pkg-config references in nc-config with absolute references
1222 (substitute-keyword-arguments (package-arguments netcdf)
1223 ((#:configure-flags flags)
1224 `(cons* "CC=mpicc" "CXX=mpicxx"
1225 "--enable-parallel-tests"
1226 ;; Shared libraries not supported with parallel IO.
1227 "--disable-shared" "--with-pic"
1230 (define-public netcdf-fortran
1232 (name "netcdf-fortran")
1237 "ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-fortran-"
1241 "0xaxdcg1p83zmypwml3swsnr3ccn38inwldyr1l3wa4dbwbrblxj"))))
1242 (build-system gnu-build-system)
1244 `(#:parallel-tests? #f))
1246 `(("netcdf" ,netcdf)))
1248 `(("gfortran" ,gfortran)))
1249 (synopsis "Fortran interface for the netCDF library")
1250 (description (package-description netcdf))
1251 (home-page (package-home-page netcdf))
1252 (license (package-license netcdf))))
1254 (define-public nlopt
1260 (uri (string-append "http://ab-initio.mit.edu/nlopt/nlopt-"
1263 (base32 "12cfkkhcdf4zmb6h7y6qvvdvqjs2xf9sjpa3rl3bq76px4yn76c0"))))
1264 (build-system gnu-build-system)
1266 `(;; Shared libraries are not built by default. They are required to
1267 ;; build the Guile, Octave, and Python bindings.
1268 #:configure-flags '("--enable-shared")
1271 (modify-phases %standard-phases
1272 (add-before 'configure 'set-libnlopt-file-name
1273 (lambda* (#:key outputs #:allow-other-keys)
1274 ;; Make sure the Scheme module refers to the library by its
1275 ;; absolute file name (we cannot do that from a snippet
1276 ;; because the expansion of @libdir@ contains
1278 (let ((out (assoc-ref outputs "out")))
1279 (substitute* "swig/nlopt.scm.in"
1281 (string-append out "/lib/libnlopt")))
1283 (inputs `(("guile" ,guile-2.0)))
1284 (native-inputs `(("pkg-config" ,pkg-config)))
1285 (home-page "http://ab-initio.mit.edu/wiki/")
1286 (synopsis "Library for nonlinear optimization")
1287 (description "NLopt is a library for nonlinear optimization, providing a
1288 common interface for a number of different free optimization routines available
1289 online as well as original implementations of various other algorithms.")
1290 (license license:lgpl2.1+)))
1292 (define-public ipopt
1299 "http://www.coin-or.org/download/source/Ipopt/Ipopt-"
1303 "09bk2hqy2vgi4yi76xng9zxakddwqy3wij9nx7wf2vfbxxpazrsk"))
1304 (modules '((guix build utils)))
1306 ;; Make sure we don't use the bundled software.
1308 (delete-file-recursively "ThirdParty")
1310 (build-system gnu-build-system)
1312 '(#:phases (modify-phases %standard-phases
1313 (add-after 'install 'add--L-flags-in-ipopt.pc
1314 (lambda* (#:key inputs outputs #:allow-other-keys)
1315 ;; The '.pc' file lists '-llapack -lblas' in "Libs";
1316 ;; move it to "Libs.private" where it belongs, and add a
1317 ;; '-L' flag for LAPACK.
1318 (let ((out (assoc-ref outputs "out"))
1319 (lapack (assoc-ref inputs "lapack")))
1320 (substitute* (string-append out "/lib/pkgconfig/"
1322 (("Libs: (.*)-llapack -lblas(.*)$" _ before after)
1323 (string-append "Libs: " before " " after "\n"
1324 "Libs.private: " before
1325 "-L" lapack "/lib -llapack -lblas "
1329 `(("gfortran" ,gfortran)))
1331 ;; TODO: Maybe add dependency on COIN-MUMPS, ASL, and HSL.
1332 `(("lapack" ,lapack))) ;for both libblas and liblapack
1333 (home-page "http://www.coin-or.org")
1334 (synopsis "Large-scale nonlinear optimizer")
1336 "The Interior Point Optimizer (IPOPT) is a software package for
1337 large-scale nonlinear optimization. It provides C++, C, and Fortran
1339 (license license:epl1.0)))
1341 (define-public ceres
1343 (name "ceres-solver")
1345 (home-page "http://ceres-solver.org/")
1348 (uri (string-append home-page "ceres-solver-"
1352 "13lfxy8x58w8vprr0nkbzziaijlh0vvqshgahvcgw0mrqdgh0i27"))))
1353 (build-system cmake-build-system)
1355 ;; TODO: Build HTML user documentation and install separately.
1356 '(#:configure-flags '("-DBUILD_EXAMPLES=OFF"
1357 "-DBUILD_SHARED_LIBS=ON")
1359 #:phases (modify-phases %standard-phases
1360 (add-before 'configure 'set-library-directory
1362 ;; Install libraries to lib/, not lib64/.
1363 (substitute* "internal/ceres/CMakeLists.txt"
1364 (("set\\(LIB_SUFFIX \"64\"\\)")
1365 "set(LIB_SUFFIX \"\")"))
1368 `(("pkg-config" ,pkg-config)))
1370 `(("glog" ,glog))) ;for #include <glog/glog.h>
1375 ("suitesparse" ,suitesparse)
1376 ("gflags" ,gflags)))
1377 (synopsis "C++ library for solving large optimization problems")
1379 "Ceres Solver is a C++ library for modeling and solving large,
1380 complicated optimization problems. It is a feature rich, mature and
1381 performant library which has been used in production since 2010. Ceres Solver
1382 can solve two kinds of problems:
1384 @item non-linear least squares problems with bounds constraints;
1385 @item general unconstrained optimization problems.
1387 (license license:bsd-3)))
1389 ;; For a fully featured Octave, users are strongly recommended also to install
1390 ;; the following packages: less, ghostscript, gnuplot.
1391 (define-public octave-cli
1398 (uri (string-append "mirror://gnu/octave/octave-"
1402 "0jsdgizlv02an2ppfjwk5qf209zpwi3317yb7jvlsjzxnir3lvhy"))))
1403 (build-system gnu-build-system)
1405 `(("lapack" ,lapack)
1407 ("readline" ,readline)
1412 ("arpack" ,arpack-ng)
1415 ("fontconfig" ,fontconfig)
1416 ("freetype" ,freetype)
1423 ("texinfo" ,texinfo)
1424 ("graphicsmagick" ,graphicsmagick)
1425 ("suitesparse" ,suitesparse)
1426 ("libsndfile" ,libsndfile)
1427 ("portaudio" ,portaudio)
1428 ("alsa-lib" ,alsa-lib)))
1431 ("gfortran" ,gfortran)
1432 ("pkg-config" ,pkg-config)
1434 ;; The following inputs are not actually used in the build process.
1435 ;; However, the ./configure gratuitously tests for their existence and
1436 ;; assumes that programs not present at build time are also not, and
1437 ;; can never be, available at run time! If these inputs are therefore
1438 ;; not present, support for them will be built out. However, Octave
1439 ;; will still run without them, albeit without the features they
1442 ("ghostscript" ,ghostscript)
1443 ("gnuplot" ,gnuplot)))
1444 ;; Octave code uses this variable to detect directories holding multiple CA
1445 ;; certificates to verify peers with. This is required for the networking
1446 ;; functions that require encryption to work properly.
1447 (native-search-paths
1448 (list (search-path-specification
1449 (variable "CURLOPT_CAPATH")
1450 (files '("etc/ssl/certs")))))
1453 (list (string-append "--with-shell="
1454 (assoc-ref %build-inputs "bash")
1457 (modify-phases %standard-phases
1458 (add-after 'configure 'configure-makeinfo
1459 (lambda* (#:key inputs #:allow-other-keys)
1460 (substitute* "libinterp/corefcn/help.h"
1463 "\"" (assoc-ref inputs "texinfo") "/bin/makeinfo\"")))
1465 (home-page "https://www.gnu.org/software/octave/")
1466 (synopsis "High-level language for numerical computation")
1467 (description "GNU Octave is a high-level interpreted language that is
1468 specialized for numerical computations. It can be used for both linear and
1469 non-linear applications and it provides great support for visualizing results.
1470 Work may be performed both at the interactive command-line as well as via
1472 (license license:gpl3+)))
1474 (define-public octave
1475 (package (inherit octave-cli)
1478 (inherit (package-source octave-cli))))
1480 `(("qscintilla" ,qscintilla)
1482 ,@(package-inputs octave-cli)))
1484 `(("qttools" , qttools) ;for lrelease
1485 ("texlive" ,texlive) ;for texi2dvi
1486 ,@(package-native-inputs octave-cli)))
1488 (substitute-keyword-arguments (package-arguments octave-cli)
1490 `(modify-phases ,phases
1491 (add-before 'configure 'patch-qscintilla-library-name
1492 (lambda* (#:key inputs #:allow-other-keys)
1493 ;; The QScintilla library that the Octave configure script tries
1494 ;; to link with should be named libqscintilla-qt5.so, but the
1495 ;; QScintilla input provides the shared library as
1496 ;; libqscintilla2_qt5.so.
1497 (substitute* "configure"
1498 (("qscintilla2-qt5")
1502 (define-public qtoctave
1503 (deprecated-package "qtoctave" octave))
1505 (define-public opencascade-oce
1507 (name "opencascade-oce")
1513 "https://github.com/tpaviot/oce/archive/OCE-"
1516 (patches (search-patches "opencascade-oce-glibc-2.26.patch"))
1519 "0vpmnb0k5y2f7lpmwx9pg9yfq24zjvnsak5alzacncfm1hv9b6cd"))))
1520 (build-system cmake-build-system)
1523 (list "-DOCE_TESTING:BOOL=ON"
1524 "-DOCE_USE_TCL_TEST_FRAMEWORK:BOOL=ON"
1525 "-DOCE_DRAW:BOOL=ON"
1526 (string-append "-DOCE_INSTALL_PREFIX:PATH="
1527 (assoc-ref %outputs "out"))
1528 "-UCMAKE_INSTALL_RPATH")))
1530 `(("freetype" ,freetype)
1537 `(("python" ,python-wrapper)))
1538 (home-page "https://github.com/tpaviot/oce")
1539 (synopsis "Libraries for 3D modeling and numerical simulation")
1541 "Open CASCADE is a set of libraries for the development of applications
1542 dealing with 3D CAD data or requiring industrial 3D capabilities. It includes
1543 C++ class libraries providing services for 3D surface and solid modeling, CAD
1544 data exchange, and visualization. It is used for development of specialized
1545 software dealing with 3D models in design (CAD), manufacturing (CAM),
1546 numerical simulation (CAE), measurement equipment (CMM), and quality
1547 control (CAQ) domains.
1549 This is the ``Community Edition'' (OCE) of Open CASCADE, which gathers
1550 patches, improvements, and experiments contributed by users over the official
1551 Open CASCADE library.")
1552 (license (list license:lgpl2.1; OCE libraries, with an exception for the
1553 ; use of header files; see
1554 ; OCCT_LGPL_EXCEPTION.txt
1555 license:public-domain; files
1556 ; src/Standard/Standard_StdAllocator.hxx and
1557 ; src/NCollection/NCollection_StdAllocator.hxx
1558 license:expat; file src/OpenGl/OpenGl_glext.h
1559 license:bsd-3)))); test framework gtest
1568 (uri (string-append "http://gmsh.info/src/gmsh-"
1569 version "-source.tgz"))
1571 (base32 "1slf0bfkwrcgn6296wb4qhbk4ahz6i4wfb10hnim08x05vrylag8"))
1572 (modules '((guix build utils)))
1574 ;; Remove non-free METIS code
1576 (delete-file-recursively "contrib/Metis")
1578 (build-system cmake-build-system)
1581 ("gfortran" ,gfortran)
1587 ("opencascade-oce" ,opencascade-oce)
1589 ("libxext" ,libxext)))
1591 `(("fontconfig" ,fontconfig)
1592 ("libxft" ,libxft)))
1594 `(#:configure-flags `("-DENABLE_METIS:BOOL=OFF"
1595 "-DENABLE_BUILD_SHARED:BOOL=ON"
1596 "-DENABLE_BUILD_DYNAMIC:BOOL=ON")))
1597 (home-page "http://www.geuz.org/gmsh/")
1598 (synopsis "3D finite element grid generator")
1599 (description "Gmsh is a 3D finite element grid generator with a built-in
1600 CAD engine and post-processor. Its design goal is to provide a fast, light
1601 and user-friendly meshing tool with parametric input and advanced
1602 visualization capabilities. Gmsh is built around four modules: geometry,
1603 mesh, solver and post-processing. The specification of any input to these
1604 modules is done either interactively using the graphical user interface or in
1605 ASCII text files using Gmsh's own scripting language.")
1606 (license license:gpl2+)))
1608 (define-public maxflow
1615 (url "https://github.com/gerddie/maxflow.git")
1616 (commit "42401fa54823d16b9da47716f04e5d9ef1605875")))
1617 (file-name (string-append name "-" version "-checkout"))
1620 "0rll38whw55h0vcjrrwdnh9ascvxby0ph7n1l0d12z17cg215kkb"))))
1621 (build-system cmake-build-system)
1622 (home-page "http://pub.ist.ac.at/~vnk/software.html")
1623 (synopsis "Library implementing Maxflow algorithm")
1624 (description "An implementation of the maxflow algorithm described in
1625 @cite{An Experimental Comparison of Min-Cut/Max-Flow Algorithms for
1626 Energy Minimization in Computer Vision.\n
1627 Yuri Boykov and Vladimir Kolmogorov.\n
1628 In IEEE Transactions on Pattern Analysis and Machine Intelligence,\n
1630 (license license:gpl3+)))
1632 (define-public petsc
1639 ;; The *-lite-* tarball does not contain the *large* documentation
1640 (uri (string-append "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/"
1641 "petsc-lite-" version ".tar.gz"))
1643 (base32 "0bl64pydak3rblnjffi482r8bin4xim9sb37ksl2jkcxf0i0irsi"))))
1644 (outputs '("out" ;libraries and headers
1645 "examples")) ;~30MiB of examples
1646 (build-system gnu-build-system)
1648 `(("python" ,python-2)))
1650 `(("gfortran" ,gfortran)
1652 ("superlu" ,superlu)
1653 ;; leaving out hdf5 and fftw, as petsc expects them to be built with mpi
1654 ;; leaving out opengl, as configuration seems to only be for mac
1657 `(#:test-target "test"
1658 #:parallel-build? #f ;build is parallel by default
1664 ;; Honor (parallel-job-count) for build. Do not use --with-make-np,
1665 ;; whose value is dumped to $out/lib/petsc/conf/petscvariables.
1666 (list (format #f "MAKE_NP=~a" (parallel-job-count)))
1668 (modify-phases %standard-phases
1670 ;; PETSc's configure script is actually a python script, so we can't
1671 ;; run it with bash.
1672 (lambda* (#:key outputs (configure-flags '())
1674 (let* ((prefix (assoc-ref outputs "out"))
1675 (flags `(,(string-append "--prefix=" prefix)
1676 ,@configure-flags)))
1677 (format #t "build directory: ~s~%" (getcwd))
1678 (format #t "configure flags: ~s~%" flags)
1679 (apply invoke "./configure" flags))))
1680 (add-after 'configure 'clean-local-references
1681 (lambda* (#:key outputs #:allow-other-keys)
1682 (let ((out (assoc-ref outputs "out")))
1683 (substitute* (find-files "." "^petsc(conf|machineinfo).h$")
1684 ;; Prevent build directory from leaking into compiled code
1686 ;; Scrub timestamp for reproducibility
1687 ((".*Libraries compiled on.*") ""))
1688 (substitute* (find-files "." "petscvariables")
1689 ;; Do not expose build machine characteristics, set to defaults.
1690 (("MAKE_NP = [:digit:]+") "MAKE_NP = 2")
1691 (("NPMAX = [:digit:]+") "NPMAX = 2"))
1693 (add-after 'install 'clean-install
1694 ;; Try to keep installed files from leaking build directory names.
1695 (lambda* (#:key inputs outputs #:allow-other-keys)
1696 (let ((out (assoc-ref outputs "out")))
1697 (substitute* (map (lambda (file)
1698 (string-append out "/lib/petsc/conf/" file))
1699 '("petscvariables"))
1701 ;; Make compiler references point to the store
1702 (substitute* (string-append out "/lib/petsc/conf/petscvariables")
1703 (("= (gcc|g\\+\\+|gfortran)" _ compiler)
1704 (string-append "= " (which compiler))))
1705 ;; PETSc installs some build logs, which aren't necessary.
1706 (for-each (lambda (file)
1707 (let ((f (string-append out "/lib/petsc/conf/" file)))
1708 (when (file-exists? f)
1710 '("configure.log" "make.log" "gmake.log"
1711 "test.log" "error.log" "RDict.db"
1712 "PETScBuildInternal.cmake"
1713 ;; Once installed, should uninstall with Guix
1716 (add-after 'install 'move-examples
1717 (lambda* (#:key outputs #:allow-other-keys)
1718 (let* ((out (assoc-ref outputs "out"))
1719 (examples (assoc-ref outputs "examples"))
1720 (exdir (string-append out "/share/petsc/examples"))
1721 (exdir' (string-append examples "/share/petsc/examples")))
1722 (copy-recursively exdir exdir')
1723 (delete-file-recursively exdir)
1725 (home-page "http://www.mcs.anl.gov/petsc")
1726 (synopsis "Library to solve PDEs")
1727 (description "PETSc, pronounced PET-see (the S is silent), is a suite of
1728 data structures and routines for the scalable (parallel) solution of
1729 scientific applications modeled by partial differential equations.")
1730 (license (license:non-copyleft
1731 "http://www.mcs.anl.gov/petsc/documentation/copyright.html"))))
1733 (define-public petsc-complex
1734 (package (inherit petsc)
1735 (name "petsc-complex")
1737 (substitute-keyword-arguments (package-arguments petsc)
1738 ((#:configure-flags cf)
1739 `(cons "--with-scalar-type=complex" ,cf))))
1740 (synopsis "Library to solve PDEs (with complex scalars)")))
1742 (define-public petsc-openmpi
1743 (package (inherit petsc)
1744 (name "petsc-openmpi")
1746 `(("hdf5" ,hdf5-parallel-openmpi)
1747 ("hypre" ,hypre-openmpi)
1749 ("mumps" ,mumps-openmpi)
1750 ("openmpi" ,openmpi)
1751 ("scalapack" ,scalapack)
1752 ("scotch" ,pt-scotch32)
1753 ,@(package-inputs petsc)))
1755 (substitute-keyword-arguments (package-arguments petsc)
1756 ((#:configure-flags cf)
1758 "--with-mpiexec=mpirun"
1761 "--with-scalapack=1"
1763 ,(string-append "--with-mpi-dir="
1764 (assoc-ref %build-inputs "openmpi"))
1765 ,(string-append "--with-hdf5-include="
1766 (assoc-ref %build-inputs "hdf5") "/include")
1767 ,(string-append "--with-hdf5-lib="
1768 (assoc-ref %build-inputs "hdf5") "/lib/libhdf5.a")
1769 ,@(delete "--with-mpi=0" ,cf)))
1771 `(modify-phases ,phases
1772 (add-before 'configure 'mpi-setup
1773 ,%openmpi-setup)))))
1774 (synopsis "Library to solve PDEs (with MUMPS and MPI support)")))
1776 (define-public petsc-complex-openmpi
1777 (package (inherit petsc-complex)
1778 (name "petsc-complex-openmpi")
1780 `(("openmpi" ,openmpi)
1781 ,@(package-inputs petsc-complex)))
1783 (substitute-keyword-arguments (package-arguments petsc-complex)
1784 ((#:configure-flags cf)
1785 ``("--with-mpiexec=mpirun"
1786 ,(string-append "--with-mpi-dir="
1787 (assoc-ref %build-inputs "openmpi"))
1788 ,@(delete "--with-mpi=0" ,cf)))))
1789 (synopsis "Library to solve PDEs (with complex scalars and MPI support)")))
1791 (define-public python-petsc4py
1793 (name "python-petsc4py")
1798 (uri (pypi-uri "petsc4py" version))
1801 "0ch3g6dsvxl7qi984fcssv7cxfbif4bw04gkvxl2l1b8wrmvrm25"))))
1802 (build-system python-build-system)
1805 (modify-phases %standard-phases
1806 (add-before 'build 'pre-build
1808 ;; Define path to PETSc installation.
1809 (setenv "PETSC_DIR" (assoc-ref %build-inputs "petsc"))
1811 (add-before 'check 'mpi-setup
1814 `(("petsc" ,petsc-openmpi)
1815 ("python-numpy" ,python-numpy)))
1816 (home-page "https://bitbucket.org/petsc/petsc4py/")
1817 (synopsis "Python bindings for PETSc")
1818 (description "PETSc, the Portable, Extensible Toolkit for
1819 Scientific Computation, is a suite of data structures and routines for
1820 the scalable (parallel) solution of scientific applications modeled by
1821 partial differential equations. It employs the MPI standard for all
1822 message-passing communication. @code{petsc4py} provides Python
1823 bindings to almost all functions of PETSc.")
1824 (license license:bsd-3)))
1826 (define-public python-kiwisolver
1828 (name "python-kiwisolver")
1832 (uri (pypi-uri "kiwisolver" version))
1835 "0y22ci86znwwwfhbmvbgdfnbi6lv5gv2xkdlxvjw7lml43ayafyf"))))
1836 (build-system python-build-system)
1837 (home-page "https://github.com/nucleic/kiwi")
1838 (synopsis "Fast implementation of the Cassowary constraint solver")
1840 "Kiwi is an efficient C++ implementation of the Cassowary constraint
1841 solving algorithm. Kiwi has been designed from the ground up to be
1842 lightweight and fast. Kiwi ranges from 10x to 500x faster than the original
1843 Cassowary solver with typical use cases gaining a 40x improvement. Memory
1844 savings are consistently > 5x.")
1845 (license license:bsd-3)))
1847 (define-public python2-kiwisolver
1848 (package-with-python2 python-kiwisolver))
1850 (define-public slepc
1857 (uri (string-append "http://slepc.upv.es/download/distrib/slepc-"
1861 "188j1a133q91h8pivpnzwcf78kz8dvz2nzf6ndnjygdbqb48fizn"))))
1862 (build-system gnu-build-system)
1864 `(("python" ,python-2)))
1866 `(("arpack" ,arpack-ng)
1867 ("gfortran" ,gfortran)))
1869 `(("petsc" ,petsc)))
1871 `(#:parallel-build? #f ;build is parallel by default
1873 `(,(string-append "--with-arpack-dir="
1874 (assoc-ref %build-inputs "arpack") "/lib"))
1875 #:make-flags ;honor (parallel-job-count)
1876 `(,(format #f "MAKE_NP=~a" (parallel-job-count)))
1878 (modify-phases %standard-phases
1880 ;; configure is a python script, so we can't run it with bash.
1881 (lambda* (#:key inputs outputs (configure-flags '())
1883 (let* ((prefix (assoc-ref outputs "out"))
1884 (flags `(,(string-append "--prefix=" prefix)
1885 ,@configure-flags)))
1886 (format #t "build directory: ~s~%" (getcwd))
1887 (format #t "configure flags: ~s~%" flags)
1888 (setenv "SLEPC_DIR" (getcwd))
1889 (setenv "PETSC_DIR" (assoc-ref inputs "petsc"))
1890 (apply invoke "./configure" flags))))
1891 (add-after 'install 'delete-doc
1892 ;; TODO: SLEPc installs HTML documentation alongside headers in
1893 ;; $out/include. We'd like to move them to share/doc, but delete
1894 ;; them for now, as they are incomplete and installing the complete
1895 ;; documentation is difficult.
1896 (lambda* (#:key outputs #:allow-other-keys)
1897 (let* ((out (assoc-ref outputs "out")))
1898 (for-each delete-file (find-files out "\\.html$"))
1900 (add-after 'install 'clean-install
1901 ;; Clean up unnecessary build logs from installation.
1902 (lambda* (#:key outputs #:allow-other-keys)
1903 (let ((out (assoc-ref outputs "out")))
1904 (for-each (lambda (file)
1905 (let ((f (string-append out "/lib/slepc/conf/" file)))
1906 (when (file-exists? f)
1908 '("configure.log" "make.log" "gmake.log"
1909 "test.log" "error.log" "RDict.db"
1912 (home-page "http://slepc.upv.es")
1913 (synopsis "Scalable library for eigenproblems")
1914 (description "SLEPc is a software library for the solution of large sparse
1915 eigenproblems on parallel computers. It can be used for the solution of
1916 linear eigenvalue problems formulated in either standard or generalized form,
1917 as well as other related problems such as the singular value decomposition.
1918 The emphasis of the software is on methods and techniques appropriate for
1919 problems in which the associated matrices are sparse, for example, those
1920 arising after the discretization of partial differential equations.")
1921 (license license:bsd-2)))
1923 (define-public slepc-complex
1924 (package (inherit slepc)
1925 (name "slepc-complex")
1927 `(("petsc" ,petsc-complex)
1928 ,@(alist-delete "petsc" (package-propagated-inputs slepc))))
1929 (synopsis "Scalable library for eigenproblems (with complex scalars)")))
1931 (define-public slepc-openmpi
1932 (package (inherit slepc)
1933 (name "slepc-openmpi")
1935 (substitute-keyword-arguments (package-arguments slepc)
1936 ((#:phases phases '%standard-phases)
1937 `(modify-phases ,phases
1938 (add-before 'check 'mpi-setup
1939 ,%openmpi-setup)))))
1942 ("arpack" ,arpack-ng-openmpi)
1943 ,@(alist-delete "arpack" (package-inputs slepc))))
1945 `(("petsc" ,petsc-openmpi)
1946 ,@(alist-delete "petsc" (package-propagated-inputs slepc))))
1947 (synopsis "Scalable library for eigenproblems (with MPI support)")))
1949 (define-public slepc-complex-openmpi
1950 (package (inherit slepc-openmpi)
1951 (name "slepc-complex-openmpi")
1953 `(("petsc" ,petsc-complex-openmpi)
1954 ,@(alist-delete "petsc" (package-propagated-inputs slepc-openmpi))))
1955 (synopsis "Scalable library for eigenproblems (with complex scalars and MPI support)")))
1957 (define-public python-slepc4py
1959 (name "python-slepc4py")
1964 (uri (pypi-uri "slepc4py" version))
1967 "0x049dyc8frgh79fvvavf4vlbqp4mgm61nsaivzdav4316vvlv1j"))))
1968 (build-system python-build-system)
1971 (modify-phases %standard-phases
1972 (add-before 'build 'pre-build
1974 ;; Define path to PETSc installation.
1975 (setenv "PETSC_DIR" (assoc-ref %build-inputs "petsc"))
1976 ;; Define path to SLEPc installation.
1977 (setenv "SLEPC_DIR" (assoc-ref %build-inputs "slepc"))
1979 (add-before 'check 'mpi-setup
1982 `(("python-numpy" ,python-numpy)
1983 ("python-petsc4py" ,python-petsc4py)
1984 ("slepc" ,slepc-openmpi)))
1985 (home-page "https://bitbucket.org/slepc/slepc4py/")
1986 (synopsis "Python bindings for SLEPc")
1987 (description "SLEPc, the Scalable Library for Eigenvalue Problem
1988 Computations, is based on PETSc, the Portable, Extensible Toolkit for
1989 Scientific Computation. It employs the MPI standard for all
1990 message-passing communication. @code{slepc4py} provides Python
1991 bindings to almost all functions of SLEPc.")
1992 (license license:bsd-3)))
1994 (define-public mumps
2001 (uri (string-append "http://mumps.enseeiht.fr/MUMPS_"
2005 "1s9asin08zqzmh08257sdghhivvy9vjif7c53fhaxaax2kd5qd7b"))
2006 (patches (search-patches "mumps-build-parallelism.patch"))))
2007 (build-system gnu-build-system)
2009 `(("fortran" ,gfortran)
2010 ;; These are required for linking against mumps, but we let the user
2011 ;; declare the dependency.
2014 ("scotch" ,scotch)))
2016 `(#:modules ((ice-9 match)
2019 ,@%gnu-build-system-modules)
2021 (modify-phases %standard-phases
2023 (lambda* (#:key inputs #:allow-other-keys)
2024 (call-with-output-file "Makefile.inc"
2035 INCSEQ = -I$(topdir)/libseq
2036 LIBSEQ = -L$(topdir)/libseq -lmpiseq
2037 LIBSEQNEEDED = libseqneeded~;
2041 AR = ar vr # rules require trailing space, ugh...
2043 LIBBLAS = -L~a -lopenblas~@[
2044 SCALAP = -L~a -lscalapack~]
2045 LIBOTHERS = -pthread
2048 OPTF = -O2 -DALLOW_NON_INIT $(PIC)
2052 LIBS = $(SCALAP) $(LIBSEQ)
2053 LPORDDIR = $(topdir)/PORD/lib
2054 IPORD = -I$(topdir)/PORD/include
2055 LPORD = -L$(LPORDDIR) -lpord
2056 ORDERINGSF = -Dpord~@[
2058 IMETIS = -I$(METISDIR)/include
2059 LMETIS = -L$(METISDIR)/lib -lmetis
2060 ORDERINGSF += -Dmetis~]~@[~:{
2062 ISCOTCH = -I$(SCOTCHDIR)/include
2063 LSCOTCH = -L$(SCOTCHDIR)/lib ~a-lesmumps -lscotch -lscotcherr
2064 ORDERINGSF += ~a~}~]
2065 ORDERINGSC = $(ORDERINGSF)
2066 LORDERINGS = $(LPORD) $(LMETIS) $(LSCOTCH)
2067 IORDERINGSF = $(ISCOTCH)
2068 IORDERINGSC = $(IPORD) $(IMETIS) $(ISCOTCH)"
2069 (assoc-ref inputs "mpi")
2070 (assoc-ref inputs "blas")
2071 (assoc-ref inputs "scalapack")
2072 (assoc-ref inputs "metis")
2073 (match (list (assoc-ref inputs "pt-scotch")
2074 (assoc-ref inputs "scotch"))
2078 `((,scotch "" "-Dscotch")))
2081 "-lptesmumps -lptscotch -lptscotcherr "
2082 "-Dptscotch")))))))))
2084 ;; By default only the d-precision library is built. Make with "all"
2085 ;; target so that all precision libraries and examples are built.
2087 (invoke "make" "all"
2088 (format #f "-j~a" (parallel-job-count)))))
2090 ;; Run the simple test drivers, which read test input from stdin:
2091 ;; from the "real" input for the single- and double-precision
2092 ;; testers, and from the "cmplx" input for complex-precision
2093 ;; testers. The EXEC-PREFIX key is used by the mumps-openmpi
2094 ;; package to prefix execution with "mpirun".
2095 (lambda* (#:key (exec-prefix '()) #:allow-other-keys)
2096 (with-directory-excursion "examples"
2099 (let ((tester (apply open-pipe*
2102 ,(string-append "./" prec
2104 (input (open-input-file
2105 (string-append "input_simpletest_" type))))
2107 (dump-port input tester)
2109 (zero? (close-pipe tester)))))
2111 '("real" "real" "cmplx" "cmplx")))))
2113 (lambda* (#:key outputs #:allow-other-keys)
2114 (let* ((out (assoc-ref outputs "out"))
2115 (libdir (string-append out "/lib")))
2116 (copy-recursively "lib" libdir)
2117 (copy-recursively "include" (string-append out "/include"))
2118 (when (file-exists? "libseq/libmpiseq.a")
2119 (install-file "libseq/libmpiseq.a" libdir))
2121 (home-page "http://mumps.enseeiht.fr")
2122 (synopsis "Multifrontal sparse direct solver")
2124 "MUMPS (MUltifrontal Massively Parallel sparse direct Solver) solves a
2125 sparse system of linear equations A x = b using Guassian elimination.")
2126 (license license:cecill-c)))
2128 (define-public mumps-metis
2129 (package (inherit mumps)
2130 (name "mumps-metis")
2132 (alist-delete "scotch" (package-inputs mumps)))))
2134 (define-public mumps-openmpi
2135 (package (inherit mumps)
2136 (name "mumps-openmpi")
2139 ("scalapack" ,scalapack)
2140 ("pt-scotch" ,pt-scotch)
2141 ,@(alist-delete "scotch" (package-inputs mumps))))
2143 (substitute-keyword-arguments (package-arguments mumps)
2145 `(modify-phases ,phases
2146 (add-before 'check 'mpi-setup
2150 ((assoc-ref ,phases 'check)
2151 #:exec-prefix '("mpirun" "-n" "2"))))))))
2152 (synopsis "Multifrontal sparse direct solver (with MPI)")))
2154 (define-public mumps-metis-openmpi
2155 (package (inherit mumps-openmpi)
2156 (name "mumps-metis-openmpi")
2158 (alist-delete "pt-scotch" (package-inputs mumps-openmpi)))))
2160 (define-public r-quadprog
2167 (uri (cran-uri "quadprog" version))
2170 "0jg3r6abmhp8r9vkbhpx9ldjfw6vyl1m4c5vwlyjhk1mi03656fr"))))
2171 (build-system r-build-system)
2173 `(("gfortran" ,gfortran)))
2174 (home-page "https://cran.r-project.org/web/packages/quadprog")
2175 (synopsis "Functions to solve quadratic programming problems")
2177 "This package contains routines and documentation for solving quadratic
2178 programming problems.")
2179 (license license:gpl3+)))
2181 (define-public r-pracma
2187 (uri (cran-uri "pracma" version))
2189 (base32 "18zhni05gwnxbphl6bmjjxmsgg5wwnnkwlb4g971cqyw3dsd83ki"))))
2190 (build-system r-build-system)
2191 (home-page "https://cran.r-project.org/web/packages/pracma/")
2192 (synopsis "Practical numerical math functions")
2193 (description "This package provides functions for numerical analysis and
2194 linear algebra, numerical optimization, differential equations, plus some
2195 special functions. It uses Matlab function names where appropriate to simplify
2197 (license license:gpl3+)))
2199 (define-public ruby-asciimath
2201 (name "ruby-asciimath")
2206 (uri (rubygems-uri "asciimath" version))
2209 "1d80kiph5mc78zps7si1hv48kv4k12mzaq8jk5kb3pqpjdr72qmc"))))
2210 (build-system ruby-build-system)
2213 (modify-phases %standard-phases
2215 ;; https://github.com/asciidoctor/asciimath/commit/1c06fdc8086077f4785479f78b0823a4a72d7948
2216 (add-after 'unpack 'patch-remove-spurious-backslashes
2218 (substitute* "spec/parser_spec.rb"
2223 `(("bundler" ,bundler)
2224 ("ruby-rspec" ,ruby-rspec)))
2225 (synopsis "AsciiMath parsing and conversion library")
2227 "A pure Ruby AsciiMath parsing and conversion library. AsciiMath is an
2228 easy-to-write markup language for mathematics.")
2229 (home-page "https://github.com/asciidoctor/asciimath")
2230 (license license:expat)))
2232 (define-public superlu
2239 (uri (string-append "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/"
2240 "superlu_" version ".tar.gz"))
2242 (base32 "0qzlb7cd608q62kyppd0a8c65l03vrwqql6gsm465rky23b6dyr8"))
2243 (modules '((guix build utils)))
2245 ;; Replace the non-free implementation of MC64 with a stub adapted
2248 (use-modules (ice-9 regex)
2250 (call-with-output-file "SRC/mc64ad.c"
2255 void mc64id_(int *a) {
2256 fprintf (stderr, \"SuperLU: non-free MC64 not available. Aborting.\\n\");
2259 void mc64ad_ (int *a, int *b, int *c, int *d, int *e, double *f, int *g,
2260 int *h, int *i, int *j, int *k, double *l, int *m, int *n) {
2261 fprintf (stderr, \"SuperLU: non-free MC64 not available. Aborting.\\n\");
2264 ;; Remove the corresponding license verbiage. MC64 license follows
2265 ;; a "------" line separator.
2266 (with-atomic-file-replacement "License.txt"
2267 (let ((rx (make-regexp "-{8}")))
2270 (let ((line (read-line in 'concat)))
2271 (unless (regexp-exec rx line)
2275 (build-system cmake-build-system)
2279 `(("blas" ,openblas)
2280 ("gfortran" ,gfortran)))
2282 `(#:configure-flags '("-Denable_blaslib:BOOL=NO" ;do not use internal cblas
2283 "-DTPL_BLAS_LIBRARIES=openblas"
2284 "-DBUILD_SHARED_LIBS:BOOL=YES")))
2285 (home-page "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/")
2286 (synopsis "Supernodal direct solver for sparse linear systems")
2288 "SuperLU is a general purpose library for the direct solution of large,
2289 sparse, nonsymmetric systems of linear equations on high performance machines.
2290 The library is written in C and is callable from either C or Fortran. The
2291 library routines perform an LU decomposition with partial pivoting and
2292 triangular system solves through forward and back substitution. The library
2293 also provides threshold-based ILU factorization preconditioners.")
2294 (license (list license:bsd-3
2295 license:gpl2+ ;EXAMPLE/*fgmr.c
2296 (license:fsf-free "file://SRC/colamd.h")))))
2298 (define-public superlu-dist
2300 (name "superlu-dist")
2305 (uri (string-append "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/"
2306 "superlu_dist_" version ".tar.gz"))
2308 (base32 "0pqgcgh1yxhfzs99fas3mggajzd5wca3nbyp878rziy74gfk03dl"))
2309 (modules '((guix build utils)))
2311 ;; Replace the non-free implementation of MC64 with a stub
2313 (call-with-output-file "SRC/mc64ad_dist.c"
2318 void mc64id_dist(int *a) {
2319 fprintf (stderr, \"SuperLU_DIST: non-free MC64 not available. Aborting.\\n\");
2322 void mc64ad_dist (int *a, int *b, int *c, int *d, int *e, double *f, int *g,
2323 int *h, int *i, int *j, int *k, double *l, int *m, int *n) {
2324 fprintf (stderr, \"SuperLU_DIST: non-free MC64 not available. Aborting.\\n\");
2327 (substitute* "SRC/util.c" ;adjust default algorithm
2328 (("RowPerm[[:blank:]]*=[[:blank:]]*LargeDiag_MC64;")
2329 ;; TODO: set to "LargeDiag_AWPM" once combinatorial-blas has
2330 ;; general (i.e. non-square) processor-grid support.
2331 "RowPerm = NOROWPERM;"))
2333 (patches (search-patches "superlu-dist-scotchmetis.patch"
2334 "superlu-dist-awpm-grid.patch"))))
2335 (build-system cmake-build-system)
2339 `(("gfortran" ,gfortran)
2342 ("combblas" ,combinatorial-blas)))
2344 `(("mpi" ,openmpi) ;headers include MPI heades
2345 ("parmetis" ,pt-scotch32 "metis")
2346 ("pt-scotch" ,pt-scotch32)))
2348 `(#:parallel-tests? #f ;tests use MPI and OpenMP
2349 #:configure-flags (list "-DBUILD_SHARED_LIBS:BOOL=YES"
2350 "-DTPL_ENABLE_COMBBLASLIB=YES"
2351 "-DTPL_BLAS_LIBRARIES=-lopenblas"
2352 "-DTPL_LAPACK_LIBRARIES=-llapack"
2353 (string-append "-DTPL_PARMETIS_LIBRARIES="
2355 '("ptscotchparmetis" "ptscotch" "ptscotcherr"
2356 "scotchmetis" "scotch" "scotcherr")
2358 (string-append "-DTPL_PARMETIS_INCLUDE_DIRS="
2359 (assoc-ref %build-inputs "parmetis")
2361 "-DTPL_ENABLE_COMBBLASLIB=ON"
2362 (string-append "-DTPL_COMBBLAS_INCLUDE_DIRS="
2363 (assoc-ref %build-inputs "combblas")
2364 "/include/CombBLAS;"
2365 (assoc-ref %build-inputs "combblas")
2366 "/include/BipartiteMatchings")
2367 "-DTPL_COMBBLAS_LIBRARIES=CombBLAS")
2369 (modify-phases %standard-phases
2370 (add-before 'configure 'set-c++-standard
2372 (substitute* "CMakeLists.txt"
2373 ;; AWPM headers require C++14
2374 (("CMAKE_CXX_STANDARD 11") "CMAKE_CXX_STANDARD 14"))))
2375 (add-before 'check 'mpi-setup
2377 (add-before 'check 'omp-setup
2378 (lambda _ (setenv "OMP_NUM_THREADS" "1") #t)))))
2379 (home-page (package-home-page superlu))
2380 (synopsis "Parallel supernodal direct solver")
2382 "SuperLU_DIST is a parallel extension to the serial SuperLU library.
2383 It is targeted for distributed memory parallel machines. SuperLU_DIST is
2384 implemented in ANSI C, and MPI for communications.")
2385 (license license:bsd-3)))
2387 (define-public scotch
2394 (uri (string-append "https://gforge.inria.fr/frs/download.php/"
2395 "latestfile/298/scotch_" version ".tar.gz"))
2397 (base32 "1ky4k9r6jvajhqaqnnx6h8fkmds2yxgp70dpr1qzwcyhi2nhqvv8"))
2398 (patches (search-patches "scotch-build-parallelism.patch"
2399 "scotch-integer-declarations.patch"))))
2400 (build-system gnu-build-system)
2405 (outputs '("out" "metis"))
2407 `(#:make-flags (list (string-append "prefix=" %output))
2409 (modify-phases %standard-phases
2411 'unpack 'chdir-to-src
2412 (lambda _ (chdir "src") #t))
2416 (call-with-output-file "Makefile.inc"
2430 CFLAGS = -O2 -g -fPIC $(CPPFLAGS)
2431 LDFLAGS = -lz -lm -lrt -lpthread
2433 LEX = flex -Pscotchyy -olex.yy.c
2438 YACC = bison -pscotchyy -y -b y
2440 '("COMMON_FILE_COMPRESS_GZ"
2442 "COMMON_RANDOM_FIXED_SEED"
2443 "INTSIZE64" ;use 'int64_t'
2444 ;; Prevents symbolc clashes with libesmumps
2446 ;; XXX: Causes invalid frees in superlu-dist tests
2448 ;; "SCOTCH_PTHREAD_NUMBER=2"
2449 "restrict=__restrict"))))
2451 (add-after 'build 'build-esmumps
2454 (format #f "-j~a" (parallel-job-count))
2456 (add-before 'install 'make-install-dirs
2457 (lambda* (#:key outputs #:allow-other-keys)
2458 (mkdir (assoc-ref outputs "out"))))
2459 (add-after 'install 'install-metis
2460 (lambda* (#:key outputs #:allow-other-keys)
2461 (let ((out (assoc-ref outputs "metis")))
2463 ;; metis files are not installed with 'make install'
2464 (for-each (lambda (f)
2465 (install-file f (string-append out "/include")))
2466 (find-files "../include/" ".*metis\\.h"))
2467 (for-each (lambda (f)
2468 (install-file f (string-append out "/lib")))
2469 (find-files "../lib/" ".*metis\\..*"))
2471 (home-page "http://www.labri.fr/perso/pelegrin/scotch/")
2472 (synopsis "Programs and libraries for graph algorithms")
2473 (description "SCOTCH is a set of programs and libraries which implement
2474 the static mapping and sparse matrix reordering algorithms developed within
2475 the SCOTCH project. Its purpose is to apply graph theory, with a divide and
2476 conquer approach, to scientific computing problems such as graph and mesh
2477 partitioning, static mapping, and sparse matrix ordering, in application
2478 domains ranging from structural mechanics to operating systems or
2480 ;; See LICENSE_en.txt
2481 (license license:cecill-c)))
2483 (define-public scotch32
2484 ;; This is the 'INTSIZE32' variant, which uses 32-bit integers, as needed by
2485 ;; some applications.
2486 (package (inherit scotch)
2489 (substitute-keyword-arguments (package-arguments scotch)
2490 ((#:phases scotch-phases)
2491 `(modify-phases ,scotch-phases
2495 (call-with-output-file "Makefile.inc"
2509 CFLAGS = -O2 -g -fPIC $(CPPFLAGS)
2510 LDFLAGS = -lz -lm -lrt -lpthread
2512 LEX = flex -Pscotchyy -olex.yy.c
2517 YACC = bison -pscotchyy -y -b y
2519 '("COMMON_FILE_COMPRESS_GZ"
2521 "COMMON_RANDOM_FIXED_SEED"
2522 "INTSIZE32" ;use 32-bit integers. See INSTALL.txt
2523 ;; Prevents symbolc clashes with libesmumps
2525 ;; XXX: Causes invalid frees in superlu-dist tests
2527 ;; "SCOTCH_PTHREAD_NUMBER=2"
2528 "restrict=__restrict"))))))))))
2530 "Programs and libraries for graph algorithms (32-bit integers)")))
2532 (define-public pt-scotch
2533 (package (inherit scotch)
2536 `(("openmpi" ,openmpi))) ;Headers include MPI headers
2538 (substitute-keyword-arguments (package-arguments scotch)
2539 ((#:phases scotch-phases)
2540 `(modify-phases ,scotch-phases
2544 (invoke "make" (format #f "-j~a" (parallel-job-count))
2545 "ptscotch" "ptesmumps")
2547 ;; Install the serial metis compatibility library
2548 (invoke "make" "-C" "libscotchmetis" "install")))
2549 (add-before 'check 'mpi-setup
2553 (invoke "make" "ptcheck")))))))
2554 (synopsis "Programs and libraries for graph algorithms (with MPI)")))
2556 (define-public pt-scotch32
2557 (package (inherit scotch32)
2558 (name "pt-scotch32")
2560 `(("openmpi" ,openmpi))) ;headers include MPI headers
2562 (substitute-keyword-arguments (package-arguments scotch32)
2563 ((#:phases scotch32-phases)
2564 `(modify-phases ,scotch32-phases
2567 (invoke "make" (format #f "-j~a" (parallel-job-count))
2568 "ptscotch" "ptesmumps")
2569 ;; Install the serial metis compatibility library
2570 (invoke "make" "-C" "libscotchmetis" "install")))
2571 (add-before 'check 'mpi-setup
2575 (invoke "make" "ptcheck")))))))
2577 "Programs and libraries for graph algorithms (with MPI and 32-bit integers)")))
2579 (define-public metis
2586 (uri (string-append "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/"
2587 "metis-" version ".tar.gz"))
2590 "1cjxgh41r8k6j029yxs8msp3z6lcnpm16g5pvckk35kc7zhfpykn"))))
2591 (build-system cmake-build-system)
2593 `(("blas" ,openblas)))
2595 `(#:tests? #f ;no tests
2596 #:configure-flags `("-DSHARED=ON"
2597 ,(string-append "-DGKLIB_PATH=" (getcwd)
2598 "/metis-" ,version "/GKlib"))))
2599 (home-page "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview")
2600 (synopsis "Graph partitioning and fill-reducing matrix ordering library")
2602 "METIS is a set of serial programs for partitioning graphs, partitioning
2603 finite element meshes, and producing fill-reducing orderings for sparse
2604 matrices. The algorithms implemented in METIS are based on the multilevel
2605 recursive-bisection, multilevel k-way, and multi-constraint partitioning
2607 (license license:asl2.0))) ;As of version 5.0.3
2609 (define-public p4est
2616 (uri (string-append "http://p4est.github.io/release/p4est-"
2620 "16h267z256kxcxfjs390qqzv19hr58vrj4x8lndb7alnk2vca8n5"))))
2621 (build-system gnu-build-system)
2623 `(("fortran" ,gfortran)
2628 `(#:configure-flags `(,(string-append "BLAS_LIBS=-L"
2629 (assoc-ref %build-inputs "blas")
2631 ,(string-append "LAPACK_LIBS=-L"
2632 (assoc-ref %build-inputs "lapack")
2634 #:phases (modify-phases %standard-phases
2635 (add-before 'check 'mpi-setup
2637 (home-page "http://www.p4est.org")
2638 (synopsis "Adaptive mesh refinement on forests of octrees")
2640 "The p4est software library enables the dynamic management of a
2641 collection of adaptive octrees, conveniently called a forest of octrees.
2642 p4est is designed to work in parallel and scales to hundreds of thousands of
2644 (license license:gpl2+)))
2646 (define-public p4est-openmpi
2647 (package (inherit p4est)
2648 (name "p4est-openmpi")
2651 ,@(package-inputs p4est)))
2653 (substitute-keyword-arguments (package-arguments p4est)
2654 ((#:configure-flags cf)
2655 ``("--enable-mpi" ,@,cf))))
2656 (synopsis "Parallel adaptive mesh refinement on forests of octrees")))
2658 (define-public gsegrafix
2665 (uri (string-append "mirror://gnu/" name "/" name "-"
2669 "1b13hvx063zv970y750bx41wpx6hwd5ngjhbdrna8w8yy5kmxcda"))))
2670 (build-system gnu-build-system)
2672 `(#:configure-flags '("LDFLAGS=-lm")))
2674 `(("libgnomecanvas" ,libgnomecanvas)
2675 ("libbonoboui" ,libbonoboui)
2676 ("libgnomeui" ,libgnomeui)
2677 ("libgnomeprintui" ,libgnomeprintui)
2680 `(("pkg-config" ,pkg-config)))
2681 (home-page "https://www.gnu.org/software/gsegrafix/")
2682 (synopsis "GNOME application to create scientific and engineering plots")
2683 (description "GSEGrafix is an application which produces high-quality graphical
2684 plots for science and engineering. Plots are specified via simple ASCII
2685 parameter files and data files and are presented in an anti-aliased GNOME
2686 canvas. The program supports rectangular two-dimensional plots, histograms,
2687 polar-axis plots and three-dimensional plots. Plots can be printed or saved
2688 to BMP, JPEG or PNG image formats.")
2689 (license license:gpl3+)))
2691 (define-public maxima
2698 (uri (string-append "mirror://sourceforge/maxima/Maxima-source/"
2699 version "-source/" name "-" version ".tar.gz"))
2702 "1ka0xf70a55ndgmyrq7p5xxbd78pq7bfkqhgxsivaqdw6gn5lmcg"))
2703 (patches (search-patches "maxima-defsystem-mkdir.patch"))))
2704 (build-system gnu-build-system)
2707 ("gnuplot" ,gnuplot) ;for plots
2708 ("tk" ,tk))) ;Tcl/Tk is used by 'xmaxima'
2710 `(("texinfo" ,texinfo)
2712 ("python" ,python)))
2715 (list "--enable-gcl"
2716 (string-append "--with-posix-shell="
2717 (assoc-ref %build-inputs "bash")
2719 (string-append "--with-wish="
2720 (assoc-ref %build-inputs "tk")
2722 (let ((v ,(package-version tk)))
2723 (string-take v (string-index-right v #\.)))))
2724 ;; By default Maxima attempts to write temporary files to
2725 ;; '/tmp/nix-build-maxima-*', which won't exist at run time.
2726 ;; Work around that.
2727 #:make-flags (list "TMPDIR=/tmp")
2729 (modify-phases %standard-phases
2730 (add-before 'check 'pre-check
2732 (chmod "src/maxima" #o555)
2736 ;; This is derived from the testing code in the "debian/rules" file
2737 ;; of Debian's Maxima package.
2738 ;; If Maxima can successfully run this, the binary to be installed
2742 (string-append "./maxima-local "
2744 "--batch-string=\"run_testsuite();\" "
2745 "| grep -q \"No unexpected errors found\"")))))
2746 ;; Make sure the doc and emacs files are found in the
2747 ;; standard location. Also configure maxima to find gnuplot
2748 ;; without having it on the PATH.
2749 (add-after 'install 'post-install
2750 (lambda* (#:key outputs inputs #:allow-other-keys)
2751 (let* ((gnuplot (assoc-ref inputs "gnuplot"))
2752 (out (assoc-ref outputs "out"))
2753 (datadir (string-append out "/share/maxima/" ,version))
2754 (binutils (string-append (assoc-ref inputs "binutils")
2756 (with-directory-excursion out
2757 (mkdir-p "share/emacs")
2758 (mkdir-p "share/doc")
2760 (string-append datadir "/emacs/")
2761 (string-append out "/share/emacs/site-lisp"))
2763 (string-append datadir "/doc/")
2764 (string-append out "/share/doc/maxima"))
2765 (with-atomic-file-replacement
2766 (string-append datadir "/share/maxima-init.lisp")
2768 (format out "~a ~s~a~%"
2769 "(setf $gnuplot_command "
2770 (string-append gnuplot "/bin/gnuplot") ")")
2771 (dump-port in out))))
2772 ;; Ensure that Maxima will have access to the GNU binutils
2773 ;; components at runtime.
2774 (wrap-program (string-append out "/bin/maxima")
2775 `("PATH" prefix (,binutils))))
2777 (home-page "http://maxima.sourceforge.net")
2778 (synopsis "Numeric and symbolic expression manipulation")
2779 (description "Maxima is a system for the manipulation of symbolic and
2780 numerical expressions. It yields high precision numeric results by using
2781 exact fractions, arbitrary precision integers, and variable precision floating
2783 ;; Some files are lgpl2.1+. Some are gpl2+. Some explicitly state gpl1+.
2784 ;; Others simply say "GNU General Public License" without stating a
2785 ;; version (which implicitly means gpl1+).
2786 ;; At least one file (src/maxima.asd) says "version 2."
2787 ;; GPLv2 only is therefore the smallest subset.
2788 (license license:gpl2)))
2790 (define-public wxmaxima
2798 (url "https://github.com/wxMaxima-developers/wxmaxima.git")
2799 (commit (string-append "Version-" version))))
2800 (file-name (git-file-name name version))
2803 "1sz8n9v23q442l7yjj67pjh0dk78rl4cbcc3j8m1bm88anlfxl9r"))))
2804 (build-system cmake-build-system)
2806 `(("gettext" ,gettext-minimal)))
2808 `(("wxwidgets" ,wxwidgets)
2811 ("adwaita-icon-theme" ,adwaita-icon-theme)
2813 ("shared-mime-info" ,shared-mime-info)))
2815 `(#:tests? #f ; no check target
2817 (modify-phases %standard-phases
2818 (add-after 'install 'wrap-program
2819 (lambda* (#:key inputs outputs #:allow-other-keys)
2820 (wrap-program (string-append (assoc-ref outputs "out")
2823 (,(string-append (assoc-ref inputs "maxima")
2825 ;; For GtkFileChooserDialog.
2826 `("GSETTINGS_SCHEMA_DIR" =
2827 (,(string-append (assoc-ref inputs "gtk+")
2828 "/share/glib-2.0/schemas")))
2829 `("XDG_DATA_DIRS" ":" prefix
2830 (;; Needed by gdk-pixbuf to know supported icon formats.
2832 (assoc-ref inputs "shared-mime-info") "/share")
2833 ;; The default icon theme of GTK+.
2835 (assoc-ref inputs "adwaita-icon-theme") "/share"))))
2837 (home-page "https://andrejv.github.io/wxmaxima/")
2838 (synopsis "Graphical user interface for the Maxima computer algebra system")
2840 "wxMaxima is a graphical user interface for the Maxima computer algebra
2841 system. It eases the use of Maxima by making most of its commands available
2842 through a menu system and by providing input dialogs for commands that require
2843 more than one argument. It also implements its own display engine that
2844 outputs mathematical symbols directly instead of depicting them with ASCII
2847 wxMaxima also features 2D and 3D inline plots, simple animations, mixing of
2848 text and mathematical calculations to create documents, exporting of input and
2849 output to TeX, and a browser for Maxima's manual including command index and
2850 full text searching.")
2851 (license license:gpl2+)))
2853 (define-public armadillo
2859 (uri (string-append "mirror://sourceforge/arma/armadillo-"
2863 "1ka1vd9fcmvp12qkcm4888dkfqwnalvv00x04wy29f3nx3qwczby"))))
2864 (build-system cmake-build-system)
2865 (arguments `(#:tests? #f)) ; no test target
2867 `(("openblas" ,openblas)
2869 ("arpack" ,arpack-ng)))
2870 (home-page "http://arma.sourceforge.net/")
2871 (synopsis "C++ linear algebra library")
2873 "Armadillo is a C++ linear algebra library, aiming towards a good balance
2874 between speed and ease of use. It is useful for algorithm development
2875 directly in C++, or quick conversion of research code into production
2876 environments. It can be used for machine learning, pattern recognition,
2877 signal processing, bioinformatics, statistics, econometrics, etc. The library
2878 provides efficient classes for vectors, matrices and cubes, as well as 150+
2879 associated functions (eg. contiguous and non-contiguous submatrix views).")
2880 (license license:asl2.0)))
2882 (define-public muparser
2883 ;; When switching download sites, muparser re-issued a 2.2.5 release with a
2884 ;; different hash. In order to make `guix package --upgrade` work correctly,
2885 ;; we set a Guix packaging revision.
2886 ;; When the next version of muparser is released, we can remove
2887 ;; UPSTREAM-VERSION and REVISION and use the plain VERSION.
2888 (let ((upstream-version "2.2.5")
2892 (version (string-append upstream-version "-" revision))
2896 (uri (string-append "https://github.com/beltoforion/muparser/archive/v"
2897 upstream-version ".tar.gz"))
2898 (file-name (string-append name "-" version ".tar.gz"))
2901 "0277qsi5l23jsck1vhn383bmvc2n9l4a1dl5r9bf7hvjv9ayyrh6"))))
2902 (build-system gnu-build-system)
2904 `(#:configure-flags '("--enable-samples=no")
2905 #:tests? #f)) ;no "check" target
2906 (home-page "http://muparser.beltoforion.de/")
2907 (synopsis "Fast parser library for mathematical expressions")
2909 "muParser is an extensible high performance math parser library. It is
2910 based on transforming an expression into a bytecode and precalculating constant
2912 (license license:expat))))
2914 (define-public openblas
2921 (uri (string-append "mirror://sourceforge/openblas/v" version "/OpenBLAS%20"
2922 version "%20version.tar.gz"))
2923 (file-name (string-append name "-" version ".tar.gz"))
2926 "0cvlixnpc3cdvvn3f30phfvsgnqljqix6wn72ps9rj7xdhvw06jg"))))
2927 (build-system gnu-build-system)
2929 `(#:test-target "test"
2930 ;; DYNAMIC_ARCH is only supported on x86. When it is disabled and no
2931 ;; TARGET is specified, OpenBLAS will tune itself to the build host, so
2932 ;; we need to disable substitutions.
2934 ,(let ((system (or (%current-target-system) (%current-system))))
2935 (or (string-prefix? "x86_64" system)
2936 (string-prefix? "i686" system)
2937 (string-prefix? "mips" system)
2938 (string-prefix? "aarch64" system)))
2940 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2942 ;; Build the library for all supported CPUs. This allows
2943 ;; switching CPU targets at runtime with the environment variable
2944 ;; OPENBLAS_CORETYPE=<type>, where "type" is a supported CPU type.
2945 ;; Unfortunately, this is not supported on non-x86 architectures,
2946 ;; where it leads to failed builds.
2947 ,@(let ((system (or (%current-target-system) (%current-system))))
2949 ((or (string-prefix? "x86_64" system)
2950 (string-prefix? "i686" system))
2951 '("DYNAMIC_ARCH=1"))
2952 ;; On MIPS we force the "SICORTEX" TARGET, as for the other
2953 ;; two available MIPS targets special extended instructions
2954 ;; for Loongson cores are used.
2955 ((string-prefix? "mips" system)
2956 '("TARGET=SICORTEX"))
2957 ;; On aarch64 force the generic 'armv8-a' target
2958 ((string-prefix? "aarch64" system)
2961 ;; no configure script
2963 (modify-phases %standard-phases
2965 (add-before 'build 'set-extralib
2966 (lambda* (#:key inputs #:allow-other-keys)
2967 ;; Get libgfortran found when building in utest.
2969 (string-append "-L" (assoc-ref inputs "fortran-lib")
2973 `(("fortran-lib" ,gfortran "lib")))
2976 ("fortran" ,gfortran)
2978 (home-page "http://www.openblas.net/")
2979 (synopsis "Optimized BLAS library based on GotoBLAS")
2981 "OpenBLAS is a BLAS library forked from the GotoBLAS2-1.13 BSD version.")
2982 (license license:bsd-3)))
2984 (define-public openblas-ilp64
2985 (package (inherit openblas)
2986 (name "openblas-ilp64")
2987 (supported-systems '("x86_64-linux" "aarch64-linux" "mips64el-linux"))
2989 (substitute-keyword-arguments (package-arguments openblas)
2990 ((#:make-flags flags '())
2991 `(append (list "INTERFACE64=1" "LIBNAMESUFFIX=ilp64")
2993 (synopsis "Optimized BLAS library based on GotoBLAS (ILP64 version)")
2994 (license license:bsd-3)))
2996 (define* (make-blis implementation #:optional substitutable?)
2997 "Return a BLIS package with the given IMPLEMENTATION (see config/ in the
2998 source tree for a list of implementations.)
3000 SUBSTITUTABLE? determines whether the package is made available as a
3003 Currently the specialization must be selected at configure-time, but work is
3004 underway to allow BLIS to select the right optimized kernels at run time:
3005 <https://github.com/flame/blis/issues/129>."
3007 (name (if (string=? implementation "reference")
3009 (string-append "blis-" implementation)))
3011 (home-page "https://github.com/flame/blis")
3014 (uri (git-reference (url home-page) (commit version)))
3017 "1wr79a50nm4abhw8w3sn96nmwp5mrzifcigk7khw9qcgyyyqayfh"))
3018 (file-name (git-file-name "blis" version))))
3019 (build-system gnu-build-system)
3021 `(#:test-target "test"
3023 #:substitutable? ,substitutable?
3025 #:phases (modify-phases %standard-phases
3027 (lambda* (#:key outputs #:allow-other-keys)
3028 ;; This is a home-made 'configure' script.
3029 (let ((out (assoc-ref outputs "out")))
3030 (zero? (system* "./configure" "-p" out
3034 "--enable-threading=openmp"
3036 ,implementation)))))
3037 (add-before 'check 'show-test-output
3039 ;; By default "make check" is silent. Make it verbose.
3040 (system "tail -F output.testsuite &")
3042 (synopsis "High-performance basic linear algebra (BLAS) routines")
3044 "BLIS is a portable software framework for instantiating high-performance
3045 BLAS-like dense linear algebra libraries. The framework was designed to
3046 isolate essential kernels of computation that, when optimized, immediately
3047 enable optimized implementations of most of its commonly used and
3048 computationally intensive operations. While BLIS exports a new BLAS-like API,
3049 it also includes a BLAS compatibility layer which gives application developers
3050 access to BLIS implementations via traditional BLAS routine calls.")
3051 (license license:bsd-3)))
3054 ;; This is the "reference" implementation, which is the non-optimized but
3055 ;; portable variant (no assembly).
3056 (make-blis "reference" #t))
3058 (define ignorance blis)
3060 (define-syntax-rule (blis/x86_64 processor)
3061 "Expand to a package specialized for PROCESSOR."
3063 (inherit (make-blis processor))
3064 (supported-systems '("x86_64-linux"))))
3066 (define-public blis-sandybridge
3067 ;; BLIS specialized for Sandy Bridge processors (launched 2011):
3068 ;; <http://ark.intel.com/products/codename/29900/Sandy-Bridge>.
3069 (blis/x86_64 "sandybridge"))
3071 (define-public blis-haswell
3072 ;; BLIS specialized for Haswell processors (launched 2013):
3073 ;; <http://ark.intel.com/products/codename/42174/Haswell>.
3074 (blis/x86_64 "haswell"))
3076 (define-public blis-knl
3077 ;; BLIS specialized for Knights Landing processor (launched 2016):
3078 ;; <http://ark.intel.com/products/series/92650/Intel-Xeon-Phi-x200-Product-Family>.
3079 (blis/x86_64 "knl"))
3082 (define-public openlibm
3089 (uri (string-append "https://github.com/JuliaLang/openlibm/archive/v"
3091 (file-name (string-append name "-" version ".tar.gz"))
3094 "0a5fpm8nra5ldhjk0cqd2rx1qh32wiarkxmcqcm5xl8z7l4kjm6l"))))
3095 (build-system gnu-build-system)
3098 (list (string-append "prefix=" (assoc-ref %outputs "out")))
3100 ;; no configure script
3101 (modify-phases %standard-phases (delete 'configure))
3102 #:tests? #f)) ;the tests are part of the default target
3103 (home-page "http://openlibm.org/")
3104 (synopsis "Portable C mathematical library (libm)")
3106 "OpenLibm is an effort to have a high quality, portable, standalone C
3107 mathematical library (libm). It can be used standalone in applications and
3108 programming language implementations. The project was born out of a need to
3109 have a good libm for the Julia programming language that worked consistently
3110 across compilers and operating systems, and in 32-bit and 64-bit
3112 ;; Each architecture has its own make target, and there is none for mips.
3113 (supported-systems (delete "mips64el-linux" %supported-systems))
3114 ;; See LICENSE.md for details.
3115 (license (list license:expat
3118 license:public-domain
3119 license:lgpl2.1+))))
3121 (define-public openspecfun
3123 (name "openspecfun")
3128 (uri (string-append "https://github.com/JuliaLang/openspecfun/archive/v"
3130 (file-name (string-append name "-" version ".tar.gz"))
3133 "1rs1bv8jq751fv9vq79890wqf9xlbjc7lvz3ighzyfczbyjcf18m"))))
3134 (build-system gnu-build-system)
3136 '(#:tests? #f ; no "check" target
3138 (list (string-append "prefix=" (assoc-ref %outputs "out")))
3140 (modify-phases %standard-phases
3141 (delete 'configure)))) ; no configure script
3143 `(("fortran" ,gfortran)))
3144 (home-page "https://github.com/JuliaLang/openspecfun")
3145 (synopsis "Collection of special mathematical functions")
3147 "Openspecfun provides AMOS and Faddeeva. AMOS (from Netlib) is a
3148 portable package for Bessel Functions of a Complex Argument and Nonnegative
3149 Order; it contains subroutines for computing Bessel functions and Airy
3150 functions. Faddeeva allows computing the various error functions of arbitrary
3151 complex arguments (Faddeeva function, error function, complementary error
3152 function, scaled complementary error function, imaginary error function, and
3153 Dawson function); given these, one can also easily compute Voigt functions,
3154 Fresnel integrals, and similar related functions as well.")
3155 ;; Faddeeva is released under the Expat license; AMOS is included as
3156 ;; public domain software.
3157 (license (list license:expat license:public-domain))))
3159 (define-public suitesparse
3161 (name "suitesparse")
3167 "http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-"
3171 "1dnr6pmjzc2qmbkmb4shigx1l74ilf6abn7svyd6brxgvph8vadr"))
3172 (modules '((guix build utils)))
3174 ;; Remove bundled metis source
3176 (delete-file-recursively "metis-5.1.0")
3178 (build-system gnu-build-system)
3180 '(#:tests? #f ;no "check" target
3185 "MY_METIS_LIB=-lmetis"
3186 (string-append "INSTALL_LIB="
3187 (assoc-ref %outputs "out") "/lib")
3188 (string-append "INSTALL_INCLUDE="
3189 (assoc-ref %outputs "out") "/include")
3192 (modify-phases %standard-phases
3193 (delete 'configure)))) ;no configure script
3198 (home-page "http://faculty.cse.tamu.edu/davis/suitesparse.html")
3199 (synopsis "Suite of sparse matrix software")
3201 "SuiteSparse is a suite of sparse matrix algorithms, including: UMFPACK,
3202 multifrontal LU factorization; CHOLMOD, supernodal Cholesky; SPQR,
3203 multifrontal QR; KLU and BTF, sparse LU factorization, well-suited for circuit
3204 simulation; ordering methods (AMD, CAMD, COLAMD, and CCOLAMD); CSparse and
3205 CXSparse, a concise sparse Cholesky factorization package; and many other
3208 ;; AMD, CAMD, BTF, COLAMD, CCOLAMD, CSparse, CXSparse, KLU, LDL
3210 ;; GPUQREngine, RBio, SuiteSparse_GPURuntime, SuiteSparseQR, UMFPACK
3211 (license (list license:gpl2+ license:lgpl2.1+))))
3213 (define-public atlas
3219 (uri (string-append "mirror://sourceforge/math-atlas/Stable/"
3220 version "/atlas" version ".tar.bz2"))
3223 "1dyjlq3fiparvm8ypwk6rsmjzmnwk81l88gkishphpvc79ryp216"))))
3224 (build-system gnu-build-system)
3225 (home-page "http://math-atlas.sourceforge.net/")
3226 (inputs `(("gfortran" ,gfortran)
3227 ("lapack-tar" ,(package-source lapack))))
3228 (outputs '("out" "doc"))
3229 ;; For the moment we drop support for MIPS at it fails to compile. See
3230 ;; https://lists.gnu.org/archive/html/guix-devel/2014-11/msg00516.html
3231 (supported-systems (delete "mips64el-linux" %supported-systems))
3233 `(#:parallel-build? #f
3234 #:parallel-tests? #f
3236 ;; ATLAS tunes itself for the machine it is built on, as explained at
3237 ;; <http://lists.gnu.org/archive/html/guix-devel/2014-10/msg00305.html>.
3238 ;; For this reason, we want users to build it locally instead of using
3242 #:modules ((srfi srfi-26)
3244 (guix build gnu-build-system)
3247 `(;; Generate position independent code suitable for dynamic libraries
3248 ;; and use WALL timer to get more accurate timing.
3249 "-Fa" "alg" "-fPIC" "-D" "c" "-DWALL"
3252 ,,(if (string-match "64" (%current-system))
3255 ;; Disable parallel build as it gives errors: atlas_pthread.h is
3256 ;; needed to compile C files before it is generated.
3257 "-Ss" "pmake" "make -j 1"
3258 ;; Probe is failing for MIPS. We therefore define the system
3259 ;; architecture explicitly by setting (-A) MACHINETYPE = 49
3260 ;; 'MIPSR1xK' and (-V) ISA = 1 'none'.
3261 ,,@(if (string-prefix? "mips" (%current-system))
3262 (list "-A" "49" "-V" "1")
3264 ;; Generate shared libraries.
3266 ;; Build a full LAPACK library.
3267 ,(string-append "--with-netlib-lapack-tarfile="
3268 (assoc-ref %build-inputs "lapack-tar")))
3270 (modify-phases %standard-phases
3271 (add-after 'install 'install-doc
3272 (lambda* (#:key outputs inputs #:allow-other-keys)
3273 (let ((doc (string-append (assoc-ref outputs "doc")
3274 "/share/doc/atlas")))
3276 (fold (lambda (file previous)
3277 (and previous (zero? (system* "cp" file doc))))
3278 #t (find-files "../ATLAS/doc" ".*")))))
3279 (add-after 'check 'check-pt
3280 (lambda _ (zero? (system* "make" "ptcheck"))))
3281 ;; Fix files required to run configure.
3282 (add-before 'configure 'fix-/bin/sh
3284 ;; Use `sh', not `/bin/sh'.
3285 (substitute* (find-files "." "Makefile|configure|SpewMakeInc\\.c")
3288 ;; Fix /bin/sh in generated make files.
3289 (add-after 'configure 'fix-/bin/sh-in-generated-files
3291 (substitute* (find-files "." "^[Mm]ake\\.inc.*")
3294 ;; ATLAS configure program does not accepts the default flags
3295 ;; passed by the 'gnu-build-system'.
3297 (lambda* (#:key native-inputs inputs outputs
3298 (configure-flags '())
3299 #:allow-other-keys #:rest args)
3300 (let* ((prefix (assoc-ref outputs "out"))
3301 (bash (or (and=> (assoc-ref
3302 (or native-inputs inputs) "bash")
3303 (cut string-append <> "/bin/bash"))
3305 (flags `(,(string-append "--prefix=" prefix)
3307 (abs-srcdir (getcwd))
3308 (srcdir (string-append "../" (basename abs-srcdir))))
3309 (format #t "source directory: ~s (relative from build: ~s)~%"
3313 (format #t "build directory: ~s~%" (getcwd))
3314 (format #t "configure flags: ~s~%" flags)
3315 (zero? (apply system* bash
3316 (string-append srcdir "/configure")
3318 (synopsis "Automatically Tuned Linear Algebra Software")
3320 "ATLAS is an automatically tuned linear algebra software library
3321 providing C and Fortran77 interfaces to a portably efficient BLAS
3322 implementation, as well as a few routines from LAPACK.
3324 Optimization occurs at build time. For this reason, the library is built on
3325 the machine where it is installed, without resorting to pre-built substitutes.
3327 Before building the library, CPU throttling should be disabled. This can be
3328 done in the BIOS, or, on GNU/Linux, with the following command:
3331 # cpupower --governor performance
3334 Failure to do so will result in a library with poor performance.")
3335 (license license:bsd-3)))
3344 (uri (string-append "https://github.com/g-truc/glm/releases/download/"
3345 version "/glm-" version ".zip"))
3348 "0yqk5r3qh60d4r2iab5q7wq0fryn8p3pz6s28y1i7amqj1aqavj9"))))
3349 (build-system cmake-build-system)
3351 `(("unzip" ,unzip)))
3352 (home-page "https://glm.g-truc.net/")
3353 (synopsis "OpenGL Mathematics library")
3354 (description "OpenGL Mathematics (GLM) is a header-only C++ mathematics
3355 library for graphics software based on the OpenGL Shading Language (GLSL)
3357 (license license:expat)))
3359 (define-public lpsolve
3366 (uri (string-append "mirror://sourceforge/lpsolve/lpsolve/" version
3367 "/lp_solve_" version "_source.tar.gz"))
3370 "12pj1idjz31r7c2mb5w03vy1cmvycvbkx9z29s40qdmkp1i7q6i0"))
3371 (modules '((guix build utils)))
3374 (substitute* (list "lp_solve/ccc" "lpsolve55/ccc")
3376 ;; Pretend to be on a 64 bit platform to obtain a common directory
3377 ;; name for the build results on all architectures; nothing else
3378 ;; seems to depend on it.
3379 (("^PLATFORM=.*$") "PLATFORM=ux64\n")
3381 ;; The check for 'isnan' as it is written fails with
3382 ;; "non-floating-point argument in call to function
3383 ;; ‘__builtin_isnan’", which leads to the 'NOISNAN' cpp macro
3384 ;; definition, which in turn leads to bad things. Fix the feature
3386 (("isnan\\(0\\)") "isnan(0.)"))
3388 (build-system gnu-build-system)
3390 `(#:tests? #f ; no check target
3392 (modify-phases %standard-phases
3393 (delete 'configure) ; no configure script
3396 (with-directory-excursion "lpsolve55"
3397 (invoke "bash" "ccc"))
3398 (with-directory-excursion "lp_solve"
3399 (invoke "bash" "ccc"))
3402 (lambda* (#:key outputs #:allow-other-keys)
3403 (let* ((out (assoc-ref outputs "out"))
3404 (bin (string-append out "/bin"))
3405 (lib (string-append out "/lib"))
3406 ;; This is where LibreOffice expects to find the header
3407 ;; files, and where they are installed by Debian.
3408 (include (string-append out "/include/lpsolve")))
3409 (install-file "lpsolve55/bin/ux64/liblpsolve55.a" lib)
3410 (install-file "lpsolve55/bin/ux64/liblpsolve55.so" lib)
3411 (install-file "lp_solve/bin/ux64/lp_solve" bin)
3413 ;; Install a subset of the header files as on Debian
3414 ;; (plus lp_bit.h, which matches the regular expression).
3415 (for-each (lambda (name)
3416 (install-file name include))
3417 (find-files "." "lp_[HMSa-z].*\\.h$"))
3418 (with-directory-excursion "shared"
3419 (for-each (lambda (name)
3420 (install-file name include))
3421 (find-files "." "\\.h$")))
3423 (home-page "http://lpsolve.sourceforge.net/")
3424 (synopsis "Mixed integer linear programming (MILP) solver")
3426 "lp_solve is a mixed integer linear programming solver based on the
3427 revised simplex and the branch-and-bound methods.")
3428 (license license:lgpl2.1+)))
3430 (define-public dealii
3437 (uri (string-append "https://github.com/dealii/dealii/releases/"
3438 "download/v" version "/dealii-" version ".tar.gz"))
3441 "1bh9rsmkrg0zi70n27b11djmac9lximghsiy7mg7w7x544n82gnk"))
3442 (modules '((guix build utils)))
3444 ;; Remove bundled sources: UMFPACK, TBB, muParser, and boost
3446 (delete-file-recursively "bundled")
3448 (build-system cmake-build-system)
3456 ("arpack" ,arpack-ng)
3457 ("muparser" ,muparser)
3458 ("gfortran" ,gfortran)
3459 ("suitesparse" ,suitesparse))) ;for UMFPACK
3461 `(#:build-type "DebugRelease" ;only supports Release, Debug, or DebugRelease
3463 ;; Work around a bug in libsuitesparseconfig linking
3464 ;; see https://github.com/dealii/dealii/issues/4745
3465 '("-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON")))
3466 (home-page "https://www.dealii.org")
3467 (synopsis "Finite element library")
3469 "Deal.II is a C++ program library targeted at the computational solution
3470 of partial differential equations using adaptive finite elements. The main
3471 aim of deal.II is to enable rapid development of modern finite element codes,
3472 using among other aspects adaptive meshes and a wide array of tools often used
3473 in finite element programs.")
3474 (license license:lgpl2.1+)))
3476 (define-public dealii-openmpi
3477 (package (inherit dealii)
3478 (name "dealii-openmpi")
3481 ;;Supported only with MPI:
3482 ("p4est" ,p4est-openmpi)
3483 ("petsc" ,petsc-openmpi)
3484 ("slepc" ,slepc-openmpi)
3485 ("metis" ,metis) ;for MUMPS
3486 ("scalapack" ,scalapack) ;for MUMPS
3487 ("mumps" ,mumps-metis-openmpi) ;configure supports only metis orderings
3488 ("arpack" ,arpack-ng-openmpi)
3489 ,@(fold alist-delete (package-inputs dealii)
3490 '("p4est" "arpack"))))
3492 (substitute-keyword-arguments (package-arguments dealii)
3493 ((#:configure-flags cf)
3494 ``("-DMPI_C_COMPILER=mpicc"
3495 "-DMPI_CXX_COMPILER=mpicxx"
3496 "-DMPI_Fortran_COMPILER=mpifort"
3498 (synopsis "Finite element library (with MPI support)")))
3500 (define-public flann
3509 "http://www.cs.ubc.ca/research/flann/uploads/FLANN/flann-"
3510 version "-src.zip"))
3513 "022w8hph7bli5zbpnk3z1qh1c2sl5hm8fw2ccim651ynn0hr7fyz"))
3514 (patches (search-patches "flann-cmake-3.11.patch"))))
3515 (build-system cmake-build-system)
3517 "octave")) ;46 MiB .mex file that pulls Octave
3519 `(("unzip" ,unzip)))
3522 ("octave" ,octave-cli)
3523 ("python" ,python-2) ; print syntax
3524 ;; ("python2-numpy" ,python2-numpy) ; only required for the tests
3527 `(;; The 'share/flann/octave' contains a .mex file, which is an ELF file
3528 ;; taken 46 MiB unstripped, and 6 MiB stripped.
3529 #:strip-directories '("lib" "lib64" "libexec"
3530 "bin" "sbin" "share/flann/octave")
3532 ;; Save 12 MiB by not installing .a files. Passing
3533 ;; '-DBUILD_STATIC_LIBS=OFF' has no effect.
3534 #:phases (modify-phases %standard-phases
3535 (add-before 'configure 'set-octave-directory
3536 (lambda* (#:key outputs #:allow-other-keys)
3537 ;; Install the .mex file in the "octave" output.
3538 (let ((out (assoc-ref outputs "octave")))
3539 (substitute* "src/matlab/CMakeLists.txt"
3540 (("share/flann/octave")
3541 (string-append out "/share/flann/octave")))
3543 (add-after 'install 'remove-static-libraries
3544 (lambda* (#:key outputs #:allow-other-keys)
3545 (let* ((out (assoc-ref outputs "out"))
3546 (lib (string-append out "/lib")))
3547 (for-each delete-file
3548 (find-files lib "\\.a$"))
3551 #:tests? #f)) ; The test data are downloaded from the Internet.
3552 (home-page "http://www.cs.ubc.ca/research/flann/")
3553 (synopsis "Library for approximate nearest neighbors computation")
3554 (description "FLANN is a library for performing fast approximate
3555 nearest neighbor searches in high dimensional spaces. It implements a
3556 collection of algorithms and a system for automatically choosing the best
3557 algorithm and optimum parameters depending on the dataset.
3559 FLANN is written in C++ and contains bindings for C, Octave and Python.")
3560 (license (license:non-copyleft "file://COPYING"
3561 "See COPYING in the distribution."))))
3563 (define-public wcalc
3570 (uri (string-append "mirror://sourceforge/w-calc/Wcalc/" version "/"
3571 "wcalc-" version ".tar.bz2"))
3574 "1vi8dl6rccqiq1apmpwawyg2ywx6a1ic1d3cvkf2hlwk1z11fb0f"))))
3575 (build-system gnu-build-system)
3578 ("readline" ,readline)))
3579 (home-page "http://w-calc.sourceforge.net/index.php")
3580 (synopsis "Flexible command-line scientific calculator")
3581 (description "Wcalc is a very capable calculator. It has standard functions
3582 (sin, asin, and sinh for example, in either radians or degrees), many
3583 pre-defined constants (pi, e, c, etc.), support for using variables, \"active\"
3584 variables, a command history, hex/octal/binary input and output, unit
3585 conversions, embedded comments, and an expandable expression entry field. It
3586 evaluates expressions using the standard order of operations.")
3587 (license license:gpl2+)))
3595 (uri (string-append "mirror://sourceforge/xaos/XaoS/" version
3596 "/xaos-" version ".tar.gz"))
3599 "15cd1cx1dyygw6g2nhjqq3bsfdj8sj8m4va9n75i0f3ryww3x7wq"))))
3600 (build-system gnu-build-system)
3601 (native-inputs `(("gettext" ,gettext-minimal)))
3602 (inputs `(("libx11" ,libx11)
3607 `(#:tests? #f ;no "check" target
3608 #:make-flags '("LOCALEDIR=$DATAROOTDIR/locale")))
3609 (synopsis "Real-time fractal zoomer")
3610 (description "GNU XaoS is a graphical program that generates fractal
3611 patterns and allows you to zoom in and out of them infinitely in a fluid,
3612 continuous manner. It also includes tutorials that help to explain how fractals
3613 are built. It can generate many different fractal types such as the Mandelbrot
3615 (home-page "https://www.gnu.org/software/xaos/")
3616 (license license:gpl2+)))
3618 (define-public hypre
3624 (uri (string-append "https://github.com/LLNL/hypre/archive/"
3625 "v" version ".tar.gz"))
3626 (file-name (string-append name "-" version ".tar.gz"))
3629 "0v515i73bvaz378h5465b1dy9v2gf924zy2q94cpq4qqarawvkqh"))
3630 (modules '((guix build utils)))
3633 ;; Remove use of __DATE__ and __TIME__ for reproducibility;
3634 ;; substitute the tarball creation time.
3635 (substitute* "src/utilities/HYPRE_utilities.h"
3636 (("Date Compiled: .*$")
3637 "Date Compiled: Apr 11 2018 16:24:59 +0000\"\n"))
3639 (build-system gnu-build-system)
3640 (outputs '("out" ;6.1 MiB of headers and libraries
3641 "doc")) ;4.8 MiB of documentation
3645 ("perl" ,perl) ;needed to run 'ppmquant' during tests
3646 ("texlive" ,(texlive-union (list texlive-generic-xypic
3648 texlive-latex-hyperref
3649 texlive-latex-oberdiek
3650 texlive-generic-ifxetex
3653 ("ghostscript" ,ghostscript)))
3655 `(("blas" ,openblas)
3656 ("lapack" ,lapack)))
3658 `(#:modules ((srfi srfi-1)
3659 ,@%gnu-build-system-modules)
3660 #:configure-flags '("--enable-shared"
3668 (modify-phases %standard-phases
3669 (add-before 'build 'set-HOME
3671 ;; FIXME: texlive-union does not find the built
3672 ;; metafonts, so it tries to generate them in HOME.
3673 (setenv "HOME" "/tmp")
3675 (add-before 'configure 'chdir-src
3676 (lambda _ (chdir "src")))
3678 (lambda* (#:key build target configure-flags
3679 #:allow-other-keys #:rest args)
3680 (let* ((configure (assoc-ref %standard-phases 'configure)))
3683 (list #:configure-flags
3684 (cons (string-append
3685 "--host=" (or target build))
3686 configure-flags)))))))
3687 (add-after 'build 'build-docs
3689 (invoke "make" "-Cdocs" "pdf" "html")))
3692 (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/hypre/lib"))
3693 (setenv "PATH" (string-append "." ":" (getenv "PATH")))
3694 (and (system* "make" "check" "CHECKRUN=")
3695 (fold (lambda (filename result)
3697 (let ((size (stat:size (stat filename))))
3698 (when (not (zero? size))
3699 (format #t "~a size ~d; error indication~%"
3703 (find-files "test" ".*\\.err$")))))
3704 (add-after 'install 'install-docs
3705 (lambda* (#:key outputs #:allow-other-keys)
3706 ;; Custom install because docs/Makefile doesn't honor ${docdir}.
3707 (let* ((doc (assoc-ref outputs "doc"))
3708 (docdir (string-append doc "/share/doc/hypre-" ,version)))
3709 (with-directory-excursion "docs"
3710 (for-each (lambda (base)
3711 (install-file (string-append base ".pdf") docdir)
3712 (copy-recursively base docdir)) ;html docs
3713 '("HYPRE_usr_manual"
3714 "HYPRE_ref_manual")))
3716 (home-page "http://www.llnl.gov/casc/hypre/")
3717 (synopsis "Library of solvers and preconditioners for linear equations")
3719 "HYPRE is a software library of high performance preconditioners and
3720 solvers for the solution of large, sparse linear systems of equations. It
3721 features multigrid solvers for both structured and unstructured grid
3723 (license license:lgpl2.1)))
3725 (define-public hypre-openmpi
3726 (package (inherit hypre)
3727 (name "hypre-openmpi")
3730 ,@(package-inputs hypre)))
3732 (substitute-keyword-arguments (package-arguments hypre)
3733 ((#:configure-flags flags)
3735 ,@(delete "--without-MPI" ,flags)))
3737 `(modify-phases ,phases
3738 (add-before 'check 'mpi-setup
3739 ,%openmpi-setup)))))
3740 (synopsis "Parallel solvers and preconditioners for linear equations")
3742 "HYPRE is a software library of high performance preconditioners and
3743 solvers for the solution of large, sparse linear systems of equations on
3744 parallel computers. It features parallel multigrid solvers for both
3745 structured and unstructured grid problems.")))
3747 (define-public matio
3754 (uri (string-append "mirror://sourceforge/matio/matio/" version "/"
3755 "matio-" version ".tar.gz"))
3758 "0y2qymgxank8wdiwc68ap8bxdzrhvyw86i29yh3xgn4z1njfd9ir"))))
3759 (build-system gnu-build-system)
3763 (home-page "http://matio.sourceforge.net/")
3764 (synopsis "Library for reading and writing MAT files")
3765 (description "Matio is a library for reading and writing MAT files. It
3766 supports compressed MAT files, as well as newer (version 7.3) MAT files.")
3767 (license license:bsd-2)))
3774 (origin (method url-fetch)
3775 (uri (string-append "https://github.com/VcDevel/Vc/releases/"
3776 "download/" version "/Vc-" version ".tar.gz"))
3779 "1zmlpn32jzb38smp3j834llmbix3whsrbw0h397qxysbw792kih8"))))
3780 (build-system cmake-build-system)
3783 '("-DBUILD_TESTING=ON"
3784 ;; By default, Vc will optimize for the CPU of the build machine.
3785 ;; Setting this to "none" makes it create portable binaries. See
3786 ;; "cmake/OptimizeForArchitecture.cmake".
3787 "-DTARGET_ARCHITECTURE=none")))
3788 (synopsis "SIMD vector classes for C++")
3789 (description "Vc provides portable, zero-overhead C++ types for explicitly
3790 data-parallel programming. It is a library designed to ease explicit
3791 vectorization of C++ code. Its types enable explicitly stating data-parallel
3792 operations on multiple values. The parallelism is therefore added via the type
3793 system. Vc has an intuitive API and provides portability between different
3794 compilers and compiler versions as well as portability between different vector
3795 instruction sets. Thus, an application written with Vc can be compiled for:
3798 @item SSE2 up to SSE4.2 or SSE4a
3801 @item NEON (in development)
3802 @item NVIDIA GPUs / CUDA (in development)
3804 (home-page "https://github.com/VcDevel/Vc")
3805 ;; "No support_???.cpp file exists for this architecture."
3806 (supported-systems '("x86_64-linux" "i686-linux"))
3807 (license license:bsd-3)))
3809 (define-public reducelcs
3810 ;; This is the last commit which is available upstream, no
3811 ;; release happened since 2010.
3812 (let ((commit "474f88deb968061abe8cf11c959e02319b8ae5c0")
3816 (version (string-append "1.0-" revision "." (string-take commit 7)))
3821 (url "https://github.com/gdv/Reduce-Expand-for-LCS")
3823 (file-name (string-append name "-" version "-checkout"))
3826 "1rllzcfwc042c336mhq262a8ha90x6afq30kvk60r7i4761j4yjm"))))
3827 (build-system gnu-build-system)
3829 `(("openlibm" ,openlibm)))
3831 `(#:tests? #f ; no tests
3833 (modify-phases %standard-phases
3834 (delete 'configure) ; No configure script exists.
3835 (replace 'install ; No install phase exists.
3836 (lambda* (#:key outputs #:allow-other-keys)
3837 (let* ((out (assoc-ref outputs "out"))
3838 (bin (string-append out "/bin")))
3839 (install-file "Approximation" bin)
3840 (install-file "CollectResults" bin)
3841 (install-file "GenerateInstances" bin)
3843 (synopsis "Approximate Longest Commons Subsequence computation tool")
3845 "@code{reduceLCS} is an implementation of the Reduce-Expand
3846 algorithm for LCS. It is a fast program to compute the approximate
3847 Longest Commons Subsequence of a set of strings.")
3848 (home-page "https://github.com/gdv/Reduce-Expand-for-LCS")
3849 (license license:gpl3+))))
3851 (define-public jacal
3858 "http://groups.csail.mit.edu/mac/ftpdir/scm/jacal-"
3861 "055zrn12a1dmy0dqkwrkq3fklbhg3yir6vn0lacp4mvbg8573a3q"))
3862 (patches (search-patches "jacal-fix-texinfo.patch"))))
3863 (build-system gnu-build-system)
3866 (modify-phases %standard-phases
3867 (add-before 'build 'pre-build
3868 ;; Don't use upstream's script - it really doesn't fit into
3869 ;; Guix's functional paradigm.
3870 (lambda* (#:key inputs outputs #:allow-other-keys)
3871 (substitute* "Makefile"
3872 (("^install: install-script") "install: "))))
3873 (add-after 'install 'post-install
3874 ;; Instead, we provide our own simplified script.
3875 (lambda* (#:key inputs outputs #:allow-other-keys)
3876 (let ((wrapper (string-append (assoc-ref outputs "out")
3878 (format (open wrapper (logior O_WRONLY O_CREAT))
3879 (string-append "#!~a\nexec ~a/bin/scm -ip1 "
3880 "-e '(slib:load \"~a/lib/jacal/math\") "
3883 (assoc-ref inputs "scm")
3884 (assoc-ref outputs "out"))
3885 (chmod wrapper #o555))))
3887 (lambda* (#:key inputs outputs #:allow-other-keys)
3888 (zero? (system* "./configure"
3889 (string-append "--prefix="
3890 (assoc-ref outputs "out")))))))))
3891 (inputs `(("scm" ,scm)))
3892 (native-inputs `(("unzip" ,unzip)
3893 ("texinfo" ,texinfo)))
3894 (synopsis "Symbolic mathematics system")
3895 (description "GNU JACAL is an interactive symbolic mathematics program based on
3896 Scheme. It manipulate and simplify a range of mathematical expressions such
3897 as equations, scalars, vectors, and matrices.")
3898 (home-page "https://www.gnu.org/software/jacal/")
3899 (license license:gpl3+)))
3905 (home-page "https://github.com/Z3Prover/z3")
3908 (uri (git-reference (url home-page)
3909 (commit (string-append "z3-" version))))
3910 (file-name (git-file-name name version))
3913 "014igqm5vwswz0yhz0cdxsj3a6dh7i79hvhgc3jmmmz3z0xm1gyn"))))
3914 (build-system gnu-build-system)
3917 (modify-phases %standard-phases
3918 (add-after 'unpack 'fix-compatability
3919 ;; Versions after 4.8.3 have immintrin.h IFDEFed for Windows only.
3921 (substitute* "src/util/mpz.cpp"
3922 (("#include <immintrin.h>") ""))
3924 (add-before 'configure 'bootstrap
3927 (system* "python" "scripts/mk_make.py"))))
3928 ;; work around gnu-build-system's setting --enable-fast-install
3929 ;; (z3's `configure' is a wrapper around the above python file,
3930 ;; which fails when passed --enable-fast-install)
3932 (lambda* (#:key inputs outputs #:allow-other-keys)
3933 (invoke "./configure"
3934 (string-append "--prefix=" (assoc-ref outputs "out")))))
3935 (add-after 'configure 'change-directory
3939 (add-before 'check 'make-test-z3
3941 ;; Build the test suite executable.
3942 (zero? (system* "make" "test-z3" "-j"
3943 (number->string (parallel-job-count))))))
3946 ;; Run all the tests that don't require arguments.
3947 (zero? (system* "./test-z3" "/a")))))))
3950 ("python" ,python-wrapper)))
3951 (synopsis "Theorem prover")
3952 (description "Z3 is a theorem prover and @dfn{satisfiability modulo
3953 theories} (SMT) solver. It provides a C/C++ API, as well as Python bindings.")
3954 (license license:expat)))
3956 (define-public elemental
3963 (url "https://github.com/elemental/Elemental.git")
3964 (commit (string-append "v" version))))
3965 (file-name (git-file-name name version))
3968 "1687xpjjzig27y2pnqv7hv09smpijyfdpz7qjgmcxf4shfajlfkc"))))
3969 (build-system cmake-build-system)
3970 (home-page "http://libelemental.org")
3972 `(("gfortran" ,gfortran)))
3974 `(("blas" ,openblas)
3975 ("gfortran:lib" ,gfortran "lib")
3984 `(#:build-type "Release" ;default RelWithDebInfo not supported
3985 #:configure-flags `("-DEL_DISABLE_PARMETIS:BOOL=YES"
3986 "-DEL_AVOID_COMPLEX_MPI:BOOL=NO"
3987 "-DEL_CACHE_WARNINGS:BOOL=YES"
3988 "-DEL_TESTS:BOOL=YES"
3989 "-DCMAKE_INSTALL_LIBDIR=lib"
3990 "-DGFORTRAN_LIB=gfortran")
3991 #:phases (modify-phases %standard-phases
3992 (add-before 'check 'mpi-setup
3994 (add-before 'check 'setup-tests
3996 ;; Parallelism is done at the MPI layer.
3997 (setenv "OMP_NUM_THREADS" "1")
3999 (add-after 'install 'remove-tests
4000 (lambda* (#:key outputs #:allow-other-keys)
4001 ;; Tests are installed, with no easy configuration
4002 ;; switch to prevent this, so delete them.
4003 (delete-file-recursively
4004 (string-append (assoc-ref outputs "out") "/bin"))
4006 (synopsis "Dense and sparse-direct linear algebra and optimization")
4007 (description "Elemental is a modern C++ library for distributed-memory
4008 dense and sparse-direct linear algebra, conic optimization, and lattice
4010 (license license:bsd-2)))
4012 (define-public mcrl2
4015 (version "201707.1.15162")
4018 (uri (string-append "http://www.mcrl2.org/download/devel/mcrl2-"
4023 "1ziww2fchsklm25hl9p2mngssxfh9w07nc114cncqaxfibqp2p8f"))))
4025 `(("subversion" ,subversion)))
4030 ("qtbase" ,qtbase)))
4031 (build-system cmake-build-system)
4032 (synopsis "Toolset for the mCRL2 formal specification language")
4034 "@dfn{mCRL2} (micro Common Representation Language 2) is a formal
4035 specification language for describing concurrent discrete event systems. Its
4036 toolset supports analysis and automatic verification, linearisation, simulation,
4037 state-space exploration and generation, and tools to optimise and analyse
4038 specifications. Also, state spaces can be manipulated, visualised and
4040 (home-page "https://mcrl2.org")
4041 (license license:boost1.0)))
4043 (define-public r-subplex
4050 (uri (cran-uri "subplex" version))
4053 "10cbgbx1bgsax5z7gz6716g360xpq4mvq19cf4qqrxv02mmwz57z"))))
4054 (build-system r-build-system)
4056 `(("gfortran" ,gfortran)))
4057 (home-page "https://cran.r-project.org/web/packages/subplex")
4058 (synopsis "Unconstrained optimization using the subplex algorithm")
4059 (description "This package implements the Subplex optimization algorithm.
4060 It solves unconstrained optimization problems using a simplex method on
4061 subspaces. The method is well suited for optimizing objective functions that
4062 are noisy or are discontinuous at the solution.")
4063 (license license:gpl3+)))
4065 (define-public r-desolve
4072 (uri (cran-uri "deSolve" version))
4075 "0qqc4mknw1jblzcmph1dg3k1p6w42yal0k1xjh8pqk7yb3a75hs5"))))
4076 (properties `((upstream-name . "deSolve")))
4077 (build-system r-build-system)
4079 `(("gfortran" ,gfortran)))
4080 (home-page "https://desolve.r-forge.r-project.org/")
4081 (synopsis "Solvers for initial value problems of differential equations")
4082 (description "This package provides functions that solve initial
4083 value problems of a system of first-order ordinary differential equations (ODE),
4084 of partial differential equations (PDE), of differential algebraic equations
4085 (DAE), and of delay differential equations. The functions provide an interface
4086 to the FORTRAN functions lsoda, lsodar, lsode, lsodes of the ODEPACK collection,
4087 to the FORTRAN functions dvode and daspk and a C-implementation of solvers of
4088 the Runge-Kutta family with fixed or variable time steps. The package contains
4089 routines designed for solving ODEs resulting from 1-D, 2-D and 3-D partial
4090 differential equations (PDE) that have been converted to ODEs by numerical
4092 (license license:gpl2+)))
4094 (define-public tcalc
4101 (uri (string-append "https://sites.google.com/site/mohammedisam2000/tcalc/tcalc-"
4105 "0jq806m4dqfia85nppfm75mml9w57g0cgv4cdw9bp3zymda83s0m"))))
4106 (build-system gnu-build-system)
4107 (synopsis "The terminal calculator")
4109 "The terminal calculator is a small program to help users of the GNU/Linux
4110 terminal do calculations simply and quickly. The formula to be calculated can
4111 be fed to @command{tcalc} through the command line.")
4112 (home-page "https://sites.google.com/site/mohammedisam2000/tcalc")
4113 (license license:gpl3+)))
4115 (define-public sundials
4122 (uri (string-append "https://computation.llnl.gov/projects/sundials/download/"
4123 "sundials-" version ".tar.gz"))
4126 "090s8ymhd0g1s1d44fa73r5yi32hb4biwahhbfi327zd64yn8kd2"))))
4127 (build-system cmake-build-system)
4129 `(("python" ,python-2))) ;for tests; syntax incompatible with python 3
4131 `(("fortran" ,gfortran) ;for fcmix
4133 ("suitesparse" ,suitesparse))) ;TODO: Add hypre
4135 `(#:configure-flags `("-DEXAMPLES_ENABLE_C:BOOL=ON"
4136 "-DEXAMPLES_ENABLE_CXX:BOOL=ON"
4137 "-DEXAMPLES_ENABLE_F77:BOOL=ON"
4138 "-DEXAMPLES_ENABLE_F90:BOOL=ON"
4139 "-DEXAMPLES_INSTALL:BOOL=OFF"
4141 "-DFCMIX_ENABLE:BOOL=ON"
4143 "-DKLU_ENABLE:BOOL=ON"
4144 ,(string-append "-DKLU_INCLUDE_DIR="
4145 (assoc-ref %build-inputs "suitesparse")
4147 ,(string-append "-DKLU_LIBRARY_DIR="
4148 (assoc-ref %build-inputs "suitesparse")
4150 (home-page "https://computation.llnl.gov/projects/sundials")
4151 (synopsis "Suite of nonlinear and differential/algebraic equation solvers")
4152 (description "SUNDIALS is a family of software packages implemented with
4153 the goal of providing robust time integrators and nonlinear solvers that can
4154 easily be incorporated into existing simulation codes.")
4155 (license license:bsd-3)))
4157 (define-public sundials-openmpi
4158 (package (inherit sundials)
4159 (name "sundials-openmpi")
4162 ("petsc" ,petsc-openmpi) ;support in SUNDIALS requires MPI
4163 ,@(package-inputs sundials)))
4165 (substitute-keyword-arguments (package-arguments sundials)
4166 ((#:configure-flags flags '())
4167 `(cons* "-DMPI_ENABLE:BOOL=ON"
4168 "-DPETSC_ENABLE:BOOL=ON"
4169 (string-append "-DPETSC_INCLUDE_DIR="
4170 (assoc-ref %build-inputs "petsc")
4172 (string-append "-DPETSC_LIBRARY_DIR="
4173 (assoc-ref %build-inputs "petsc")
4176 ((#:phases phases '%standard-phases)
4177 `(modify-phases ,phases
4178 (add-before 'check 'mpi-setup
4179 ,%openmpi-setup)))))
4180 (synopsis "SUNDIALS with OpenMPI support")))
4182 (define-public combinatorial-blas
4184 (name "combinatorial-blas")
4189 (uri (string-append "http://eecs.berkeley.edu/~aydin/CombBLAS_FILES/"
4191 (match (string-split version #\.)
4192 ((major minor patch)
4193 (string-append major minor "_" patch))) ;e.g. "16_2"
4197 "1a9wbgdqyy1whhfc0yl0yqkax3amnqa6iihhq48d063gc0jwfd9a"))
4198 (patches (search-patches "combinatorial-blas-awpm.patch"
4199 "combinatorial-blas-io-fix.patch"))))
4200 (build-system cmake-build-system)
4203 ("test-data" ,(origin
4205 (uri (string-append "https://people.eecs.berkeley.edu/~aydin/"
4206 "CombBLAS_FILES/testdata_combblas1.6.1.tgz"))
4209 "01y2781cy3fww7znmidrp85mf8zx0c905w5vzvk1mgrmhhynim87"))))))
4211 `(#:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES"
4212 "-DCMAKE_CXX_FLAGS=-DUSE_FUNNEL")
4213 #:parallel-tests? #f ;tests use 'mpiexec -n4'
4215 (modify-phases %standard-phases
4216 (add-before 'check 'mpi-setup
4218 (add-before 'check 'test-setup
4219 (lambda* (#:key inputs #:allow-other-keys)
4220 (setenv "OMP_NUM_THREADS" "2")
4221 (invoke "tar" "xf" (assoc-ref inputs "test-data")))))))
4222 (home-page "https://people.eecs.berkeley.edu/~aydin/CombBLAS/html/")
4223 (synopsis "Linear algebra primitives for graph analytics")
4224 (description "The Combinatorial BLAS (CombBLAS) is an extensible
4225 distributed-memory parallel graph library offering a small but powerful set of
4226 linear algebra primitives specifically targeting graph analytics.")
4228 license:gpl2+ ;include/psort/(funnel|sort)*.h
4229 license:x11 ;usort and psort
4230 license:bsd-3)))) ;CombBLAS and MersenneTwister.h