* [bug#43042] [PATCH] gnu: Add libflame.
@ 2020-08-25 15:54 Efraim Flashner
2020-08-27 8:27 ` Mathieu Othacehe
0 siblings, 1 reply; 3+ messages in thread
From: Efraim Flashner @ 2020-08-25 15:54 UTC (permalink / raw)
To: 43042; +Cc: Efraim Flashner
* gnu/packages/maths.scm (libflame): New variable.
---
gnu/packages/maths.scm | 81 +++++++++++++++++++++++++++++++++++++++++-
1 file changed, 80 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index e3209c1e50..c093b53f5d 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -135,7 +135,8 @@
#:use-module (gnu packages version-control)
#:use-module (gnu packages wxwidgets)
#:use-module (gnu packages xml)
- #:use-module (srfi srfi-1))
+ #:use-module (srfi srfi-1)
+ #:use-module (srfi srfi-26))
(define-public aris
(package
@@ -1748,6 +1749,84 @@ linear and quadratic objectives. There are limited facilities for nonlinear
and quadratic objectives using the Simplex algorithm.")
(license license:epl1.0)))
+(define-public libflame
+ (package
+ (name "libflame")
+ (version "5.2.0")
+ (outputs '("out" "static"))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/flame/libflame")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1n6lf0wvpp77lxqlr721h2jbfbzigphdp19wq8ajiccilcksh7ay"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:configure-flags
+ ;; Sensible defaults: https://github.com/flame/libflame/issues/28
+ (list "--enable-dynamic-build"
+ "--enable-max-arg-list-hack"
+ "--enable-lapack2flame"
+ "--enable-verbose-make-output"
+ "--enable-multithreading=pthreads" ; Openblas isn't built with openmp.
+ ,@(if (any (cute string-prefix? <> (or (%current-target-system)
+ (%current-system)))
+ '("x86_64" "i686"))
+ '("--enable-vector-intrinsics=sse")
+ '())
+ "--enable-supermatrix"
+ "--enable-memory-alignment=16"
+ "--enable-ldim-alignment")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-/usr/bin/env-bash
+ (lambda _
+ (substitute* "build/config.mk.in"
+ (("/usr/bin/env bash") (which "bash")))
+ #t))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (substitute* "test/Makefile"
+ (("LIBBLAS .*") "LIBBLAS = -lblas\n")
+ (("LIBLAPACK .*") "LIBLAPACK = -llapack\n"))
+ (if tests?
+ (with-directory-excursion "test"
+ (mkdir "obj")
+ (invoke "make")
+ (invoke "./test_libflame.x"))
+ #t)))
+ (add-after 'install 'install-static
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (static (assoc-ref outputs "static")))
+ (mkdir-p (string-append static "/lib"))
+ (rename-file (string-append out "/lib/libflame.a")
+ (string-append static "/lib/libflame.a"))
+ (install-file (string-append out "/include/FLAME.h")
+ (string-append static "/include"))
+ #t))))))
+ (inputs
+ `(("gfortran" ,gfortran)))
+ (native-inputs
+ `(("lapack" ,lapack)
+ ("openblas" ,openblas)
+ ("perl" ,perl)
+ ("python" ,python-wrapper)))
+ (home-page "https://github.com/flame/libflame")
+ (synopsis "High-performance object-based library for DLA computations")
+ (description "@code{libflame} is a portable library for dense matrix
+computations, providing much of the functionality present in LAPACK, developed
+by current and former members of the @acronym{SHPC, Science of High-Performance
+Computing} group in the @url{https://www.ices.utexas.edu/, Institute for
+Computational Engineering and Sciences} at The University of Texas at Austin.
+@code{libflame} includes a compatibility layer, @code{lapack2flame}, which
+includes a complete LAPACK implementation.")
+ (license license:bsd-3)))
+
(define-public ceres
(package
(name "ceres-solver")
--
2.28.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [bug#43042] [PATCH] gnu: Add libflame.
2020-08-25 15:54 [bug#43042] [PATCH] gnu: Add libflame Efraim Flashner
@ 2020-08-27 8:27 ` Mathieu Othacehe
2020-08-27 15:20 ` bug#43042: " Efraim Flashner
0 siblings, 1 reply; 3+ messages in thread
From: Mathieu Othacehe @ 2020-08-27 8:27 UTC (permalink / raw)
To: Efraim Flashner; +Cc: 43042
Hello Efraim,
> + "--enable-verbose-make-output"
> + "--enable-multithreading=pthreads" ; Openblas isn't built with openmp.
> + ,@(if (any (cute string-prefix? <> (or (%current-target-system)
> + (%current-system)))
> + '("x86_64" "i686"))
I thought we had a "target-intel?" or such in (guix utils), but it seems
we don't. Maybe it could be useful addition.
Otherwise, looks good!
Thanks,
Mathieu
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#43042: [PATCH] gnu: Add libflame.
2020-08-27 8:27 ` Mathieu Othacehe
@ 2020-08-27 15:20 ` Efraim Flashner
0 siblings, 0 replies; 3+ messages in thread
From: Efraim Flashner @ 2020-08-27 15:20 UTC (permalink / raw)
To: Mathieu Othacehe; +Cc: 43042-done
[-- Attachment #1: Type: text/plain, Size: 884 bytes --]
On Thu, Aug 27, 2020 at 10:27:49AM +0200, Mathieu Othacehe wrote:
>
> Hello Efraim,
>
> > + "--enable-verbose-make-output"
> > + "--enable-multithreading=pthreads" ; Openblas isn't built with openmp.
> > + ,@(if (any (cute string-prefix? <> (or (%current-target-system)
> > + (%current-system)))
> > + '("x86_64" "i686"))
>
> I thought we had a "target-intel?" or such in (guix utils), but it seems
> we don't. Maybe it could be useful addition.
>
> Otherwise, looks good!
>
> Thanks,
>
> Mathieu
Thanks for the review. Patch pushed!
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-08-27 15:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-25 15:54 [bug#43042] [PATCH] gnu: Add libflame Efraim Flashner
2020-08-27 8:27 ` Mathieu Othacehe
2020-08-27 15:20 ` bug#43042: " Efraim Flashner
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).