summaryrefslogtreecommitdiff
path: root/gnu/packages/maths.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/maths.scm')
-rw-r--r--gnu/packages/maths.scm222
1 files changed, 210 insertions, 12 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index b6d3ed3680..89e0a17ab1 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -35,6 +35,7 @@
#:use-module (guix build-system gnu)
#:use-module (gnu packages algebra)
#:use-module (gnu packages bison)
+ #:use-module (gnu packages check)
#:use-module (gnu packages cmake)
#:use-module (gnu packages compression)
#:use-module (gnu packages curl)
@@ -62,6 +63,7 @@
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages readline)
+ #:use-module (gnu packages tbb)
#:use-module (gnu packages tcsh)
#:use-module (gnu packages tcl)
#:use-module (gnu packages texinfo)
@@ -90,6 +92,32 @@ effectively as a scientific calculator.")
(license license:gpl3+)
(home-page "http://www.gnu.org/software/units/")))
+(define-public double-conversion
+ (package
+ (name "double-conversion")
+ (version "1.1.5")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/floitsch/double-conversion/archive/v"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0cnr8xhyjfxijay8ymkqcph3672wp2lj23qhdmr3m4kia5kpdf83"))))
+ (build-system cmake-build-system)
+ (arguments
+ '(#:test-target "test"
+ #:configure-flags '("-DBUILD_SHARED_LIBS=ON"
+ "-DBUILD_TESTING=ON")))
+ (home-page "https://github.com/floitsch/double-conversion")
+ (synopsis "Conversion routines for IEEE doubles")
+ (description
+ "The double-conversion library provides binary-decimal and decimal-binary
+routines for IEEE doubles. The library consists of efficient conversion
+routines that have been extracted from the V8 JavaScript engine.")
+ (license license:bsd-3)))
+
(define-public dionysus
(package
(name "dionysus")
@@ -255,7 +283,6 @@ large scale eigenvalue problems.")
"0lk3f97i9imqascnlf6wr5mjpyxqcdj73pgj97dj2mgvyg9z1n4s"))))
(build-system cmake-build-system)
(home-page "http://www.netlib.org/lapack/")
- (native-inputs `(("patchelf" ,patchelf))) ;for augment-rpath
(inputs `(("fortran" ,gfortran-4.8)
("python" ,python-2)))
(arguments
@@ -355,6 +382,9 @@ extremely large and complex data collections.")
`(("lapack" ,lapack)
("readline" ,readline)
("glpk" ,glpk)
+ ("fftw" ,fftw)
+ ("fftwf" ,fftwf)
+ ("arpack" ,arpack-ng)
("curl" ,curl)
("pcre" ,pcre)
("fltk" ,fltk)
@@ -363,16 +393,18 @@ extremely large and complex data collections.")
("hdf5" ,hdf5)
("libxft" ,libxft)
("mesa" ,mesa)
+ ("glu" ,glu)
("zlib" ,zlib)))
(native-inputs
`(("gfortran" ,gfortran-4.8)
("pkg-config" ,pkg-config)
("perl" ,perl)
- ;; The following inputs are not actually used in the build process. However, the
- ;; ./configure gratuitously tests for their existence and assumes that programs not
- ;; present at build time are also not, and can never be, available at run time!
- ;; If these inputs are therefore not present, support for them will be built out.
- ;; However, Octave will still run without them, albeit without the features they
+ ;; The following inputs are not actually used in the build process.
+ ;; However, the ./configure gratuitously tests for their existence and
+ ;; assumes that programs not present at build time are also not, and
+ ;; can never be, available at run time! If these inputs are therefore
+ ;; not present, support for them will be built out. However, Octave
+ ;; will still run without them, albeit without the features they
;; provide.
("less" ,less)
("texinfo" ,texinfo)
@@ -384,11 +416,11 @@ extremely large and complex data collections.")
"/bin/sh"))))
(home-page "http://www.gnu.org/software/octave/")
(synopsis "High-level language for numerical computation")
- (description "GNU Octave is a high-level interpreted language that is specialized
-for numerical computations. It can be used for both linear and non-linear
-applications and it provides great support for visualizing results. Work may
-be performed both at the interactive command-line as well as via script
-files.")
+ (description "GNU Octave is a high-level interpreted language that is
+specialized for numerical computations. It can be used for both linear and
+non-linear applications and it provides great support for visualizing results.
+Work may be performed both at the interactive command-line as well as via
+script files.")
(license license:gpl3+)))
(define-public gmsh
@@ -407,7 +439,6 @@ files.")
;; Remove non-free METIS code
'(delete-file-recursively "contrib/Metis"))))
(build-system cmake-build-system)
- (native-inputs `(("patchelf" ,patchelf))) ;for augment-rpath
(propagated-inputs
`(("fltk" ,fltk)
("gfortran" ,gfortran-4.8)
@@ -991,6 +1022,50 @@ based on transforming an expression into a bytecode and precalculating
constant parts of it.")
(license license:expat)))
+(define-public openblas
+ (package
+ (name "openblas")
+ (version "0.2.14")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/xianyi/OpenBLAS/tarball/v"
+ version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0av3pd96j8rx5i65f652xv9wqfkaqn0w4ma1gvbyz73i6j2hi9db"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ;no "check" target
+ ;; DYNAMIC_ARCH is not supported on MIPS. When it is disabled,
+ ;; OpenBLAS will tune itself to the build host, so we need to disable
+ ;; substitutions.
+ #:substitutable? ,(not (string-prefix? "mips" (%current-system)))
+ #:make-flags
+ (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
+ "SHELL=bash"
+ "NO_LAPACK=1"
+ ;; Build the library for all supported CPUs. This allows
+ ;; switching CPU targets at runtime with the environment variable
+ ;; OPENBLAS_CORETYPE=<type>, where "type" is a supported CPU type.
+ ;; Unfortunately, this is not supported on MIPS.
+ ,@(if (string-prefix? "mips" (%current-system))
+ '()
+ '("DYNAMIC_ARCH=1")))
+ ;; no configure script
+ #:phases (alist-delete 'configure %standard-phases)))
+ (inputs
+ `(("fortran" ,gfortran-4.8)))
+ (native-inputs
+ `(("cunit" ,cunit)
+ ("perl" ,perl)))
+ (home-page "http://www.openblas.net/")
+ (synopsis "Optimized BLAS library based on GotoBLAS")
+ (description
+ "OpenBLAS is a BLAS library forked from the GotoBLAS2-1.13 BSD version.")
+ (license license:bsd-3)))
+
(define-public openlibm
(package
(name "openlibm")
@@ -1065,6 +1140,60 @@ Fresnel integrals, and similar related functions as well.")
;; public domain software.
(license (list license:expat license:public-domain))))
+(define-public suitesparse
+ (package
+ (name "suitesparse")
+ (version "4.4.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "100hdzr0mf4mzlwnqpmwpfw4pymgsf9n3g0ywb1yps2nk1zbkdy5"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:parallel-build? #f ;cholmod build fails otherwise
+ #:tests? #f ;no "check" target
+ #:make-flags
+ (list "CC=gcc"
+ "BLAS=-lblas"
+ "TBB=-ltbb"
+ "CHOLMOD_CONFIG=-DNPARTITION" ;required when METIS is not used
+ (string-append "INSTALL_LIB="
+ (assoc-ref %outputs "out") "/lib")
+ (string-append "INSTALL_INCLUDE="
+ (assoc-ref %outputs "out") "/include"))
+ #:phases
+ (alist-cons-before
+ 'install 'prepare-out
+ ;; README.txt states that the target directories must exist prior to
+ ;; running "make install".
+ (lambda _
+ (mkdir-p (string-append (assoc-ref %outputs "out") "/lib"))
+ (mkdir-p (string-append (assoc-ref %outputs "out") "/include")))
+ ;; no configure script
+ (alist-delete 'configure %standard-phases))))
+ (inputs
+ `(("tbb" ,tbb)
+ ("lapack" ,lapack)))
+ (home-page "http://faculty.cse.tamu.edu/davis/suitesparse.html")
+ (synopsis "Suite of sparse matrix software")
+ (description
+ "SuiteSparse is a suite of sparse matrix algorithms, including: UMFPACK,
+multifrontal LU factorization; CHOLMOD, supernodal Cholesky; SPQR,
+multifrontal QR; KLU and BTF, sparse LU factorization, well-suited for circuit
+simulation; ordering methods (AMD, CAMD, COLAMD, and CCOLAMD); CSparse and
+CXSparse, a concise sparse Cholesky factorization package; and many other
+packages.")
+ ;; LGPLv2.1+:
+ ;; AMD, CAMD, BTF, COLAMD, CCOLAMD, CSparse, CXSparse, KLU, LDL
+ ;; GPLv2+:
+ ;; GPUQREngine, RBio, SuiteSparse_GPURuntime, SuiteSparseQR, UMFPACK
+ (license (list license:gpl2+ license:lgpl2.1+))))
+
(define-public atlas
(package
(name "atlas")
@@ -1216,3 +1345,72 @@ library with poor performance.")
library for graphics software based on the OpenGL Shading Language (GLSL)
specifications.")
(license license:expat)))
+
+(define-public lpsolve
+ (package
+ (name "lpsolve")
+ (version "5.5.2.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/lpsolve/lpsolve/" version
+ "/lp_solve_" version "_source.tar.gz"))
+ (sha256
+ (base32
+ "176c7f023mb6b8bfmv4rfqnrlw88lsg422ca74zjh19i2h5s69sq"))
+ (modules '((guix build utils)))
+ (snippet
+ '(substitute* (list "lp_solve/ccc" "lpsolve55/ccc")
+ (("^c=cc") "c=gcc")
+ ;; Pretend to be on a 64 bit platform to obtain a common directory
+ ;; name for the build results on all architectures; nothing else
+ ;; seems to depend on it.
+ (("^PLATFORM=.*$") "PLATFORM=ux64\n")))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; no check target
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'build
+ (lambda _
+ (with-directory-excursion "lpsolve55"
+ (system* "bash" "ccc"))
+ (with-directory-excursion "lp_solve"
+ (system* "bash" "ccc"))
+ #t))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (lib (string-append out "/lib"))
+ ;; This is where LibreOffice expects to find the header
+ ;; files, and where they are installed by Debian.
+ (include (string-append out "/include/lpsolve")))
+ (mkdir-p lib)
+ (copy-file "lpsolve55/bin/ux64/liblpsolve55.a"
+ (string-append lib "/liblpsolve55.a"))
+ (copy-file "lpsolve55/bin/ux64/liblpsolve55.so"
+ (string-append lib "/liblpsolve55.so"))
+ (mkdir-p bin)
+ (copy-file "lp_solve/bin/ux64/lp_solve"
+ (string-append bin "/lp_solve"))
+ (mkdir-p include)
+ ;; Install a subset of the header files as on Debian
+ ;; (plus lp_bit.h, which matches the regular expression).
+ (for-each
+ (lambda (name)
+ (copy-file name (string-append include "/" name)))
+ (find-files "." "lp_[HMSa-z].*\\.h$"))
+ (with-directory-excursion "shared"
+ (for-each
+ (lambda (name)
+ (copy-file name (string-append include "/" name)))
+ (find-files "." "\\.h$")))
+ #t))))))
+ (home-page "http://lpsolve.sourceforge.net/")
+ (synopsis "Mixed integer linear programming (MILP) solver")
+ (description
+ "lp_solve is a mixed integer linear programming solver based on the
+revised simplex and the branch-and-bound methods.")
+ (license license:lgpl2.1+)))