summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2020-08-25 18:52:18 +0300
committerEfraim Flashner <efraim@flashner.co.il>2020-08-27 18:19:09 +0300
commit9bb7534a3dd81c4ecfdb90a50927fcb268de0963 (patch)
tree5dbe7c13cf62d61a408b3f643ea81705a6ae23dd /gnu
parente8bbb29b5910a2d3d8364db161849366f1d84010 (diff)
gnu: Add libflame.
* gnu/packages/maths.scm (libflame): New variable.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/maths.scm81
1 files changed, 80 insertions, 1 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index ce8ab221960..97f57ddd247 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -135,7 +135,8 @@
135 #:use-module (gnu packages version-control) 135 #:use-module (gnu packages version-control)
136 #:use-module (gnu packages wxwidgets) 136 #:use-module (gnu packages wxwidgets)
137 #:use-module (gnu packages xml) 137 #:use-module (gnu packages xml)
138 #:use-module (srfi srfi-1)) 138 #:use-module (srfi srfi-1)
139 #:use-module (srfi srfi-26))
139 140
140(define-public aris 141(define-public aris
141 (package 142 (package
@@ -1756,6 +1757,84 @@ linear and quadratic objectives. There are limited facilities for nonlinear
1756and quadratic objectives using the Simplex algorithm.") 1757and quadratic objectives using the Simplex algorithm.")
1757 (license license:epl1.0))) 1758 (license license:epl1.0)))
1758 1759
1760(define-public libflame
1761 (package
1762 (name "libflame")
1763 (version "5.2.0")
1764 (outputs '("out" "static"))
1765 (source
1766 (origin
1767 (method git-fetch)
1768 (uri (git-reference
1769 (url "https://github.com/flame/libflame")
1770 (commit version)))
1771 (file-name (git-file-name name version))
1772 (sha256
1773 (base32
1774 "1n6lf0wvpp77lxqlr721h2jbfbzigphdp19wq8ajiccilcksh7ay"))))
1775 (build-system gnu-build-system)
1776 (arguments
1777 `(#:configure-flags
1778 ;; Sensible defaults: https://github.com/flame/libflame/issues/28
1779 (list "--enable-dynamic-build"
1780 "--enable-max-arg-list-hack"
1781 "--enable-lapack2flame"
1782 "--enable-verbose-make-output"
1783 "--enable-multithreading=pthreads" ; Openblas isn't built with openmp.
1784 ,@(if (any (cute string-prefix? <> (or (%current-target-system)
1785 (%current-system)))
1786 '("x86_64" "i686"))
1787 '("--enable-vector-intrinsics=sse")
1788 '())
1789 "--enable-supermatrix"
1790 "--enable-memory-alignment=16"
1791 "--enable-ldim-alignment")
1792 #:phases
1793 (modify-phases %standard-phases
1794 (add-after 'unpack 'patch-/usr/bin/env-bash
1795 (lambda _
1796 (substitute* "build/config.mk.in"
1797 (("/usr/bin/env bash") (which "bash")))
1798 #t))
1799 (replace 'check
1800 (lambda* (#:key tests? #:allow-other-keys)
1801 (substitute* "test/Makefile"
1802 (("LIBBLAS .*") "LIBBLAS = -lblas\n")
1803 (("LIBLAPACK .*") "LIBLAPACK = -llapack\n"))
1804 (if tests?
1805 (with-directory-excursion "test"
1806 (mkdir "obj")
1807 (invoke "make")
1808 (invoke "./test_libflame.x"))
1809 #t)))
1810 (add-after 'install 'install-static
1811 (lambda* (#:key outputs #:allow-other-keys)
1812 (let ((out (assoc-ref outputs "out"))
1813 (static (assoc-ref outputs "static")))
1814 (mkdir-p (string-append static "/lib"))
1815 (rename-file (string-append out "/lib/libflame.a")
1816 (string-append static "/lib/libflame.a"))
1817 (install-file (string-append out "/include/FLAME.h")
1818 (string-append static "/include"))
1819 #t))))))
1820 (inputs
1821 `(("gfortran" ,gfortran)))
1822 (native-inputs
1823 `(("lapack" ,lapack)
1824 ("openblas" ,openblas)
1825 ("perl" ,perl)
1826 ("python" ,python-wrapper)))
1827 (home-page "https://github.com/flame/libflame")
1828 (synopsis "High-performance object-based library for DLA computations")
1829 (description "@code{libflame} is a portable library for dense matrix
1830computations, providing much of the functionality present in LAPACK, developed
1831by current and former members of the @acronym{SHPC, Science of High-Performance
1832Computing} group in the @url{https://www.ices.utexas.edu/, Institute for
1833Computational Engineering and Sciences} at The University of Texas at Austin.
1834@code{libflame} includes a compatibility layer, @code{lapack2flame}, which
1835includes a complete LAPACK implementation.")
1836 (license license:bsd-3)))
1837
1759(define-public ceres 1838(define-public ceres
1760 (package 1839 (package
1761 (name "ceres-solver") 1840 (name "ceres-solver")