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 John Darrington <jmd@gnu.org>
5 ;;; Copyright © 2014, 2015, 2016 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 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 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 Kei Kebreau <kei@openmailbox.org>
15 ;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org>
16 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
17 ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
18 ;;; Copyright © 2017 Paul Garlick <pgarlick@tourbillion-technology.com>
19 ;;; Copyright © 2017 ng0 <contact.ng0@cryptolab.net>
21 ;;; This file is part of GNU Guix.
23 ;;; GNU Guix is free software; you can redistribute it and/or modify it
24 ;;; under the terms of the GNU General Public License as published by
25 ;;; the Free Software Foundation; either version 3 of the License, or (at
26 ;;; your option) any later version.
28 ;;; GNU Guix is distributed in the hope that it will be useful, but
29 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
30 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 ;;; GNU General Public License for more details.
33 ;;; You should have received a copy of the GNU General Public License
34 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
36 (define-module (gnu packages maths)
37 #:use-module (ice-9 regex)
38 #:use-module (gnu packages)
39 #:use-module ((guix licenses) #:prefix license:)
40 #:use-module (guix packages)
41 #:use-module (guix download)
42 #:use-module (guix git-download)
43 #:use-module (guix utils)
44 #:use-module (guix build utils)
45 #:use-module (guix build-system cmake)
46 #:use-module (guix build-system gnu)
47 #:use-module (guix build-system r)
48 #:use-module (gnu packages algebra)
49 #:use-module (gnu packages bison)
50 #:use-module (gnu packages boost)
51 #:use-module (gnu packages check)
52 #:use-module (gnu packages cmake)
53 #:use-module (gnu packages compression)
54 #:use-module (gnu packages curl)
55 #:use-module (gnu packages cyrus-sasl)
56 #:use-module (gnu packages documentation)
57 #:use-module (gnu packages elf)
58 #:use-module (gnu packages flex)
59 #:use-module (gnu packages fltk)
60 #:use-module (gnu packages fontutils)
61 #:use-module (gnu packages gettext)
62 #:use-module (gnu packages gcc)
63 #:use-module (gnu packages gd)
64 #:use-module (gnu packages ghostscript)
65 #:use-module (gnu packages graphviz)
66 #:use-module (gnu packages gtk)
67 #:use-module (gnu packages image)
68 #:use-module (gnu packages less)
69 #:use-module (gnu packages lisp)
70 #:use-module (gnu packages logging)
71 #:use-module (gnu packages gnome)
72 #:use-module (gnu packages guile)
73 #:use-module (gnu packages xorg)
74 #:use-module (gnu packages gl)
75 #:use-module (gnu packages m4)
76 #:use-module (gnu packages mpi)
77 #:use-module (gnu packages multiprecision)
78 #:use-module (gnu packages netpbm)
79 #:use-module (gnu packages pcre)
80 #:use-module (gnu packages popt)
81 #:use-module (gnu packages perl)
82 #:use-module (gnu packages pkg-config)
83 #:use-module (gnu packages python)
84 #:use-module (gnu packages readline)
85 #:use-module (gnu packages tbb)
86 #:use-module (gnu packages shells)
87 #:use-module (gnu packages tcl)
88 #:use-module (gnu packages texinfo)
89 #:use-module (gnu packages tex)
90 #:use-module (gnu packages tls)
91 #:use-module (gnu packages wxwidgets)
92 #:use-module (gnu packages xml)
93 #:use-module (gnu packages zip)
94 #:use-module (srfi srfi-1))
96 (define-public c-graph
102 (uri (string-append "mirror://gnu/c-graph/c-graph-" version
105 "1hlvpzrh7hzzf533diyfiabzskddi8zx92av9hwkjw3l46z7qv01"))))
106 (build-system gnu-build-system)
108 `(("fortran" ,gfortran)))
109 (synopsis "Visualizing and demonstrating convolution")
111 "GNU C-Graph is a tool for demonstrating the theory of convolution.
112 Thus, it can serve as an excellent aid to students of signal and systems
113 theory in visualizing the convolution process. Rather than forcing the
114 student to write code, the program offers an intuitive interface with
115 interactive dialogs to guide them.")
116 (license license:gpl3+)
117 (home-page "http://www.gnu.org/software/c-graph/")))
126 (uri (string-append "https://github.com/stcorp/coda/releases/download/"
127 version "/coda-" version ".tar.gz"))
129 (base32 "04b9l3wzcix0mnfq77mwnil6cbr8h2mki8myvy0lzn236qcwaq1h"))
130 (patches (search-patches "coda-use-system-libs.patch"))
131 (modules '((guix build utils)))
133 ;; Make sure we don't use the bundled software.
134 '(for-each (lambda (d)
135 (delete-file-recursively (string-append "libcoda/" d)))
136 '("zlib" "pcre" "expat")))))
138 `(("fortran" ,gfortran)
140 ("python-numpy" ,python-numpy)))
147 (build-system gnu-build-system)
149 '(#:configure-flags '("--with-hdf4" "--with-hdf5" "--enable-python"
150 "LIBS= -lz -lpcre -lexpat")))
151 (synopsis "A common interface to various earth observation data formats")
153 "The Common Data Access toolbox (CODA) provides a set of interfaces for
154 reading remote sensing data from earth observation data files. It consists of
155 command line applications and interfaces to the C, Fortran, Python, and Java
156 programming languages.")
157 (home-page "https://stcorp.nl/coda")
158 (license license:gpl2+)))
166 (uri (string-append "mirror://gnu/units/units-" version
169 "1awhjw9zjlfb8s5g3yyx63f7ddfcr1sanlbxpqifmrgq24ql198b"))))
170 (build-system gnu-build-system)
171 (synopsis "Conversion between thousands of scales")
173 "GNU Units converts numeric quantities between units of measure. It
174 can handle scale changes through adaptive usage of standard scale
175 prefixes (micro-, kilo-, etc.). It can also handle nonlinear
176 conversions such as Fahrenheit to Celsius. Its interpreter is powerful
177 enough to be used effectively as a scientific calculator.")
178 (license license:gpl3+)
179 (home-page "http://www.gnu.org/software/units/")))
181 (define-public double-conversion
183 (name "double-conversion")
188 "https://github.com/floitsch/double-conversion/archive/v"
190 (file-name (string-append name "-" version ".tar.gz"))
193 "0cnr8xhyjfxijay8ymkqcph3672wp2lj23qhdmr3m4kia5kpdf83"))))
194 (build-system cmake-build-system)
196 '(#:test-target "test"
197 #:configure-flags '("-DBUILD_SHARED_LIBS=ON"
198 "-DBUILD_TESTING=ON")))
199 (home-page "https://github.com/floitsch/double-conversion")
200 (synopsis "Conversion routines for IEEE doubles")
202 "The double-conversion library provides binary-decimal and decimal-binary
203 routines for IEEE doubles. The library consists of efficient conversion
204 routines that have been extracted from the V8 JavaScript engine.")
205 (license license:bsd-3)))
207 (define-public dionysus
213 (uri (string-append "mirror://gnu/dionysus/dionysus-" version
217 "1aqnvw6z33bzqgd1ga571pnx6vq2zrkckm1cz91grv45h4jr9vgs"))))
218 (build-system gnu-build-system)
219 (inputs `(("tcl" ,tcl))) ;for 'tclsh'
220 (synopsis "Local search for universal constants and scientific values")
222 "GNU Dionysus is a convenient system for quickly retrieving the values of
223 mathematical constants used in science and engineering. Values can be
224 searched using a simple command-line tool, choosing from three databases:
225 universal constants, atomic numbers, and constants related to
227 (license license:gpl3+)
228 (home-page "http://www.gnu.org/software/dionysus/")))
236 (uri (string-append "mirror://gnu/gsl/gsl-"
240 "1yxdzqjwmi2aid650fa9zyr8llw069x7lm489wx9nnfdi6vh09an"))
241 (patches (search-patches "gsl-test-i686.patch"))))
242 (build-system gnu-build-system)
244 `(#:parallel-tests? #f))
245 (home-page "http://www.gnu.org/software/gsl/")
246 (synopsis "Numerical library for C and C++")
248 "The GNU Scientific Library is a library for numerical analysis in C
249 and C++. It includes a wide range of mathematical routines, with over 1000
250 functions in total. Subject areas covered by the library include:
251 differential equations, linear algebra, Fast Fourier Transforms and random
253 (license license:gpl3+)))
262 (uri (string-append "mirror://gnu/glpk/glpk-"
266 "1adbvwiaqrv9pql9ry3lhn2vfsxnff2vh4fs477d90kpfx0xwrlq"))))
267 (build-system gnu-build-system)
271 `(#:configure-flags '("--with-gmp")))
272 (home-page "https://www.gnu.org/software/glpk/")
273 (synopsis "GNU Linear Programming Kit, supporting the MathProg language")
275 "GLPK is a C library for solving large-scale linear programming (LP),
276 mixed integer programming (MIP), and other related problems. It supports the
277 GNU MathProg modeling language, a subset of the AMPL language, and features a
278 translator for the language. In addition to the C library, a stand-alone
279 LP/MIP solver is included in the package.")
280 (license license:gpl3+)))
289 (uri (string-append "http://www.4ti2.de/version_" version
290 "/4ti2-" version ".tar.gz"))
293 "1frix3rnm9ffr93alqzw4cavxbfpf524l8rfbmcpyhwd3n1km0yl"))))
294 (build-system gnu-build-system)
296 `(("which" ,(@ (gnu packages base) which)))) ; for the tests
300 (home-page "http://www.4ti2.de/")
301 (synopsis "Mathematical tool suite for problems on linear spaces")
303 "4ti2 implements algorithms for solving algebraic, geometric and
304 combinatorial problems on linear spaces. Among others, it solves systems
305 of linear equations, computes extreme rays of polyhedral cones, solves
306 integer programming problems and computes Markov bases for statistics.")
307 (license license:gpl2+)))
309 (define-public cddlib
316 (uri (string-append "ftp://ftp.ifor.math.ethz.ch/pub/fukuda/cdd/cddlib-"
317 (string-delete #\. version) ".tar.gz"))
320 "1dasasscwfg793q8fwzgwf64xwj7w62yfvszpr8x8g38jka08vgy"))))
321 (build-system gnu-build-system)
324 (home-page "https://www.inf.ethz.ch/personal/fukudak/cdd_home/index.html")
325 (synopsis "Library for convex hulls and extreme rays of polyhedra")
327 "The C-library cddlib implements the Double Description Method of
328 Motzkin et al. for generating all vertices (i.e. extreme points) and extreme
329 rays of a general convex polyhedron given by a system of linear inequalities
330 in arbitrary dimension. It can also be used for the converse operation of
331 computing convex hulls.")
332 (license license:gpl2+)))
334 (define-public arpack-ng
341 (uri (string-append "https://github.com/opencollab/arpack-ng/archive/"
343 (file-name (string-append name "-" version ".tar.gz"))
346 "1fwch6vipms1ispzg2djvbzv5wag36f1dmmr3xs3mbp6imfyhvff"))))
347 (build-system gnu-build-system)
348 (home-page "https://github.com/opencollab/arpack-ng")
351 ("fortran" ,gfortran)))
352 (synopsis "Fortran subroutines for solving eigenvalue problems")
354 "ARPACK-NG is a collection of Fortran77 subroutines designed to solve
355 large scale eigenvalue problems.")
356 (license (license:non-copyleft "file://COPYING"
357 "See COPYING in the distribution."))))
359 (define-public arpack-ng-openmpi
360 (package (inherit arpack-ng)
361 (name "arpack-ng-openmpi")
364 ,@(package-inputs arpack-ng)))
365 (arguments `(#:configure-flags '("--enable-mpi")))
366 (synopsis "Fortran subroutines for solving eigenvalue problems with MPI")))
368 (define-public lapack
375 (uri (string-append "http://www.netlib.org/lapack/lapack-"
379 "0lk3f97i9imqascnlf6wr5mjpyxqcdj73pgj97dj2mgvyg9z1n4s"))))
380 (build-system cmake-build-system)
381 (home-page "http://www.netlib.org/lapack/")
382 (inputs `(("fortran" ,gfortran)
383 ("python" ,python-2)))
385 `(#:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES"
387 #:phases (alist-cons-before
389 (lambda* (#:key inputs #:allow-other-keys)
390 (let ((python (assoc-ref inputs "python")))
391 (substitute* "lapack_testing.py"
392 (("/usr/bin/env python") python))))
394 (synopsis "Library for numerical linear algebra")
396 "LAPACK is a Fortran 90 library for solving the most commonly occurring
397 problems in numerical linear algebra.")
398 (license (license:non-copyleft "file://LICENSE"
399 "See LICENSE in the distribution."))))
401 (define-public scalapack
408 (uri (string-append "http://www.netlib.org/scalapack/scalapack-"
412 "0p1r61ss1fq0bs8ynnx7xq4wwsdvs32ljvwjnx6yxr8gd6pawx0c"))))
413 (build-system cmake-build-system)
416 ("fortran" ,gfortran)
417 ("lapack" ,lapack))) ;for testing only
419 `(#:configure-flags `("-DBUILD_SHARED_LIBS:BOOL=YES")))
420 (home-page "http://www.netlib.org/scalapack/")
421 (synopsis "Library for scalable numerical linear algebra")
423 "ScaLAPACK is a Fortran 90 library of high-performance linear algebra
424 routines on parallel distributed memory machines. ScaLAPACK solves dense and
425 banded linear systems, least squares problems, eigenvalue problems, and
426 singular value problems.")
427 (license (license:bsd-style "file://LICENSE"
428 "See LICENSE in the distribution."))))
430 (define-public gnuplot
436 (uri (string-append "mirror://sourceforge/gnuplot/gnuplot/"
441 "0lr065qdlgss8lmy31l7hkmnk9fp4lvqq9qgb1f1209f36zy1wr5"))))
442 (build-system gnu-build-system)
443 (inputs `(("readline" ,readline)
447 (native-inputs `(("pkg-config" ,pkg-config)
448 ("texlive" ,texlive-minimal)))
449 (home-page "http://www.gnuplot.info")
450 (synopsis "Command-line driven graphing utility")
451 (description "Gnuplot is a portable command-line driven graphing
452 utility. It was originally created to allow scientists and students to
453 visualize mathematical functions and data interactively, but has grown to
454 support many non-interactive uses such as web scripting. It is also used as a
455 plotting engine by third-party applications like Octave.")
456 ;; X11 Style with the additional restriction that derived works may only be
457 ;; distributed as patches to the original.
458 (license (license:fsf-free
459 "http://gnuplot.cvs.sourceforge.net/gnuplot/gnuplot/Copyright"))))
468 (uri (string-append "https://github.com/OkoSanto/GCTP/archive/v"
470 (file-name (string-append name "-" version ".tar.gz"))
473 "0l9aqnqynh9laicn5dxf3rsb1n14xiks79wbyqccirzmjqd1c1x4"))))
475 `(("fortran" ,gfortran)))
476 (build-system gnu-build-system)
477 (synopsis "General Cartographic Transformation Package (GCTP)")
479 "The General Cartographic Transformation Package (GCTP) is a system of
480 software routines designed to permit the transformation of coordinate pairs
481 from one map projection to another. The GCTP is the standard computer
482 software used by the National Mapping Division for map projection
484 (home-page "https://github.com/OkoSanto/GCTP")
485 (license license:public-domain))) ;https://www2.usgs.gov/laws/info_policies.html
494 (uri (string-append "https://support.hdfgroup.org/ftp/HDF/releases/HDF"
495 version "/src/hdf-" version ".tar.bz2"))
497 (base32 "020jh563sjyxsgml8l809d2i1d4ms9shivwj3gbm7n0ilxbll8id"))
498 (patches (search-patches "hdf4-architectures.patch"
499 "hdf4-reproducibility.patch"
500 "hdf4-shared-fortran.patch"))))
502 (build-system gnu-build-system)
504 `(("gfortran" ,gfortran)
509 ("libjpeg" ,libjpeg)))
511 `(#:parallel-tests? #f
512 #:configure-flags '("--enable-shared")
514 (modify-phases %standard-phases
515 (add-before 'configure 'patchbuild
518 '("mfhdf/hdfimport/testutil.sh.in" "hdf/util/testutil.sh.in")
520 (("/bin/mkdir") "mkdir"))
521 (substitute* (find-files "." "^Makefile\\.in$")
522 (("@HDF_BUILD_XDR_TRUE@XDR_ADD = \
523 -R\\$\\(abs_top_builddir\\)/mfhdf/xdr/\\.libs") "")
524 (("@HDF_BUILD_SHARED_TRUE@AM_LDFLAGS = \
525 -R\\$\\(abs_top_builddir\\)/mfhdf/libsrc/\\.libs \
526 -R\\$\\(abs_top_builddir\\)/hdf/src/\\.libs \\$\\(XDR_ADD\\)") "")))))))
527 (home-page "https://www.hdfgroup.org/products/hdf4/")
529 "Library and multi-object file format for storing and managing data")
530 (description "HDF4 is a library and multi-object file format for storing
531 and managing data between machines. HDF4 is an older hierarchical data format,
532 incompatible with HDF5.")
534 (license:non-copyleft
535 "https://www.hdfgroup.org/ftp/HDF/HDF_Current/src/unpacked/COPYING"))))
537 (define-public hdf4-alt
542 (substitute-keyword-arguments (package-arguments hdf4)
543 ((#:configure-flags flags) `(cons* "--disable-netcdf" ,flags))))
545 "HDF4 without netCDF API, can be combined with the regular netCDF library")))
554 (uri (list (string-append "http://www.hdfgroup.org/ftp/HDF5/releases/"
555 "hdf5-" version "/src/hdf5-"
557 (string-append "https://support.hdfgroup.org/ftp/HDF5/"
560 (take (string-split version #\.) 2))
561 "/src/hdf5-" version ".tar.bz2")))
563 (base32 "13542vrnl1p35n8vbq0wzk40vddmm33q5nh04j98c7r1yjnxxih1"))
564 (patches (list (search-patch "hdf5-config-date.patch")))))
565 (build-system gnu-build-system)
569 `(;; Some of the users, notably Flann, need the C++ interface.
570 #:configure-flags '("--enable-cxx")
573 (modify-phases %standard-phases
574 (add-before 'configure 'patch-configure
576 (substitute* "configure"
579 (add-after 'install 'patch-references
580 (lambda* (#:key inputs outputs #:allow-other-keys)
581 (let ((bin (string-append (assoc-ref outputs "out") "/bin"))
582 (zlib (assoc-ref inputs "zlib")))
583 (substitute* (find-files bin "h5p?cc")
585 (string-append "-L" zlib "/lib " lib)))
587 (home-page "http://www.hdfgroup.org")
588 (synopsis "Management suite for extremely large and complex data")
589 (description "HDF5 is a suite that makes possible the management of
590 extremely large and complex data collections.")
591 (license (license:x11-style
592 "http://www.hdfgroup.org/ftp/HDF5/current/src/unpacked/COPYING"))))
594 (define-public hdf-eos2
601 (uri "ftp://edhs1.gsfc.nasa.gov\
602 /edhs/hdfeos/latest_release/HDF-EOS2.19v1.00.tar.Z")
604 (base32 "0c9fcz25s292ldap12wxmlrvnyz99z24p63d8fwx51bf8s0s1zrz"))
605 (patches (search-patches "hdf-eos2-remove-gctp.patch"
606 "hdf-eos2-build-shared.patch"
607 "hdf-eos2-fortrantests.patch"))))
608 (build-system gnu-build-system)
610 `(("gfortran" ,gfortran)))
612 `(("hdf4" ,hdf4-alt) ; assume most HDF-EOS2 users won't use the HDF4 netCDF API
617 `( #:configure-flags '("--enable-install-include" "--enable-shared"
618 "CC=h4cc -Df2cFortran" "LIBS=-lgctp")
619 #:parallel-tests? #f))
620 (home-page "http://hdfeos.org/software/library.php#HDF-EOS2")
621 (synopsis "HDF4-based data format for NASA's Earth Observing System")
622 (description "HDF-EOS2 is a software library built on HDF4 which supports
623 the construction of data structures used in NASA's Earth Observing
624 System (Grid, Point and Swath).")
626 ;; Source files carry a permissive license header.
627 (license (license:non-copyleft home-page))))
629 (define-public hdf-eos5
635 (uri (string-append "ftp://edhs1.gsfc.nasa.gov\
636 /edhs/hdfeos5/latest_release/HDF-EOS5." version ".tar.Z"))
639 "1p83333nzzy8rn5chxlm0hrkjjnhh2w1ji8ac0f9q4xzg838i58i"))
640 (patches (search-patches "hdf-eos5-build-shared.patch"
641 "hdf-eos5-remove-gctp.patch"
642 "hdf-eos5-fix-szip.patch"
643 "hdf-eos5-fortrantests.patch"))))
645 `(("gfortran" ,gfortran)))
646 (build-system gnu-build-system)
652 `(#:configure-flags '("--enable-install-include" "--enable-shared"
653 "CC=h5cc -Df2cFortran" "LIBS=-lgctp")
654 #:parallel-tests? #f))
655 (synopsis "HDF5-based data format for NASA's Earth Observing System")
657 "HDF-EOS5 is a software library built on HDF5 to support the construction
658 of data structures used in NASA's Earth Observing System (Grid, Point and
660 (home-page "http://www.hdfeos.org/software/library.php#HDF-EOS5")
662 ;; Source files carry a permissive license header.
663 (license (license:non-copyleft home-page))))
665 (define-public hdf5-parallel-openmpi
666 (package (inherit hdf5)
667 (name "hdf5-parallel-openmpi")
670 ,@(package-inputs hdf5)))
672 (substitute-keyword-arguments `(#:configure-flags '("--enable-parallel")
673 ,@(package-arguments hdf5))
675 `(modify-phases ,phases
676 (add-before 'check 'patch-tests
678 ;; OpenMPI's mpirun will exit with non-zero status if it
679 ;; detects an "abnormal termination", i.e. any process not
680 ;; calling MPI_Finalize(). Since the test is explicitely
681 ;; avoiding MPI_Finalize so as not to have at_exit and thus
682 ;; H5C_flush_cache from being called, mpirun will always
683 ;; complain, so turn this test off.
684 (substitute* "testpar/Makefile"
685 (("(^TEST_PROG_PARA.*)t_pflush1(.*)" front back)
686 (string-append front back "\n")))
687 (substitute* "tools/h5diff/testph5diff.sh"
688 (("/bin/sh") (which "sh")))
690 (synopsis "Management suite for data with parallel IO support")))
692 (define-public h5check
699 (uri (string-append "http://www.hdfgroup.org/ftp/HDF5/tools/"
700 "h5check/src/h5check-" version ".tar.gz"))
703 "1gm76jbwhz9adbxgn14zx8cj33dmjdr2g5xcy0m9c2gakp8w59kj"))))
704 (build-system gnu-build-system)
705 (inputs `(("hdf5" ,hdf5))) ;h5cc for tests
706 (home-page "https://www.hdfgroup.org/products/hdf5_tools/h5check.html")
707 (synopsis "HDF5 format checker")
708 (description "@code{h5check} is a validation tool for verifying that an
709 HDF5 file is encoded according to the HDF File Format Specification.")
710 (license (license:x11-style "file://COPYING"))))
712 (define-public netcdf
719 (uri (string-append "ftp://ftp.unidata.ucar.edu/pub/netcdf/"
720 "netcdf-" version ".tar.gz"))
723 "1blc7ik5yin7i0ls2kag0a9xjk12m0dzx6v1x88az3ras3scci2d"))
724 (patches (search-patches "netcdf-date-time.patch"
725 "netcdf-tst_h_par.patch"))))
726 (build-system gnu-build-system)
730 ("graphviz" ,graphviz)))
735 ("libjpeg" ,libjpeg)))
737 `(#:configure-flags '("--enable-doxygen" "--enable-dot" "--enable-hdf4")
738 #:parallel-tests? #f)) ;various race conditions
739 (home-page "http://www.unidata.ucar.edu/software/netcdf/")
740 (synopsis "Library for scientific data")
741 (description "NetCDF is an interface for scientific data access and a
742 software library that provides an implementation of the interface. The netCDF
743 library defines a machine-independent format for representing scientific data.
744 Together, the interface, library, and format support the creation, access, and
745 sharing of scientific data.")
746 (license (license:x11-style "file://COPYRIGHT"))))
748 (define-public netcdf-parallel-openmpi
749 (package (inherit netcdf)
750 (name "netcdf-parallel-openmpi")
753 ,@(alist-replace "hdf5" (list hdf5-parallel-openmpi)
754 (package-inputs netcdf))))
755 ;; TODO: Replace pkg-config references in nc-config with absolute references
757 (substitute-keyword-arguments (package-arguments netcdf)
758 ((#:configure-flags flags)
759 `(cons* "CC=mpicc" "CXX=mpicxx"
760 "--enable-parallel-tests"
761 ;; Shared libraries not supported with parallel IO.
762 "--disable-shared" "--with-pic"
771 (uri (string-append "http://ab-initio.mit.edu/nlopt/nlopt-"
774 (base32 "12cfkkhcdf4zmb6h7y6qvvdvqjs2xf9sjpa3rl3bq76px4yn76c0"))))
775 (build-system gnu-build-system)
777 `(;; Shared libraries are not built by default. They are required to
778 ;; build the Guile, Octave, and Python bindings.
779 #:configure-flags '("--enable-shared")
782 (modify-phases %standard-phases
783 (add-before 'configure 'set-libnlopt-file-name
784 (lambda* (#:key outputs #:allow-other-keys)
785 ;; Make sure the Scheme module refers to the library by its
786 ;; absolute file name (we cannot do that from a snippet
787 ;; because the expansion of @libdir@ contains
789 (let ((out (assoc-ref outputs "out")))
790 (substitute* "swig/nlopt.scm.in"
792 (string-append out "/lib/libnlopt")))
794 (inputs `(("guile" ,guile-2.0)))
795 (native-inputs `(("pkg-config" ,pkg-config)))
796 (home-page "http://ab-initio.mit.edu/wiki/")
797 (synopsis "Library for nonlinear optimization")
798 (description "NLopt is a library for nonlinear optimization, providing a
799 common interface for a number of different free optimization routines available
800 online as well as original implementations of various other algorithms.")
801 (license license:lgpl2.1+)))
810 "http://www.coin-or.org/download/source/Ipopt/Ipopt-"
814 "09bk2hqy2vgi4yi76xng9zxakddwqy3wij9nx7wf2vfbxxpazrsk"))
815 (modules '((guix build utils)))
817 ;; Make sure we don't use the bundled software.
818 '(delete-file-recursively "ThirdParty"))))
819 (build-system gnu-build-system)
821 '(#:phases (modify-phases %standard-phases
822 (add-after 'install 'add--L-flags-in-ipopt.pc
823 (lambda* (#:key inputs outputs #:allow-other-keys)
824 ;; The '.pc' file lists '-llapack -lblas' in "Libs";
825 ;; move it to "Libs.private" where it belongs, and add a
826 ;; '-L' flag for LAPACK.
827 (let ((out (assoc-ref outputs "out"))
828 (lapack (assoc-ref inputs "lapack")))
829 (substitute* (string-append out "/lib/pkgconfig/"
831 (("Libs: (.*)-llapack -lblas(.*)$" _ before after)
832 (string-append "Libs: " before " " after "\n"
833 "Libs.private: " before
834 "-L" lapack "/lib -llapack -lblas "
838 `(("gfortran" ,gfortran)))
840 ;; TODO: Maybe add dependency on COIN-MUMPS, ASL, and HSL.
841 `(("lapack" ,lapack))) ;for both libblas and liblapack
842 (home-page "http://www.coin-or.org")
843 (synopsis "Large-scale nonlinear optimizer")
845 "The Interior Point Optimizer (IPOPT) is a software package for
846 large-scale nonlinear optimization. It provides C++, C, and Fortran
848 (license license:epl1.0)))
852 (name "ceres-solver")
854 (home-page "http://ceres-solver.org/")
857 (uri (string-append home-page "ceres-solver-"
861 "0i7qkbf8g6pd8arxzldppga26ckv93y8zldsfz6wbd4n6b1nqrjd"))))
862 (build-system cmake-build-system)
864 ;; TODO: Build HTML user documentation and install separately.
865 '(#:configure-flags '("-DBUILD_EXAMPLES=OFF"
866 "-DBUILD_SHARED_LIBS=ON")
868 #:phases (modify-phases %standard-phases
869 (add-before 'configure 'set-library-directory
871 ;; Install libraries to lib/, not lib64/.
872 (substitute* "internal/ceres/CMakeLists.txt"
873 (("set\\(LIB_SUFFIX \"64\"\\)")
874 "set(LIB_SUFFIX \"\")"))
877 `(("pkg-config" ,pkg-config)))
879 `(("glog" ,glog))) ;for #include <glog/glog.h>
884 ("suitesparse" ,suitesparse)
886 (synopsis "C++ library for solving large optimization problems")
888 "Ceres Solver is a C++ library for modeling and solving large,
889 complicated optimization problems. It is a feature rich, mature and
890 performant library which has been used in production since 2010. Ceres Solver
891 can solve two kinds of problems:
893 @item non-linear least squares problems with bounds constraints;
894 @item general unconstrained optimization problems.
896 (license license:bsd-3)))
898 ;; For a fully featured Octave, users are strongly recommended also to install
899 ;; the following packages: texinfo, less, ghostscript, gnuplot.
900 (define-public octave
907 (uri (string-append "mirror://gnu/octave/octave-"
911 "19vvliwxgip0af812vny5xy5r8kacyj7v62203mh4z2n3p14b78i"))))
912 (build-system gnu-build-system)
915 ("readline" ,readline)
919 ("arpack" ,arpack-ng)
922 ("fontconfig" ,fontconfig)
923 ("freetype" ,freetype)
931 ("gfortran" ,gfortran)
932 ("pkg-config" ,pkg-config)
934 ;; The following inputs are not actually used in the build process.
935 ;; However, the ./configure gratuitously tests for their existence and
936 ;; assumes that programs not present at build time are also not, and
937 ;; can never be, available at run time! If these inputs are therefore
938 ;; not present, support for them will be built out. However, Octave
939 ;; will still run without them, albeit without the features they
943 ("ghostscript" ,ghostscript)
944 ("gnuplot" ,gnuplot)))
947 (list (string-append "--with-shell="
948 (assoc-ref %build-inputs "bash")
950 (home-page "https://www.gnu.org/software/octave/")
951 (synopsis "High-level language for numerical computation")
952 (description "GNU Octave is a high-level interpreted language that is
953 specialized for numerical computations. It can be used for both linear and
954 non-linear applications and it provides great support for visualizing results.
955 Work may be performed both at the interactive command-line as well as via
957 (license license:gpl3+)))
959 (define-public opencascade-oce
961 (name "opencascade-oce")
967 "https://github.com/tpaviot/oce/archive/OCE-"
972 "0vpmnb0k5y2f7lpmwx9pg9yfq24zjvnsak5alzacncfm1hv9b6cd"))))
973 (build-system cmake-build-system)
976 (list "-DOCE_TESTING:BOOL=ON"
977 "-DOCE_USE_TCL_TEST_FRAMEWORK:BOOL=ON"
979 (string-append "-DOCE_INSTALL_PREFIX:PATH="
980 (assoc-ref %outputs "out"))
981 "-UCMAKE_INSTALL_RPATH")))
983 `(("freetype" ,freetype)
990 `(("python" ,python-wrapper)))
991 (home-page "https://github.com/tpaviot/oce")
992 (synopsis "Libraries for 3D modeling and numerical simulation")
994 "Open CASCADE is a set of libraries for the development of applications
995 dealing with 3D CAD data or requiring industrial 3D capabilities. It includes
996 C++ class libraries providing services for 3D surface and solid modeling, CAD
997 data exchange, and visualization. It is used for development of specialized
998 software dealing with 3D models in design (CAD), manufacturing (CAM),
999 numerical simulation (CAE), measurement equipment (CMM), and quality
1000 control (CAQ) domains.
1002 This is the ``Community Edition'' (OCE) of Open CASCADE, which gathers
1003 patches, improvements, and experiments contributed by users over the official
1004 Open CASCADE library.")
1005 (license (list license:lgpl2.1; OCE libraries, with an exception for the
1006 ; use of header files; see
1007 ; OCCT_LGPL_EXCEPTION.txt
1008 license:public-domain; files
1009 ; src/Standard/Standard_StdAllocator.hxx and
1010 ; src/NCollection/NCollection_StdAllocator.hxx
1011 license:expat; file src/OpenGl/OpenGl_glext.h
1012 license:bsd-3)))); test framework gtest
1021 (uri (string-append "http://gmsh.info/src/gmsh-"
1022 version "-source.tgz"))
1024 (base32 "1slf0bfkwrcgn6296wb4qhbk4ahz6i4wfb10hnim08x05vrylag8"))
1025 (modules '((guix build utils)))
1027 ;; Remove non-free METIS code
1028 '(delete-file-recursively "contrib/Metis"))))
1029 (build-system cmake-build-system)
1032 ("gfortran" ,gfortran)
1039 ("libxext" ,libxext)))
1041 `(("fontconfig" ,fontconfig)
1042 ("libxft" ,libxft)))
1044 `(#:configure-flags `("-DENABLE_METIS:BOOL=OFF"
1045 "-DENABLE_BUILD_SHARED:BOOL=ON"
1046 "-DENABLE_BUILD_DYNAMIC:BOOL=ON")
1047 #:phases (modify-phases %standard-phases
1051 (zero? (system* "make" "test"
1052 ;; Disable this test. See
1053 ;; https://geuz.org/trac/gmsh/ticket/271
1054 "ARGS=-E component8_in_a_box")))))))
1055 (home-page "http://www.geuz.org/gmsh/")
1056 (synopsis "3D finite element grid generator")
1057 (description "Gmsh is a 3D finite element grid generator with a built-in
1058 CAD engine and post-processor. Its design goal is to provide a fast, light
1059 and user-friendly meshing tool with parametric input and advanced
1060 visualization capabilities. Gmsh is built around four modules: geometry,
1061 mesh, solver and post-processing. The specification of any input to these
1062 modules is done either interactively using the graphical user interface or in
1063 ASCII text files using Gmsh's own scripting language.")
1064 (license license:gpl2+)))
1066 (define-public petsc
1073 ;; The *-lite-* tarball does not contain the *large* documentation
1074 (uri (string-append "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/"
1075 "petsc-lite-" version ".tar.gz"))
1077 (base32 "0jfrq6rd4zagw1iimz05m2w91k0jvz3qbik1lk8pqcxw3rvdqk5d"))))
1078 (build-system gnu-build-system)
1080 `(("python" ,python-2)
1083 `(("gfortran" ,gfortran)
1085 ("superlu" ,superlu)
1086 ;; leaving out hdf5 and fftw, as petsc expects them to be built with mpi
1087 ;; leaving out opengl, as configuration seems to only be for mac
1090 `(#:test-target "test"
1091 #:parallel-build? #f ;build is parallel by default
1096 ,(string-append "--with-superlu-include="
1097 (assoc-ref %build-inputs "superlu") "/include")
1098 ,(string-append "--with-superlu-lib="
1099 (assoc-ref %build-inputs "superlu") "/lib/libsuperlu.a"))
1101 (modify-phases %standard-phases
1103 ;; PETSc's configure script is actually a python script, so we can't
1104 ;; run it with bash.
1105 (lambda* (#:key outputs (configure-flags '())
1107 (let* ((prefix (assoc-ref outputs "out"))
1108 (flags `(,(string-append "--prefix=" prefix)
1109 ,@configure-flags)))
1110 (format #t "build directory: ~s~%" (getcwd))
1111 (format #t "configure flags: ~s~%" flags)
1112 (zero? (apply system* "./configure" flags)))))
1113 (add-after 'configure 'clean-local-references
1114 (lambda* (#:key inputs outputs #:allow-other-keys)
1115 (let ((out (assoc-ref outputs "out")))
1116 (substitute* (find-files "." "^petsc(conf|machineinfo).h$")
1117 ;; Prevent build directory from leaking into compiled code
1119 ;; Scrub timestamp for reproducibility
1120 ((".*Libraries compiled on.*") ""))
1122 (add-after 'install 'clean-install
1123 ;; Try to keep installed files from leaking build directory names.
1124 (lambda* (#:key inputs outputs #:allow-other-keys)
1125 (let ((out (assoc-ref outputs "out")))
1126 (substitute* (map (lambda (file)
1127 (string-append out "/lib/petsc/conf/" file))
1128 '("petscvariables"))
1130 ;; Make compiler references point to the store
1131 (substitute* (string-append out "/lib/petsc/conf/petscvariables")
1132 (("= (gcc|g\\+\\+|gfortran)" _ compiler)
1133 (string-append "= " (which compiler))))
1134 ;; PETSc installs some build logs, which aren't necessary.
1135 (for-each (lambda (file)
1136 (let ((f (string-append out "/lib/petsc/conf/" file)))
1137 (when (file-exists? f)
1139 '("configure.log" "make.log" "gmake.log"
1140 "test.log" "error.log" "RDict.db"
1141 "PETScBuildInternal.cmake"
1142 ;; Once installed, should uninstall with Guix
1145 (home-page "http://www.mcs.anl.gov/petsc")
1146 (synopsis "Library to solve PDEs")
1147 (description "PETSc, pronounced PET-see (the S is silent), is a suite of
1148 data structures and routines for the scalable (parallel) solution of
1149 scientific applications modeled by partial differential equations.")
1150 (license (license:non-copyleft
1151 "http://www.mcs.anl.gov/petsc/documentation/copyright.html"))))
1153 (define-public petsc-complex
1154 (package (inherit petsc)
1155 (name "petsc-complex")
1157 (substitute-keyword-arguments (package-arguments petsc)
1158 ((#:configure-flags cf)
1159 `(cons "--with-scalar-type=complex" ,cf))))
1160 (synopsis "Library to solve PDEs (with complex scalars)")))
1162 (define-public petsc-openmpi
1163 (package (inherit petsc)
1164 (name "petsc-openmpi")
1166 `(("openmpi" ,openmpi)
1167 ,@(package-inputs petsc)))
1169 (substitute-keyword-arguments (package-arguments petsc)
1170 ((#:configure-flags cf)
1171 ``("--with-mpiexec=mpirun"
1172 ,(string-append "--with-mpi-dir="
1173 (assoc-ref %build-inputs "openmpi"))
1174 ,@(delete "--with-mpi=0" ,cf)))))
1175 (synopsis "Library to solve PDEs (with MPI support)")))
1177 (define-public petsc-complex-openmpi
1178 (package (inherit petsc-complex)
1179 (name "petsc-complex-openmpi")
1181 `(("openmpi" ,openmpi)
1182 ,@(package-inputs petsc-complex)))
1184 (substitute-keyword-arguments (package-arguments petsc-complex)
1185 ((#:configure-flags cf)
1186 ``("--with-mpiexec=mpirun"
1187 ,(string-append "--with-mpi-dir="
1188 (assoc-ref %build-inputs "openmpi"))
1189 ,@(delete "--with-mpi=0" ,cf)))))
1190 (synopsis "Library to solve PDEs (with complex scalars and MPI support)")))
1192 (define-public slepc
1199 (uri (string-append "http://slepc.upv.es/download/download.php?"
1200 "filename=slepc-" version ".tar.gz"))
1201 (file-name (string-append name "-" version ".tar.gz"))
1204 "1hijlmrvxvfqslnx8yydzw5xqbsn1yy02g32w0hln1z3cgr1c0k7"))))
1205 (build-system gnu-build-system)
1207 `(("python" ,python-2)))
1209 `(("arpack" ,arpack-ng)
1210 ("gfortran" ,gfortran)))
1212 `(("petsc" ,petsc)))
1214 `(#:parallel-build? #f ;build is parallel by default
1216 `(,(string-append "--with-arpack-dir="
1217 (assoc-ref %build-inputs "arpack") "/lib"))
1219 (modify-phases %standard-phases
1221 ;; configure is a python script, so we can't run it with bash.
1222 (lambda* (#:key inputs outputs (configure-flags '())
1224 (let* ((prefix (assoc-ref outputs "out"))
1225 (flags `(,(string-append "--prefix=" prefix)
1226 ,@configure-flags)))
1227 (format #t "build directory: ~s~%" (getcwd))
1228 (format #t "configure flags: ~s~%" flags)
1229 (setenv "SLEPC_DIR" (getcwd))
1230 (setenv "PETSC_DIR" (assoc-ref inputs "petsc"))
1231 (zero? (apply system* "./configure" flags)))))
1232 (add-after 'install 'delete-doc
1233 ;; TODO: SLEPc installs HTML documentation alongside headers in
1234 ;; $out/include. We'd like to move them to share/doc, but delete
1235 ;; them for now, as they are incomplete and installing the complete
1236 ;; documentation is difficult.
1237 (lambda* (#:key outputs #:allow-other-keys)
1238 (let* ((out (assoc-ref outputs "out")))
1239 (for-each delete-file (find-files out "\\.html$")))))
1240 (add-after 'install 'clean-install
1241 ;; Clean up unnecessary build logs from installation.
1242 (lambda* (#:key outputs #:allow-other-keys)
1243 (let ((out (assoc-ref outputs "out")))
1244 (for-each (lambda (file)
1245 (let ((f (string-append out "/lib/slepc/conf/" file)))
1246 (when (file-exists? f)
1248 '("configure.log" "make.log" "gmake.log"
1249 "test.log" "error.log" "RDict.db"
1250 "uninstall.py"))))))))
1251 (home-page "http://slepc.upv.es")
1252 (synopsis "Scalable library for eigenproblems")
1253 (description "SLEPc is a software library for the solution of large sparse
1254 eigenproblems on parallel computers. It can be used for the solution of
1255 linear eigenvalue problems formulated in either standard or generalized form,
1256 as well as other related problems such as the singular value decomposition.
1257 The emphasis of the software is on methods and techniques appropriate for
1258 problems in which the associated matrices are sparse, for example, those
1259 arising after the discretization of partial differential equations.")
1260 (license license:lgpl3)))
1262 (define-public slepc-complex
1263 (package (inherit slepc)
1264 (name "slepc-complex")
1266 `(("petsc" ,petsc-complex)
1267 ,@(alist-delete "petsc" (package-propagated-inputs slepc))))
1268 (synopsis "Scalable library for eigenproblems (with complex scalars)")))
1270 (define-public slepc-openmpi
1271 (package (inherit slepc)
1272 (name "slepc-openmpi")
1275 ("arpack" ,arpack-ng-openmpi)
1276 ,@(alist-delete "arpack" (package-inputs slepc))))
1278 `(("petsc" ,petsc-openmpi)
1279 ,@(alist-delete "petsc" (package-propagated-inputs slepc))))
1280 (synopsis "Scalable library for eigenproblems (with MPI support)")))
1282 (define-public slepc-complex-openmpi
1283 (package (inherit slepc-openmpi)
1284 (name "slepc-complex-openmpi")
1286 `(("petsc" ,petsc-complex-openmpi)
1287 ,@(alist-delete "petsc" (package-propagated-inputs slepc-openmpi))))
1288 (synopsis "Scalable library for eigenproblems (with complex scalars and MPI support)")))
1290 (define-public mumps
1297 (uri (string-append "http://mumps.enseeiht.fr/MUMPS_"
1301 "0igyc1pfzxdhpbad3v3lb86ixkdbqa1a8gbs15b04r2294h2nabp"))
1302 (patches (search-patches "mumps-build-parallelism.patch"))))
1303 (build-system gnu-build-system)
1305 `(("fortran" ,gfortran)
1306 ;; These are required for linking against mumps, but we let the user
1307 ;; declare the dependency.
1310 ("scotch" ,scotch)))
1312 `(#:modules ((ice-9 match)
1315 ,@%gnu-build-system-modules)
1317 (modify-phases %standard-phases
1319 (lambda* (#:key inputs #:allow-other-keys)
1320 (call-with-output-file "Makefile.inc"
1331 INCSEQ = -I$(topdir)/libseq
1332 LIBSEQ = -L$(topdir)/libseq -lmpiseq
1333 LIBSEQNEEDED = libseqneeded~;
1337 AR = ar vr # rules require trailing space, ugh...
1339 LIBBLAS = -L~a -lopenblas~@[
1340 SCALAP = -L~a -lscalapack~]
1341 LIBOTHERS = -pthread
1344 OPTF = -O2 -DALLOW_NON_INIT $(PIC)
1348 LIBS = $(SCALAP) $(LIBSEQ)
1349 LPORDDIR = $(topdir)/PORD/lib
1350 IPORD = -I$(topdir)/PORD/include
1351 LPORD = -L$(LPORDDIR) -lpord
1352 ORDERINGSF = -Dpord~@[
1354 IMETIS = -I$(METISDIR)/include
1355 LMETIS = -L$(METISDIR)/lib -lmetis
1356 ORDERINGSF += -Dmetis~]~@[~:{
1358 ISCOTCH = -I$(SCOTCHDIR)/include
1359 LSCOTCH = -L$(SCOTCHDIR)/lib ~a-lesmumps -lscotch -lscotcherr
1360 ORDERINGSF += ~a~}~]
1361 ORDERINGSC = $(ORDERINGSF)
1362 LORDERINGS = $(LPORD) $(LMETIS) $(LSCOTCH)
1363 IORDERINGSF = $(ISCOTCH)
1364 IORDERINGSC = $(IPORD) $(IMETIS) $(ISCOTCH)"
1365 (assoc-ref inputs "mpi")
1366 (assoc-ref inputs "blas")
1367 (assoc-ref inputs "scalapack")
1368 (assoc-ref inputs "metis")
1369 (match (list (assoc-ref inputs "pt-scotch")
1370 (assoc-ref inputs "scotch"))
1374 `((,scotch "" "-Dscotch")))
1377 "-lptesmumps -lptscotch -lptscotcherr "
1378 "-Dptscotch")))))))))
1380 ;; By default only the d-precision library is built. Make with "all"
1381 ;; target so that all precision libraries and examples are built.
1383 (zero? (system* "make" "all"
1384 (format #f "-j~a" (parallel-job-count))))))
1386 ;; Run the simple test drivers, which read test input from stdin:
1387 ;; from the "real" input for the single- and double-precision
1388 ;; testers, and from the "cmplx" input for complex-precision
1389 ;; testers. The EXEC-PREFIX key is used by the mumps-openmpi
1390 ;; package to prefix execution with "mpirun".
1391 (lambda* (#:key (exec-prefix '()) #:allow-other-keys)
1392 (with-directory-excursion "examples"
1395 (let ((tester (apply open-pipe*
1398 ,(string-append "./" prec
1400 (input (open-input-file
1401 (string-append "input_simpletest_" type))))
1403 (dump-port input tester)
1405 (zero? (close-pipe tester)))))
1407 '("real" "real" "cmplx" "cmplx")))))
1409 (lambda* (#:key outputs #:allow-other-keys)
1410 (let* ((out (assoc-ref outputs "out"))
1411 (libdir (string-append out "/lib")))
1412 (copy-recursively "lib" libdir)
1413 (copy-recursively "include" (string-append out "/include"))
1414 (when (file-exists? "libseq/libmpiseq.a")
1415 (install-file "libseq/libmpiseq.a" libdir))
1417 (home-page "http://mumps.enseeiht.fr")
1418 (synopsis "Multifrontal sparse direct solver")
1420 "MUMPS (MUltifrontal Massively Parallel sparse direct Solver) solves a
1421 sparse system of linear equations A x = b using Guassian elimination.")
1422 (license license:cecill-c)))
1424 (define-public mumps-metis
1425 (package (inherit mumps)
1426 (name "mumps-metis")
1428 (alist-delete "scotch" (package-inputs mumps)))))
1430 (define-public mumps-openmpi
1431 (package (inherit mumps)
1432 (name "mumps-openmpi")
1435 ("scalapack" ,scalapack)
1436 ("pt-scotch" ,pt-scotch)
1437 ,@(alist-delete "scotch" (package-inputs mumps))))
1439 (substitute-keyword-arguments (package-arguments mumps)
1441 `(modify-phases ,phases
1445 ((assoc-ref ,phases 'check)
1446 #:exec-prefix '("mpirun" "-n" "2"))))))))
1447 (synopsis "Multifrontal sparse direct solver (with MPI)")))
1449 (define-public mumps-metis-openmpi
1450 (package (inherit mumps-openmpi)
1451 (name "mumps-metis-openmpi")
1453 (alist-delete "pt-scotch" (package-inputs mumps-openmpi)))))
1455 (define-public r-quadprog
1462 (uri (cran-uri "quadprog" version))
1465 "0jg3r6abmhp8r9vkbhpx9ldjfw6vyl1m4c5vwlyjhk1mi03656fr"))))
1466 (build-system r-build-system)
1468 `(("gfortran" ,gfortran)))
1469 (home-page "http://cran.r-project.org/web/packages/quadprog")
1470 (synopsis "Functions to solve quadratic programming problems")
1472 "This package contains routines and documentation for solving quadratic
1473 programming problems.")
1474 (license license:gpl3+)))
1476 (define-public r-pracma
1482 (uri (cran-uri "pracma" version))
1484 (base32 "19nr2jlkbcdgvw3gx5hry12av565lmvqd5q4h7zlch3q13avwwl2"))))
1485 (build-system r-build-system)
1487 `(("r-quadprog" ,r-quadprog)))
1488 (home-page "http://cran.r-project.org/web/packages/pracma")
1489 (synopsis "Practical numerical math functions")
1490 (description "This package provides functions for numerical analysis and
1491 linear algebra, numerical optimization, differential equations, plus some
1492 special functions. It uses Matlab function names where appropriate to simplify
1494 (license license:gpl3+)))
1496 (define-public superlu
1503 (uri (string-append "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/"
1504 "superlu_" version ".tar.gz"))
1506 (base32 "0qzlb7cd608q62kyppd0a8c65l03vrwqql6gsm465rky23b6dyr8"))
1507 (modules '((guix build utils)))
1509 ;; Replace the non-free implementation of MC64 with a stub adapted
1512 (use-modules (ice-9 regex)
1514 (call-with-output-file "SRC/mc64ad.c"
1519 void mc64id_(int *a) {
1520 fprintf (stderr, \"SuperLU: non-free MC64 not available. Aborting.\\n\");
1523 void mc64ad_ (int *a, int *b, int *c, int *d, int *e, double *f, int *g,
1524 int *h, int *i, int *j, int *k, double *l, int *m, int *n) {
1525 fprintf (stderr, \"SuperLU: non-free MC64 not available. Aborting.\\n\");
1528 ;; Remove the corresponding license verbiage. MC64 license follows
1529 ;; a "------" line separator.
1530 (with-atomic-file-replacement "License.txt"
1531 (let ((rx (make-regexp "-{8}")))
1534 (let ((line (read-line in 'concat)))
1535 (unless (regexp-exec rx line)
1538 (build-system cmake-build-system)
1542 `(("blas" ,openblas)
1543 ("gfortran" ,gfortran)))
1545 `(#:configure-flags '("-Denable_blaslib:BOOL=NO" ;do not use internal cblas
1546 "-DTPL_BLAS_LIBRARIES=openblas"
1547 "-DBUILD_SHARED_LIBS:BOOL=YES"
1548 "-DCMAKE_INSTALL_LIBDIR=lib")))
1549 (home-page "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/")
1550 (synopsis "Supernodal direct solver for sparse linear systems")
1552 "SuperLU is a general purpose library for the direct solution of large,
1553 sparse, nonsymmetric systems of linear equations on high performance machines.
1554 The library is written in C and is callable from either C or Fortran. The
1555 library routines perform an LU decomposition with partial pivoting and
1556 triangular system solves through forward and back substitution. The library
1557 also provides threshold-based ILU factorization preconditioners.")
1558 (license (list license:bsd-3
1559 license:gpl2+ ;EXAMPLE/*fgmr.c
1560 (license:fsf-free "file://SRC/colamd.h")))))
1562 (define-public superlu-dist
1564 (name "superlu-dist")
1569 (uri (string-append "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/"
1570 "superlu_dist_" version ".tar.gz"))
1572 (base32 "1hnak09yxxp026blq8zhrl7685yip16svwngh1wysqxf8z48vzfj"))
1573 (modules '((guix build utils)))
1575 ;; Replace the non-free implementation of MC64 with a stub
1577 (use-modules (ice-9 regex)
1579 (call-with-output-file "SRC/mc64ad.c"
1584 void mc64id_(int *a) {
1585 fprintf (stderr, \"SuperLU_DIST: non-free MC64 not available. Aborting.\\n\");
1588 void mc64ad_ (int *a, int *b, int *c, int *d, int *e, double *f, int *g,
1589 int *h, int *i, int *j, int *k, double *l, int *m, int *n) {
1590 fprintf (stderr, \"SuperLU_DIST: non-free MC64 not available. Aborting.\\n\");
1593 (delete-file "SRC/mc64ad.f.bak")
1594 (substitute* "SRC/util.c" ;adjust default algorithm
1595 (("RowPerm[[:blank:]]*=[[:blank:]]*LargeDiag")
1596 "RowPerm = NOROWPERM"))))
1597 (patches (search-patches "superlu-dist-scotchmetis.patch"))))
1598 (build-system gnu-build-system)
1602 `(("gfortran" ,gfortran)))
1604 `(("openmpi" ,openmpi) ;headers include MPI heades
1605 ("lapack" ,lapack) ;required to link with output library
1606 ("pt-scotch" ,pt-scotch))) ;same
1608 `(#:parallel-build? #f ;race conditions using ar
1612 (lambda* (#:key inputs outputs #:allow-other-keys)
1613 (call-with-output-file "make.inc"
1618 DSUPERLULIB = ~a/lib/libsuperlu_dist.a
1619 BLASDEF = -DUSE_VENDOR_BLAS
1620 BLASLIB = -L~a/lib -lblas
1621 PARMETISLIB = -L~a/lib \
1622 -lptscotchparmetis -lptscotch -lptscotcherr -lptscotcherrexit \
1623 -lscotch -lscotcherr -lscotcherrexit
1624 METISLIB = -L~:*~a/lib \
1625 -lscotchmetis -lscotch -lscotcherr -lscotcherrexit
1626 LIBS = $(DSUPERLULIB) $(PARMETISLIB) $(METISLIB) $(BLASLIB)
1632 CFLAGS = -O3 -g -DPRNTlevel=0 $(PIC)
1633 NOOPTS = -O0 -g $(PIC)
1635 FFLAGS = -O2 -g $(PIC)
1639 (assoc-ref outputs "out")
1640 (assoc-ref inputs "lapack")
1641 (assoc-ref inputs "pt-scotch")))))
1643 'unpack 'remove-broken-symlinks
1645 (for-each delete-file
1646 (find-files "MAKE_INC" "\\.#make\\..*")))
1648 'build 'create-install-directories
1649 (lambda* (#:key outputs #:allow-other-keys)
1652 (mkdir-p (string-append (assoc-ref outputs "out")
1654 '("lib" "include")))
1658 (with-directory-excursion "EXAMPLE"
1660 (zero? (system* "mpirun" "-n" "2"
1661 "./pddrive" "-r" "1" "-c" "2" "g20.rua"))
1662 (zero? (system* "mpirun" "-n" "2"
1663 "./pzdrive" "-r" "1" "-c" "2" "cg20.cua")))))
1666 (lambda* (#:key outputs #:allow-other-keys)
1667 ;; Library is placed in lib during the build phase. Copy over
1668 ;; headers to include.
1669 (let* ((out (assoc-ref outputs "out"))
1670 (incdir (string-append out "/include")))
1671 (for-each (lambda (file)
1672 (let ((base (basename file)))
1673 (format #t "installing `~a' to `~a'~%"
1676 (string-append incdir "/" base))))
1677 (find-files "SRC" ".*\\.h$"))))
1678 %standard-phases)))))))
1679 (home-page (package-home-page superlu))
1680 (synopsis "Parallel supernodal direct solver")
1682 "SuperLU_DIST is a parallel extension to the serial SuperLU library.
1683 It is targeted for distributed memory parallel machines. SuperLU_DIST is
1684 implemented in ANSI C, and MPI for communications.")
1685 (license license:bsd-3)))
1687 (define-public scotch
1694 (uri (string-append "https://gforge.inria.fr/frs/download.php/34618/"
1695 "scotch_" version ".tar.gz"))
1697 (base32 "1ir088mvrqggyqdkx9qfynmiaffqbyih5qfl5mga2nrlm1qlsgzm"))
1698 (patches (search-patches "scotch-test-threading.patch"
1699 "pt-scotch-build-parallelism.patch"))))
1700 (build-system gnu-build-system)
1707 (modify-phases %standard-phases
1709 'unpack 'chdir-to-src
1710 (lambda _ (chdir "src")))
1714 (call-with-output-file "Makefile.inc"
1728 CFLAGS = -O2 -g -fPIC $(CPPFLAGS)
1729 LDFLAGS = -lz -lm -lrt -lpthread
1731 LEX = flex -Pscotchyy -olex.yy.c
1736 YACC = bison -pscotchyy -y -b y
1738 '("COMMON_FILE_COMPRESS_GZ"
1740 "COMMON_RANDOM_FIXED_SEED"
1741 ;; Prevents symbolc clashes with libesmumps
1743 ;; XXX: Causes invalid frees in superlu-dist tests
1745 ;; "SCOTCH_PTHREAD_NUMBER=2"
1746 "restrict=__restrict"))))))
1748 'build 'build-esmumps
1750 (zero? (system* "make"
1751 (format #f "-j~a" (parallel-job-count))
1755 (lambda* (#:key outputs #:allow-other-keys)
1756 (let ((out (assoc-ref outputs "out")))
1758 (zero? (system* "make"
1759 (string-append "prefix=" out)
1761 ;; esmumps files are not installed with the above
1762 (for-each (lambda (f)
1763 (copy-file f (string-append out "/include/" f)))
1764 (find-files "../include" ".*esmumps.h$"))
1765 (for-each (lambda (f)
1766 (copy-file f (string-append out "/lib/" f)))
1767 (find-files "../lib" "^lib.*esmumps.*"))))))))
1768 (home-page "http://www.labri.fr/perso/pelegrin/scotch/")
1769 (synopsis "Programs and libraries for graph algorithms")
1770 (description "SCOTCH is a set of programs and libraries which implement
1771 the static mapping and sparse matrix reordering algorithms developed within
1772 the SCOTCH project. Its purpose is to apply graph theory, with a divide and
1773 conquer approach, to scientific computing problems such as graph and mesh
1774 partitioning, static mapping, and sparse matrix ordering, in application
1775 domains ranging from structural mechanics to operating systems or
1777 ;; See LICENSE_en.txt
1778 (license license:cecill-c)))
1780 (define-public pt-scotch
1781 (package (inherit scotch)
1784 `(("openmpi" ,openmpi))) ;Headers include MPI headers
1786 (substitute-keyword-arguments (package-arguments scotch)
1787 ((#:phases scotch-phases)
1788 `(modify-phases ,scotch-phases
1793 (zero? (system* "make"
1794 (format #f "-j~a" (parallel-job-count))
1795 "ptscotch" "ptesmumps"))
1796 ;; Install the serial metis compatibility library
1797 (zero? (system* "make" "-C" "libscotchmetis" "install")))))
1800 (lambda _ (zero? (system* "make" "ptcheck"))))))))
1801 (synopsis "Programs and libraries for graph algorithms (with MPI)")))
1803 (define-public metis
1810 (uri (string-append "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/"
1811 "metis-" version ".tar.gz"))
1814 "1cjxgh41r8k6j029yxs8msp3z6lcnpm16g5pvckk35kc7zhfpykn"))))
1815 (build-system cmake-build-system)
1817 `(("blas" ,openblas)))
1819 `(#:tests? #f ;no tests
1820 #:configure-flags `("-DSHARED=ON"
1821 ,(string-append "-DGKLIB_PATH=" (getcwd)
1822 "/metis-" ,version "/GKlib"))))
1823 (home-page "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview")
1824 (synopsis "Graph partitioning and fill-reducing matrix ordering library")
1826 "METIS is a set of serial programs for partitioning graphs, partitioning
1827 finite element meshes, and producing fill-reducing orderings for sparse
1828 matrices. The algorithms implemented in METIS are based on the multilevel
1829 recursive-bisection, multilevel k-way, and multi-constraint partitioning
1831 (license license:asl2.0))) ;As of version 5.0.3
1833 (define-public p4est
1840 (uri (string-append "http://p4est.github.io/release/p4est-"
1844 "0faina2h5qsx3m2izbzaj9bbakma1krbbjmq43wrp1hcbyijflqb"))))
1845 (build-system gnu-build-system)
1847 `(("fortran" ,gfortran)
1852 `(#:configure-flags `(,(string-append "BLAS_LIBS=-L"
1853 (assoc-ref %build-inputs "blas")
1855 ,(string-append "LAPACK_LIBS=-L"
1856 (assoc-ref %build-inputs "lapack")
1858 (home-page "http://www.p4est.org")
1859 (synopsis "Adaptive mesh refinement on forests of octrees")
1861 "The p4est software library enables the dynamic management of a
1862 collection of adaptive octrees, conveniently called a forest of octrees.
1863 p4est is designed to work in parallel and scales to hundreds of thousands of
1865 (license license:gpl2+)))
1867 (define-public p4est-openmpi
1868 (package (inherit p4est)
1869 (name "p4est-openmpi")
1872 ,@(package-inputs p4est)))
1874 (substitute-keyword-arguments (package-arguments p4est)
1875 ((#:configure-flags cf)
1876 ``("--enable-mpi" ,@,cf))))
1877 (synopsis "Parallel adaptive mesh refinement on forests of octrees")))
1879 (define-public gsegrafix
1886 (uri (string-append "mirror://gnu/" name "/" name "-"
1890 "1b13hvx063zv970y750bx41wpx6hwd5ngjhbdrna8w8yy5kmxcda"))))
1891 (build-system gnu-build-system)
1893 `(#:configure-flags '("LDFLAGS=-lm")))
1895 `(("libgnomecanvas" ,libgnomecanvas)
1896 ("libbonoboui" ,libbonoboui)
1897 ("libgnomeui" ,libgnomeui)
1898 ("libgnomeprintui" ,libgnomeprintui)
1901 `(("pkg-config" ,pkg-config)))
1902 (home-page "http://www.gnu.org/software/gsegrafix/")
1903 (synopsis "GNOME application to create scientific and engineering plots")
1904 (description "GSEGrafix is an application which produces high-quality graphical
1905 plots for science and engineering. Plots are specified via simple ASCII
1906 parameter files and data files and are presented in an anti-aliased GNOME
1907 canvas. The program supports rectangular two-dimensional plots, histograms,
1908 polar-axis plots and three-dimensional plots. Plots can be printed or saved
1909 to BMP, JPEG or PNG image formats.")
1910 (license license:gpl3+)))
1912 (define-public maxima
1919 (uri (string-append "mirror://sourceforge/maxima/Maxima-source/"
1920 version "-source/" name "-" version ".tar.gz"))
1923 "1cvignn5y6qzrby6qb885yc8zdcdqdr1d50vcvc3gapw2f0gk3zm"))
1924 (patches (search-patches "maxima-defsystem-mkdir.patch"))))
1925 (build-system gnu-build-system)
1928 ("gnuplot" ,gnuplot) ;for plots
1929 ("tk" ,tk))) ;Tcl/Tk is used by 'xmaxima'
1931 `(("texinfo" ,texinfo)
1933 ("python" ,python)))
1936 (list "--enable-gcl"
1937 (string-append "--with-posix-shell="
1938 (assoc-ref %build-inputs "bash")
1940 (string-append "--with-wish="
1941 (assoc-ref %build-inputs "tk")
1943 (let ((v ,(package-version tk)))
1944 (string-take v (string-index-right v #\.)))))
1945 ;; By default Maxima attempts to write temporary files to
1946 ;; '/tmp/nix-build-maxima-*', which won't exist at run time.
1947 ;; Work around that.
1948 #:make-flags (list "TMPDIR=/tmp")
1949 #:phases (alist-cons-before
1952 (chmod "src/maxima" #o555))
1953 ;; Make sure the doc and emacs files are found in the
1954 ;; standard location. Also configure maxima to find gnuplot
1955 ;; without having it on the PATH.
1957 'install 'post-install
1958 (lambda* (#:key outputs inputs #:allow-other-keys)
1959 (let* ((gnuplot (assoc-ref inputs "gnuplot"))
1960 (out (assoc-ref outputs "out"))
1961 (datadir (string-append out "/share/maxima/" ,version)))
1962 (with-directory-excursion out
1963 (mkdir-p "share/emacs")
1964 (mkdir-p "share/doc")
1966 (string-append datadir "/emacs/")
1967 (string-append out "/share/emacs/site-lisp"))
1969 (string-append datadir "/doc/")
1970 (string-append out "/share/doc/maxima"))
1971 (with-atomic-file-replacement
1972 (string-append datadir "/share/maxima-init.lisp")
1974 (format out "~a ~s~a~%"
1975 "(setf $gnuplot_command "
1976 (string-append gnuplot "/bin/gnuplot") ")")
1977 (dump-port in out))))))
1978 %standard-phases))))
1979 (home-page "http://maxima.sourceforge.net")
1980 (synopsis "Numeric and symbolic expression manipulation")
1981 (description "Maxima is a system for the manipulation of symbolic and
1982 numerical expressions. It yields high precision numeric results by using
1983 exact fractions, arbitrary precision integers, and variable precision floating
1985 ;; Some files are lgpl2.1+. Some are gpl2+. Some explicitly state gpl1+.
1986 ;; Others simply say "GNU General Public License" without stating a
1987 ;; version (which implicitly means gpl1+).
1988 ;; At least one file (src/maxima.asd) says "version 2."
1989 ;; GPLv2 only is therefore the smallest subset.
1990 (license license:gpl2)))
1992 (define-public wxmaxima
1999 (uri (string-append "mirror://sourceforge/wxmaxima/wxMaxima/"
2000 version "/" name "-" version ".tar.gz"))
2003 "01kas9viqabw5id6crbhz8ahjimmv78gqzizs5hgnj9kngrgrm1h"))))
2004 (build-system gnu-build-system)
2006 `(("wxwidgets" ,wxwidgets)
2009 ("adwaita-icon-theme" ,adwaita-icon-theme)
2011 ("shared-mime-info" ,shared-mime-info)))
2013 `(#:phases (modify-phases %standard-phases
2015 'install 'wrap-program
2016 (lambda* (#:key inputs outputs #:allow-other-keys)
2017 (wrap-program (string-append (assoc-ref outputs "out")
2020 (,(string-append (assoc-ref inputs "maxima")
2022 ;; For GtkFileChooserDialog.
2023 `("GSETTINGS_SCHEMA_DIR" =
2024 (,(string-append (assoc-ref inputs "gtk+")
2025 "/share/glib-2.0/schemas")))
2026 `("XDG_DATA_DIRS" ":" prefix
2027 (;; Needed by gdk-pixbuf to know supported icon formats.
2029 (assoc-ref inputs "shared-mime-info") "/share")
2030 ;; The default icon theme of GTK+.
2032 (assoc-ref inputs "adwaita-icon-theme") "/share"))))
2034 (home-page "https://andrejv.github.io/wxmaxima/")
2035 (synopsis "Graphical user interface for the Maxima computer algebra system")
2037 "wxMaxima is a graphical user interface for the Maxima computer algebra
2038 system. It eases the use of Maxima by making most of its commands available
2039 through a menu system and by providing input dialogs for commands that require
2040 more than one argument. It also implements its own display engine that
2041 outputs mathematical symbols directly instead of depicting them with ASCII
2044 wxMaxima also features 2D and 3D inline plots, simple animations, mixing of
2045 text and mathematical calculations to create documents, exporting of input and
2046 output to TeX, and a browser for Maxima's manual including command index and
2047 full text searching.")
2048 (license license:gpl2+)))
2050 (define-public armadillo
2056 (uri (string-append "mirror://sourceforge/arma/armadillo-"
2060 "0bac9y46m61zxinj51l82w06v01ra9vw7a9j6rrwdjhznkkdb437"))))
2061 (build-system cmake-build-system)
2062 (arguments `(#:tests? #f)) ;no test target
2064 `(("openblas" ,openblas)
2066 ("arpack" ,arpack-ng)))
2067 (home-page "http://arma.sourceforge.net/")
2068 (synopsis "C++ linear algebra library")
2070 "Armadillo is a C++ linear algebra library, aiming towards a good balance
2071 between speed and ease of use. It is useful for algorithm development
2072 directly in C++, or quick conversion of research code into production
2073 environments. It can be used for machine learning, pattern recognition,
2074 signal processing, bioinformatics, statistics, econometrics, etc. The library
2075 provides efficient classes for vectors, matrices and cubes, as well as 150+
2076 associated functions (eg. contiguous and non-contiguous submatrix views).")
2077 (license license:mpl2.0)))
2079 (define-public armadillo-for-rcpparmadillo
2080 (package (inherit armadillo)
2084 (uri (string-append "mirror://sourceforge/arma/armadillo-"
2088 "1dxgfd2r9lbh24nszvqm2lag439s0srxaf1l86f6ww6waqm5r8zk"))))))
2090 (define-public muparser
2091 ;; When switching download sites, muparser re-issued a 2.2.5 release with a
2092 ;; different hash. In order to make `guix package --upgrade` work correctly,
2093 ;; we set a Guix packaging revision.
2094 ;; When the next version of muparser is released, we can remove
2095 ;; UPSTREAM-VERSION and REVISION and use the plain VERSION.
2096 (let ((upstream-version "2.2.5")
2100 (version (string-append upstream-version "-" revision))
2104 (uri (string-append "https://github.com/beltoforion/muparser/archive/v"
2105 upstream-version ".tar.gz"))
2106 (file-name (string-append name "-" version ".tar.gz"))
2109 "0277qsi5l23jsck1vhn383bmvc2n9l4a1dl5r9bf7hvjv9ayyrh6"))))
2110 (build-system gnu-build-system)
2112 `(#:configure-flags '("--enable-samples=no")
2113 #:tests? #f)) ;no "check" target
2114 (home-page "http://muparser.beltoforion.de/")
2115 (synopsis "Fast parser library for mathematical expressions")
2117 "muParser is an extensible high performance math parser library. It is
2118 based on transforming an expression into a bytecode and precalculating constant
2120 (license license:expat))))
2122 (define-public openblas
2129 (uri (string-append "https://github.com/xianyi/OpenBLAS/tarball/v"
2131 (file-name (string-append name "-" version ".tar.gz"))
2134 "071zqnmnxhh0c9phzyn3f198yxa0hjxda7016azdbq2056sm70w7"))))
2135 (build-system gnu-build-system)
2137 `(#:tests? #f ;no "check" target
2138 ;; DYNAMIC_ARCH is only supported on x86. When it is disabled and no
2139 ;; TARGET is specified, OpenBLAS will tune itself to the build host, so
2140 ;; we need to disable substitutions.
2142 ,(let ((system (or (%current-target-system) (%current-system))))
2143 (or (string-prefix? "x86_64" system)
2144 (string-prefix? "i686" system)
2145 (string-prefix? "mips" system)))
2147 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2150 ;; Build the library for all supported CPUs. This allows
2151 ;; switching CPU targets at runtime with the environment variable
2152 ;; OPENBLAS_CORETYPE=<type>, where "type" is a supported CPU type.
2153 ;; Unfortunately, this is not supported on non-x86 architectures,
2154 ;; where it leads to failed builds.
2155 ,@(let ((system (or (%current-target-system) (%current-system))))
2157 ((or (string-prefix? "x86_64" system)
2158 (string-prefix? "i686" system))
2159 '("DYNAMIC_ARCH=1"))
2160 ;; On MIPS we force the "SICORTEX" TARGET, as for the other
2161 ;; two available MIPS targets special extended instructions
2162 ;; for Loongson cores are used.
2163 ((string-prefix? "mips" system)
2164 '("TARGET=SICORTEX"))
2166 ;; no configure script
2167 #:phases (alist-delete 'configure %standard-phases)))
2169 `(("fortran" ,gfortran)))
2173 (home-page "http://www.openblas.net/")
2174 (synopsis "Optimized BLAS library based on GotoBLAS")
2176 "OpenBLAS is a BLAS library forked from the GotoBLAS2-1.13 BSD version.")
2177 (license license:bsd-3)))
2179 (define-public openlibm
2186 (uri (string-append "https://github.com/JuliaLang/openlibm/archive/v"
2188 (file-name (string-append name "-" version ".tar.gz"))
2191 "11czx2z7nh6dfpz45s3xl7v38hw36jxzxfvny454bk3if14pfakq"))))
2192 (build-system gnu-build-system)
2195 (list (string-append "prefix=" (assoc-ref %outputs "out")))
2197 ;; no configure script
2198 (alist-delete 'configure %standard-phases)
2199 #:tests? #f)) ;the tests are part of the default target
2200 (home-page "http://openlibm.org/")
2201 (synopsis "Portable C mathematical library (libm)")
2203 "OpenLibm is an effort to have a high quality, portable, standalone C
2204 mathematical library (libm). It can be used standalone in applications and
2205 programming language implementations. The project was born out of a need to
2206 have a good libm for the Julia programming language that worked consistently
2207 across compilers and operating systems, and in 32-bit and 64-bit
2209 ;; Each architecture has its own make target, and there is none for mips.
2210 (supported-systems (delete "mips64el-linux" %supported-systems))
2211 ;; See LICENSE.md for details.
2212 (license (list license:expat
2215 license:public-domain
2216 license:lgpl2.1+))))
2218 (define-public openspecfun
2220 (name "openspecfun")
2225 (uri (string-append "https://github.com/JuliaLang/openspecfun/archive/v"
2227 (file-name (string-append name "-" version ".tar.gz"))
2230 "1y5b2h6f2k72536kym3vzy3li3bhpd23x463g7hdmjdi3cncavz1"))))
2231 (build-system gnu-build-system)
2233 '(#:tests? #f ;no "check" target
2235 (list (string-append "prefix=" (assoc-ref %outputs "out")))
2236 ;; no configure script
2237 #:phases (alist-delete 'configure %standard-phases)))
2239 `(("fortran" ,gfortran)))
2240 (home-page "https://github.com/JuliaLang/openspecfun")
2241 (synopsis "Collection of special mathematical functions")
2243 "Openspecfun provides AMOS and Faddeeva. AMOS (from Netlib) is a
2244 portable package for Bessel Functions of a Complex Argument and Nonnegative
2245 Order; it contains subroutines for computing Bessel functions and Airy
2246 functions. Faddeeva allows computing the various error functions of arbitrary
2247 complex arguments (Faddeeva function, error function, complementary error
2248 function, scaled complementary error function, imaginary error function, and
2249 Dawson function); given these, one can also easily compute Voigt functions,
2250 Fresnel integrals, and similar related functions as well.")
2251 ;; Faddeeva is released under the Expat license; AMOS is included as
2252 ;; public domain software.
2253 (license (list license:expat license:public-domain))))
2255 (define-public suitesparse
2257 (name "suitesparse")
2263 "http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-"
2267 "100hdzr0mf4mzlwnqpmwpfw4pymgsf9n3g0ywb1yps2nk1zbkdy5"))))
2268 (build-system gnu-build-system)
2270 '(#:parallel-build? #f ;cholmod build fails otherwise
2271 #:tests? #f ;no "check" target
2276 "CHOLMOD_CONFIG=-DNPARTITION" ;required when METIS is not used
2277 (string-append "INSTALL_LIB="
2278 (assoc-ref %outputs "out") "/lib")
2279 (string-append "INSTALL_INCLUDE="
2280 (assoc-ref %outputs "out") "/include"))
2283 'install 'prepare-out
2284 ;; README.txt states that the target directories must exist prior to
2285 ;; running "make install".
2287 (mkdir-p (string-append (assoc-ref %outputs "out") "/lib"))
2288 (mkdir-p (string-append (assoc-ref %outputs "out") "/include")))
2289 ;; no configure script
2290 (alist-delete 'configure %standard-phases))))
2293 ("lapack" ,lapack)))
2294 (home-page "http://faculty.cse.tamu.edu/davis/suitesparse.html")
2295 (synopsis "Suite of sparse matrix software")
2297 "SuiteSparse is a suite of sparse matrix algorithms, including: UMFPACK,
2298 multifrontal LU factorization; CHOLMOD, supernodal Cholesky; SPQR,
2299 multifrontal QR; KLU and BTF, sparse LU factorization, well-suited for circuit
2300 simulation; ordering methods (AMD, CAMD, COLAMD, and CCOLAMD); CSparse and
2301 CXSparse, a concise sparse Cholesky factorization package; and many other
2304 ;; AMD, CAMD, BTF, COLAMD, CCOLAMD, CSparse, CXSparse, KLU, LDL
2306 ;; GPUQREngine, RBio, SuiteSparse_GPURuntime, SuiteSparseQR, UMFPACK
2307 (license (list license:gpl2+ license:lgpl2.1+))))
2309 (define-public atlas
2315 (uri (string-append "mirror://sourceforge/math-atlas/Stable/"
2316 version "/atlas" version ".tar.bz2"))
2319 "1dyjlq3fiparvm8ypwk6rsmjzmnwk81l88gkishphpvc79ryp216"))))
2320 (build-system gnu-build-system)
2321 (home-page "http://math-atlas.sourceforge.net/")
2322 (inputs `(("gfortran" ,gfortran)
2323 ("lapack-tar" ,(package-source lapack))))
2324 (outputs '("out" "doc"))
2325 ;; For the moment we drop support for MIPS at it fails to compile. See
2326 ;; https://lists.gnu.org/archive/html/guix-devel/2014-11/msg00516.html
2327 (supported-systems (delete "mips64el-linux" %supported-systems))
2329 `(#:parallel-build? #f
2330 #:parallel-tests? #f
2332 ;; ATLAS tunes itself for the machine it is built on, as explained at
2333 ;; <http://lists.gnu.org/archive/html/guix-devel/2014-10/msg00305.html>.
2334 ;; For this reason, we want users to build it locally instead of using
2338 #:modules ((srfi srfi-26)
2340 (guix build gnu-build-system)
2343 `(;; Generate position independent code suitable for dynamic libraries
2344 ;; and use WALL timer to get more accurate timing.
2345 "-Fa" "alg" "-fPIC" "-D" "c" "-DWALL"
2348 ,,(if (string-match "64" (%current-system))
2351 ;; Disable parallel build as it gives errors: atlas_pthread.h is
2352 ;; needed to compile C files before it is generated.
2353 "-Ss" "pmake" "make -j 1"
2354 ;; Probe is failing for MIPS. We therefore define the system
2355 ;; architecture explicitly by setting (-A) MACHINETYPE = 49
2356 ;; 'MIPSR1xK' and (-V) ISA = 1 'none'.
2357 ,,@(if (string-prefix? "mips" (%current-system))
2358 (list "-A" "49" "-V" "1")
2360 ;; Generate shared libraries.
2362 ;; Build a full LAPACK library.
2363 ,(string-append "--with-netlib-lapack-tarfile="
2364 (assoc-ref %build-inputs "lapack-tar")))
2366 (modify-phases %standard-phases
2367 (add-after 'install 'install-doc
2368 (lambda* (#:key outputs inputs #:allow-other-keys)
2369 (let ((doc (string-append (assoc-ref outputs "doc")
2370 "/share/doc/atlas")))
2372 (fold (lambda (file previous)
2373 (and previous (zero? (system* "cp" file doc))))
2374 #t (find-files "../ATLAS/doc" ".*")))))
2375 (add-after 'check 'check-pt
2376 (lambda _ (zero? (system* "make" "ptcheck"))))
2377 ;; Fix files required to run configure.
2378 (add-before 'configure 'fix-/bin/sh
2380 ;; Use `sh', not `/bin/sh'.
2381 (substitute* (find-files "." "Makefile|configure|SpewMakeInc\\.c")
2384 ;; Fix /bin/sh in generated make files.
2385 (add-after 'configure 'fix-/bin/sh-in-generated-files
2387 (substitute* (find-files "." "^[Mm]ake\\.inc.*")
2390 ;; ATLAS configure program does not accepts the default flags
2391 ;; passed by the 'gnu-build-system'.
2393 (lambda* (#:key native-inputs inputs outputs
2394 (configure-flags '())
2395 #:allow-other-keys #:rest args)
2396 (let* ((prefix (assoc-ref outputs "out"))
2397 (bash (or (and=> (assoc-ref
2398 (or native-inputs inputs) "bash")
2399 (cut string-append <> "/bin/bash"))
2401 (flags `(,(string-append "--prefix=" prefix)
2403 (abs-srcdir (getcwd))
2404 (srcdir (string-append "../" (basename abs-srcdir))))
2405 (format #t "source directory: ~s (relative from build: ~s)~%"
2409 (format #t "build directory: ~s~%" (getcwd))
2410 (format #t "configure flags: ~s~%" flags)
2411 (zero? (apply system* bash
2412 (string-append srcdir "/configure")
2414 (synopsis "Automatically Tuned Linear Algebra Software")
2416 "ATLAS is an automatically tuned linear algebra software library
2417 providing C and Fortran77 interfaces to a portably efficient BLAS
2418 implementation, as well as a few routines from LAPACK.
2420 Optimization occurs at build time. For this reason, the library is built on
2421 the machine where it is installed, without resorting to pre-built substitutes.
2423 Before building the library, CPU throttling should be disabled. This can be
2424 done in the BIOS, or, on GNU/Linux, with the following command:
2427 # cpupower --governor performance
2430 Failure to do so will result in a library with poor performance.")
2431 (license license:bsd-3)))
2440 (uri (string-append "mirror://sourceforge/ogl-math/glm-" version
2441 "/glm-" version ".zip"))
2444 "1cnjmi033a16a95v6xfkr1bvfmkd26hzdjka8j1819hgn5b1nr8l"))))
2445 (build-system cmake-build-system)
2447 `(("unzip" ,unzip)))
2448 (home-page "http://glm.g-truc.net")
2449 (synopsis "OpenGL Mathematics library")
2450 (description "OpenGL Mathematics (GLM) is a header-only C++ mathematics
2451 library for graphics software based on the OpenGL Shading Language (GLSL)
2453 (license license:expat)))
2455 (define-public lpsolve
2462 (uri (string-append "mirror://sourceforge/lpsolve/lpsolve/" version
2463 "/lp_solve_" version "_source.tar.gz"))
2466 "176c7f023mb6b8bfmv4rfqnrlw88lsg422ca74zjh19i2h5s69sq"))
2467 (modules '((guix build utils)))
2469 '(substitute* (list "lp_solve/ccc" "lpsolve55/ccc")
2471 ;; Pretend to be on a 64 bit platform to obtain a common directory
2472 ;; name for the build results on all architectures; nothing else
2473 ;; seems to depend on it.
2474 (("^PLATFORM=.*$") "PLATFORM=ux64\n")
2476 ;; The check for 'isnan' as it is written fails with
2477 ;; "non-floating-point argument in call to function
2478 ;; ‘__builtin_isnan’", which leads to the 'NOISNAN' cpp macro
2479 ;; definition, which in turn leads to bad things. Fix the feature
2481 (("isnan\\(0\\)") "isnan(0.)")))))
2482 (build-system gnu-build-system)
2484 `(#:tests? #f ; no check target
2486 (modify-phases %standard-phases
2490 (and (with-directory-excursion "lpsolve55"
2491 (zero? (system* "bash" "ccc")))
2492 (with-directory-excursion "lp_solve"
2493 (zero? (system* "bash" "ccc"))))))
2495 (lambda* (#:key outputs #:allow-other-keys)
2496 (let* ((out (assoc-ref outputs "out"))
2497 (bin (string-append out "/bin"))
2498 (lib (string-append out "/lib"))
2499 ;; This is where LibreOffice expects to find the header
2500 ;; files, and where they are installed by Debian.
2501 (include (string-append out "/include/lpsolve")))
2503 (copy-file "lpsolve55/bin/ux64/liblpsolve55.a"
2504 (string-append lib "/liblpsolve55.a"))
2505 (copy-file "lpsolve55/bin/ux64/liblpsolve55.so"
2506 (string-append lib "/liblpsolve55.so"))
2507 (install-file "lp_solve/bin/ux64/lp_solve" bin)
2509 ;; Install a subset of the header files as on Debian
2510 ;; (plus lp_bit.h, which matches the regular expression).
2511 (for-each (lambda (name)
2512 (install-file name include))
2513 (find-files "." "lp_[HMSa-z].*\\.h$"))
2514 (with-directory-excursion "shared"
2515 (for-each (lambda (name)
2516 (install-file name include))
2517 (find-files "." "\\.h$")))
2519 (home-page "http://lpsolve.sourceforge.net/")
2520 (synopsis "Mixed integer linear programming (MILP) solver")
2522 "lp_solve is a mixed integer linear programming solver based on the
2523 revised simplex and the branch-and-bound methods.")
2524 (license license:lgpl2.1+)))
2526 (define-public dealii
2533 (uri (string-append "https://github.com/dealii/dealii/releases/"
2534 "download/v" version "/dealii-" version ".tar.gz"))
2537 "1bdksvvyp1rj37df1ndh8j3x9nzpc3sazw8nd0hzvnlw0qnyk800"))
2538 (modules '((guix build utils)))
2540 ;; Remove bundled sources: UMFPACK, TBB, muParser, and boost
2541 '(delete-file-recursively "bundled"))))
2542 (build-system cmake-build-system)
2550 ("arpack" ,arpack-ng)
2551 ("muparser" ,muparser)
2552 ("gfortran" ,gfortran)
2553 ("suitesparse" ,suitesparse))) ;for UMFPACK
2555 `(#:build-type "DebugRelease" ;only supports Release, Debug, or DebugRelease
2556 #:configure-flags '("-DCOMPAT_FILES=OFF") ;Follow new directory structure
2557 #:phases (modify-phases %standard-phases
2559 'install 'hint-example-prefix
2560 ;; Set Cmake hints in examples so that they can find this
2561 ;; deal.II when configuring.
2562 (lambda* (#:key outputs #:allow-other-keys)
2563 (let* ((out (assoc-ref %outputs "out"))
2564 (exmpl (string-append out "/share/doc"
2565 "/dealii/examples")))
2566 (substitute* (find-files exmpl "CMakeLists.txt")
2567 (("([[:space:]]*HINTS.*)\n" _ line)
2568 (string-append line " $ENV{HOME}/.guix-profile "
2571 (home-page "https://www.dealii.org")
2572 (synopsis "Finite element library")
2574 "Deal.II is a C++ program library targeted at the computational solution
2575 of partial differential equations using adaptive finite elements. The main
2576 aim of deal.II is to enable rapid development of modern finite element codes,
2577 using among other aspects adaptive meshes and a wide array of tools often used
2578 in finite element programs.")
2579 (license license:lgpl2.1+)))
2581 (define-public dealii-openmpi
2582 (package (inherit dealii)
2583 (name "dealii-openmpi")
2586 ;;Supported only with MPI:
2587 ("p4est" ,p4est-openmpi)
2588 ("petsc" ,petsc-openmpi)
2589 ("slepc" ,slepc-openmpi)
2590 ("metis" ,metis) ;for MUMPS
2591 ("scalapack" ,scalapack) ;for MUMPS
2592 ("mumps" ,mumps-metis-openmpi) ;configure supports only metis orderings
2593 ("arpack" ,arpack-ng-openmpi)
2594 ,@(fold alist-delete (package-inputs dealii)
2595 '("p4est" "arpack"))))
2597 (substitute-keyword-arguments (package-arguments dealii)
2598 ((#:configure-flags cf)
2599 ``("-DMPI_C_COMPILER=mpicc"
2600 "-DMPI_CXX_COMPILER=mpicxx"
2601 "-DMPI_Fortran_COMPILER=mpifort"
2603 (synopsis "Finite element library (with MPI support)")))
2605 (define-public flann
2614 "http://www.cs.ubc.ca/research/flann/uploads/FLANN/flann-"
2615 version "-src.zip"))
2618 "022w8hph7bli5zbpnk3z1qh1c2sl5hm8fw2ccim651ynn0hr7fyz"))))
2619 (build-system cmake-build-system)
2621 `(("unzip" ,unzip)))
2625 ("python" ,python-2) ; print syntax
2626 ;; ("python2-numpy" ,python2-numpy) ; only required for the tests
2629 `(;; The 'share/flann/octave' contains a .mex file, which is an ELF file
2630 ;; taken 46 MiB unstripped, and 6 MiB stripped.
2631 #:strip-directories '("lib" "lib64" "libexec"
2632 "bin" "sbin" "share/flann/octave")
2634 ;; Save 12 MiB by not installing .a files. Passing
2635 ;; '-DBUILD_STATIC_LIBS=OFF' has no effect.
2636 #:phases (modify-phases %standard-phases
2637 (add-after 'install 'remove-static-libraries
2638 (lambda* (#:key outputs #:allow-other-keys)
2639 (let* ((out (assoc-ref outputs "out"))
2640 (lib (string-append out "/lib")))
2641 (for-each delete-file
2642 (find-files lib "\\.a$"))
2645 #:tests? #f)) ; The test data are downloaded from the Internet.
2646 (home-page "http://www.cs.ubc.ca/research/flann/")
2647 (synopsis "Library for approximate nearest neighbors computation")
2648 (description "FLANN is a library for performing fast approximate
2649 nearest neighbor searches in high dimensional spaces. It implements a
2650 collection of algorithms and a system for automatically choosing the best
2651 algorithm and optimum parameters depending on the dataset.
2653 FLANN is written in C++ and contains bindings for C, Octave and Python.")
2654 (license (license:non-copyleft "file://COPYING"
2655 "See COPYING in the distribution."))))
2657 (define-public wcalc
2664 (uri (string-append "mirror://sourceforge/w-calc/Wcalc/" version "/"
2665 "wcalc-" version ".tar.bz2"))
2668 "1vi8dl6rccqiq1apmpwawyg2ywx6a1ic1d3cvkf2hlwk1z11fb0f"))))
2669 (build-system gnu-build-system)
2672 ("readline" ,readline)))
2673 (home-page "http://w-calc.sourceforge.net/index.php")
2674 (synopsis "Flexible command-line scientific calculator")
2675 (description "Wcalc is a very capable calculator. It has standard functions
2676 (sin, asin, and sinh for example, in either radians or degrees), many
2677 pre-defined constants (pi, e, c, etc.), support for using variables, \"active\"
2678 variables, a command history, hex/octal/binary input and output, unit
2679 conversions, embedded comments, and an expandable expression entry field. It
2680 evaluates expressions using the standard order of operations.")
2681 (license license:gpl2+)))
2689 (uri (string-append "mirror://sourceforge/xaos/XaoS/" version
2690 "/xaos-" version ".tar.gz"))
2693 "15cd1cx1dyygw6g2nhjqq3bsfdj8sj8m4va9n75i0f3ryww3x7wq"))))
2694 (build-system gnu-build-system)
2695 (native-inputs `(("gettext" ,gettext-minimal)))
2696 (inputs `(("libx11" ,libx11)
2701 `(#:tests? #f ;no "check" target
2702 #:make-flags '("LOCALEDIR=$DATAROOTDIR/locale")))
2703 (synopsis "Real-time fractal zoomer")
2704 (description "GNU XaoS is a graphical program that generates fractal
2705 patterns and allows you to zoom in and out of them infinitely in a fluid,
2706 continuous manner. It also includes tutorials that help to explain how fractals
2707 are built. It can generate many different fractal types such as the Mandelbrot
2709 (home-page "http://www.gnu.org/software/xaos/")
2710 (license license:gpl2+)))
2712 (define-public hypre
2718 (uri (string-append "https://github.com/LLNL/hypre/archive/"
2719 "v" version ".tar.gz"))
2720 (file-name (string-append name "-" version ".tar.gz"))
2723 "0q69ia0jivzcr8p049dn3mg8yjpn6nwq4sw9iqac8vr63vi54l6m"))
2724 (modules '((guix build utils)))
2727 ;; Remove use of __DATE__ and __TIME__ for reproducibility;
2728 ;; substitute the tarball creation time.
2729 (substitute* "src/utilities/HYPRE_utilities.h"
2730 (("Date Compiled: .*$")
2731 "Date Compiled: Mar 28 2016 20:19:59 +0000\"\n"))
2733 (build-system gnu-build-system)
2734 (outputs '("out" ;6.1 MiB of headers and libraries
2735 "doc")) ;4.8 MiB of documentation
2739 ("texlive" ,texlive) ;full package required for fonts
2740 ("ghostscript" ,ghostscript)))
2742 `(("blas" ,openblas)
2743 ("lapack" ,lapack)))
2745 `(#:modules ((srfi srfi-1)
2746 ,@%gnu-build-system-modules)
2747 #:configure-flags '("--enable-shared"
2755 (modify-phases %standard-phases
2756 (add-before 'configure 'chdir-src
2757 (lambda _ (chdir "src")))
2759 (lambda* (#:key build target configure-flags
2760 #:allow-other-keys #:rest args)
2761 (let* ((configure (assoc-ref %standard-phases 'configure)))
2764 (list #:configure-flags
2765 (cons (string-append
2766 "--host=" (or target build))
2767 configure-flags)))))))
2768 (add-after 'build 'build-docs
2770 (zero? (system* "make" "-Cdocs" "pdf" "html"))))
2773 (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/hypre/lib"))
2774 (setenv "PATH" (string-append "." ":" (getenv "PATH")))
2775 (and (system* "make" "check" "CHECKRUN=")
2776 (fold (lambda (filename result)
2778 (let ((size (stat:size (stat filename))))
2779 (when (not (zero? size))
2780 (format #t "~a size ~d; error indication~%"
2784 (find-files "test" ".*\\.err$")))))
2785 (add-after 'install 'install-docs
2786 (lambda* (#:key outputs #:allow-other-keys)
2787 ;; Custom install because docs/Makefile doesn't honor ${docdir}.
2788 (let* ((doc (assoc-ref outputs "doc"))
2789 (docdir (string-append doc "/share/doc/hypre-" ,version)))
2790 (with-directory-excursion "docs"
2791 (for-each (lambda (base)
2792 (install-file (string-append base ".pdf") docdir)
2793 (copy-recursively base docdir)) ;html docs
2794 '("HYPRE_usr_manual"
2795 "HYPRE_ref_manual")))
2797 (home-page "http://www.llnl.gov/casc/hypre/")
2798 (synopsis "Library of solvers and preconditioners for linear equations")
2800 "HYPRE is a software library of high performance preconditioners and
2801 solvers for the solution of large, sparse linear systems of equations. It
2802 features multigrid solvers for both structured and unstructured grid
2804 (license license:lgpl2.1)))
2806 (define-public hypre-openmpi
2807 (package (inherit hypre)
2808 (name "hypre-openmpi")
2811 ,@(package-inputs hypre)))
2813 (substitute-keyword-arguments (package-arguments hypre)
2814 ((#:configure-flags flags)
2816 ,@(delete "--without-MPI" ,flags)))))
2817 (synopsis "Parallel solvers and preconditioners for linear equations")
2819 "HYPRE is a software library of high performance preconditioners and
2820 solvers for the solution of large, sparse linear systems of equations on
2821 parallel computers. It features parallel multigrid solvers for both
2822 structured and unstructured grid problems.")))
2824 (define-public matio
2831 (uri (string-append "mirror://sourceforge/matio/matio/" version "/"
2832 "matio-" version ".tar.gz"))
2835 "0y2qymgxank8wdiwc68ap8bxdzrhvyw86i29yh3xgn4z1njfd9ir"))))
2836 (build-system gnu-build-system)
2840 (home-page "http://matio.sourceforge.net/")
2841 (synopsis "Library for reading and writing MAT files")
2842 (description "Matio is a library for reading and writing MAT files. It
2843 supports compressed MAT files, as well as newer (version 7.3) MAT files.")
2844 (license license:bsd-2)))
2846 (define-public libhilbert
2853 (uri (string-append "http://web.cs.dal.ca/~chamilto/hilbert/"
2854 "libhilbert-" version ".tar.gz"))
2857 "0v48x8405dj95gjn2saja4bzhw86d6zl6d3dg8h7dzac2qr97s34"))))
2858 (build-system gnu-build-system)
2859 (home-page "http://web.cs.dal.ca/~chamilto/hilbert")
2860 (synopsis "Hilbert indices for multidimensional data")
2861 (description "The libhilbert library can efficiently calculate Hilbert
2862 curves and order-preserving representations of Hilbert curve indices that use
2863 the same amount of space as the original point representation. This is useful
2864 when using the Gilbert curve as a space filling curve through a
2865 high-dimensional space where not all demensions have the same cardinality.")
2866 (license license:lgpl2.1+)))
2873 (origin (method url-fetch)
2874 (uri (string-append "https://github.com/VcDevel/Vc/releases/"
2875 "download/" version "/Vc-" version ".tar.gz"))
2878 "1rh6dhqar3y07n4xqyml0sa0v48qv3ch9dc3yc2in855hlh4vnqi"))))
2879 (build-system cmake-build-system)
2882 '("-DBUILD_TESTING=ON")))
2883 (synopsis "SIMD vector classes for C++")
2884 (description "Vc provides portable, zero-overhead C++ types for explicitly
2885 data-parallel programming. It is a library designed to ease explicit
2886 vectorization of C++ code. Its types enable explicitly stating data-parallel
2887 operations on multiple values. The parallelism is therefore added via the type
2888 system. Vc has an intuitive API and provides portability between different
2889 compilers and compiler versions as well as portability between different vector
2890 instruction sets. Thus, an application written with Vc can be compiled for:
2893 @item SSE2 upto SSE4.2 or SSE4a
2896 @item NEON (in development)
2897 @item NVIDIA GPUs / CUDA (in development)
2899 (home-page "https://github.com/VcDevel/Vc")
2900 (license license:bsd-3)))
2902 (define-public reducelcs
2903 ;; This is the last commit which is available upstream, no
2904 ;; release happened since 2010.
2905 (let ((commit "474f88deb968061abe8cf11c959e02319b8ae5c0")
2909 (version (string-append "1.0-" revision "." (string-take commit 7)))
2914 (url "https://github.com/gdv/Reduce-Expand-for-LCS")
2916 (file-name (string-append name "-" version "-checkout"))
2919 "1rllzcfwc042c336mhq262a8ha90x6afq30kvk60r7i4761j4yjm"))))
2920 (build-system gnu-build-system)
2922 `(("openlibm" ,openlibm)))
2924 `(#:tests? #f ; no tests
2926 (modify-phases %standard-phases
2927 (delete 'configure) ; No configure script exists.
2928 (replace 'install ; No install phase exists.
2929 (lambda* (#:key outputs #:allow-other-keys)
2930 (let* ((out (assoc-ref outputs "out"))
2931 (bin (string-append out "/bin")))
2932 (install-file "Approximation" bin)
2933 (install-file "CollectResults" bin)
2934 (install-file "GenerateInstances" bin)
2936 (synopsis "Approximate Longest Commons Subsequence computation tool")
2938 "@code{reduceLCS} is an implementation of the Reduce-Expand
2939 algorithm for LCS. It is a fast program to compute the approximate
2940 Longest Commons Subsequence of a set of strings.")
2941 (home-page "https://github.com/gdv/Reduce-Expand-for-LCS")
2942 ;; The source specifies no "and later" of GPL3.
2943 (license license:gpl3))))