* [PATCH] Add SuiteSparse.
@ 2015-03-18 10:09 Ricardo Wurmus
2015-03-18 18:52 ` Eric Bavier
0 siblings, 1 reply; 5+ messages in thread
From: Ricardo Wurmus @ 2015-03-18 10:09 UTC (permalink / raw)
To: Guix
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-gnu-Add-SuiteSparse.patch --]
[-- Type: text/x-patch, Size: 3165 bytes --]
From 7bc01b9d3c03bf0ae4f44eddcbc6c50590ea42fb Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Tue, 10 Mar 2015 11:32:48 +0100
Subject: [PATCH] gnu: Add SuiteSparse.
* gnu/packages/maths.scm (suitesparse): New variable.
---
gnu/packages/maths.scm | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index b6d3ed3..60781bc 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -62,6 +62,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)
@@ -1065,6 +1066,59 @@ 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
+ (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)
+ ("atlas" ,atlas)))
+ (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")
--
2.1.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Add SuiteSparse.
2015-03-18 10:09 [PATCH] Add SuiteSparse Ricardo Wurmus
@ 2015-03-18 18:52 ` Eric Bavier
2015-03-19 8:52 ` Ludovic Courtès
2015-03-19 10:59 ` Ricardo Wurmus
0 siblings, 2 replies; 5+ messages in thread
From: Eric Bavier @ 2015-03-18 18:52 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: Guix
On 2015-03-18 05:09, Ricardo Wurmus wrote:
> + (alist-cons-before
> + 'install 'prepare-out
> + (lambda _
> + (mkdir-p (string-append (assoc-ref %outputs "out") "/lib"))
> + (mkdir-p (string-append (assoc-ref %outputs "out")
> "/include")))
Could you note that README.txt states that "These directories must
already exist"?
> + (inputs
> + `(("tbb" ,tbb)
> + ("lapack" ,lapack)
> + ("atlas" ,atlas)))
It appears from the #:make-flags that only the blas library is used.
Are both "lapack" and "atlas" required? Or would just one suffice?
--
`~Eric
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Add SuiteSparse.
2015-03-18 18:52 ` Eric Bavier
@ 2015-03-19 8:52 ` Ludovic Courtès
2015-03-19 10:59 ` Ricardo Wurmus
1 sibling, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2015-03-19 8:52 UTC (permalink / raw)
To: Eric Bavier; +Cc: Guix
Eric Bavier <ericbavier@openmailbox.org> skribis:
> On 2015-03-18 05:09, Ricardo Wurmus wrote:
[...]
>> + (inputs
>> + `(("tbb" ,tbb)
>> + ("lapack" ,lapack)
>> + ("atlas" ,atlas)))
>
> It appears from the #:make-flags that only the blas library is used.
> Are both "lapack" and "atlas" required? Or would just one suffice?
Something I often do is to check the output of something like:
guix gc --references $(guix build suitesparse)
It’s a simple way to check if optional dependencies are actually used,
for instance.
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Add SuiteSparse.
2015-03-18 18:52 ` Eric Bavier
2015-03-19 8:52 ` Ludovic Courtès
@ 2015-03-19 10:59 ` Ricardo Wurmus
2015-03-20 19:24 ` Ludovic Courtès
1 sibling, 1 reply; 5+ messages in thread
From: Ricardo Wurmus @ 2015-03-19 10:59 UTC (permalink / raw)
To: Eric Bavier; +Cc: Guix
[-- Attachment #1: Type: text/plain, Size: 833 bytes --]
Eric Bavier writes:
> On 2015-03-18 05:09, Ricardo Wurmus wrote:
>> + (alist-cons-before
>> + 'install 'prepare-out
>> + (lambda _
>> + (mkdir-p (string-append (assoc-ref %outputs "out") "/lib"))
>> + (mkdir-p (string-append (assoc-ref %outputs "out")
>> "/include")))
>
> Could you note that README.txt states that "These directories must
> already exist"?
I will add a note.
>> + (inputs
>> + `(("tbb" ,tbb)
>> + ("lapack" ,lapack)
>> + ("atlas" ,atlas)))
>
> It appears from the #:make-flags that only the blas library is used.
> Are both "lapack" and "atlas" required? Or would just one suffice?
You are right: it builds fine with just "lapack". I'll remove "atlas"
from the inputs. Thanks for the review!
Attached is a new version of the patch.
~~ Ricardo
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-SuiteSparse.patch --]
[-- Type: text/x-patch, Size: 3255 bytes --]
From fecf2890397ef697fa3a0110555e99816e444449 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Tue, 10 Mar 2015 11:32:48 +0100
Subject: [PATCH] gnu: Add SuiteSparse.
* gnu/packages/maths.scm (suitesparse): New variable.
---
gnu/packages/maths.scm | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index b6d3ed3..b253850 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -62,6 +62,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)
@@ -1065,6 +1066,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")
--
2.1.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Add SuiteSparse.
2015-03-19 10:59 ` Ricardo Wurmus
@ 2015-03-20 19:24 ` Ludovic Courtès
0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2015-03-20 19:24 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: Guix, Eric Bavier
Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:
> From fecf2890397ef697fa3a0110555e99816e444449 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Tue, 10 Mar 2015 11:32:48 +0100
> Subject: [PATCH] gnu: Add SuiteSparse.
>
> * gnu/packages/maths.scm (suitesparse): New variable.
I don’t if Eric has anything to add, but that LGTM.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-03-20 19:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-18 10:09 [PATCH] Add SuiteSparse Ricardo Wurmus
2015-03-18 18:52 ` Eric Bavier
2015-03-19 8:52 ` Ludovic Courtès
2015-03-19 10:59 ` Ricardo Wurmus
2015-03-20 19:24 ` Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.