* [PATCH] Add ApaptiveSparsity.
@ 2015-12-17 16:00 Ricardo Wurmus
2015-12-19 14:02 ` Ludovic Courtès
0 siblings, 1 reply; 5+ messages in thread
From: Ricardo Wurmus @ 2015-12-17 16:00 UTC (permalink / raw)
To: guix-devel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-gnu-Add-r-rcpparmadillo.patch --]
[-- Type: text/x-patch, Size: 1995 bytes --]
From b9ef283243b792ea7ac095a203e5aea3c221f78f Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Thu, 17 Dec 2015 16:27:32 +0100
Subject: [PATCH 1/2] gnu: Add r-rcpparmadillo.
* gnu/packages/statistics.scm (r-rcpparmadillo): New variable.
---
gnu/packages/statistics.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 95176aa..8beb8c8 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -1411,3 +1411,31 @@ encoder/decoder, round-off-error-free sum and cumsum, etc.")
variety of formats.")
(license license:gpl3+)))
+(define-public r-rcpparmadillo
+ (package
+ (name "r-rcpparmadillo")
+ (version "0.6.200.2.0")
+ (source (origin
+ (method url-fetch)
+ (uri (cran-uri "RcppArmadillo" version))
+ (sha256
+ (base32
+ "137wqqga776yj6synx5awhrzgkz7mmqnvgmggh9l4k6d99vwp9gj"))))
+ (properties `((upstream-name . "RcppArmadillo")))
+ (build-system r-build-system)
+ (propagated-inputs
+ `(("r-rcpp" ,r-rcpp)))
+ (home-page "https://github.com/RcppCore/RcppArmadillo")
+ (synopsis "Rcpp integration for the linear algebra library 'Armadillo'")
+ (description
+ "Armadillo is a templated C++ linear algebra library that aims towards a
+good balance between speed and ease of use. Integer, floating point and
+complex numbers are supported, as well as a subset of trigonometric and
+statistics functions. Various matrix decompositions are provided through
+optional integration with LAPACK and ATLAS libraries. This package includes
+the header files from the templated Armadillo library.")
+ ;; Armadillo is licensed under the MPL 2.0, while RcppArmadillo (the Rcpp
+ ;; bindings to Armadillo) is licensed under the GNU GPL version 2 or
+ ;; later, as is the rest of 'Rcpp'.
+ (license license:gpl2+)))
+
--
2.1.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-gnu-Add-AdaptiveSparsity.patch --]
[-- Type: text/x-patch, Size: 1990 bytes --]
From 64e16086990806f2f30e651dbbf2ff62470b2fcc Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Thu, 17 Dec 2015 16:28:25 +0100
Subject: [PATCH 2/2] gnu: Add AdaptiveSparsity.
* gnu/packages/machine-learning.scm (r-adaptivesparsity): New variable.
---
gnu/packages/machine-learning.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index bfa88ac..030d60d 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -23,6 +23,7 @@
#:use-module (guix download)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system r)
#:use-module (gnu packages)
#:use-module (gnu packages boost)
#:use-module (gnu packages compression)
@@ -290,3 +291,27 @@ combine multiple data representations, algorithm classes, and general purpose
tools. This enables both rapid prototyping of data pipelines and extensibility
in terms of new algorithms.")
(license license:gpl3+)))
+
+(define-public r-adaptivesparsity
+ (package
+ (name "r-adaptivesparsity")
+ (version "1.4")
+ (source (origin
+ (method url-fetch)
+ (uri (cran-uri "AdaptiveSparsity" version))
+ (sha256
+ (base32
+ "1az7isvalf3kmdiycrfl6s9k9xqk22k1mc6rh8v0jmcz402qyq8z"))))
+ (properties
+ `((upstream-name . "AdaptiveSparsity")))
+ (build-system r-build-system)
+ (propagated-inputs
+ `(("r-rcpp" ,r-rcpp)
+ ("r-rcpparmadillo" ,r-rcpparmadillo)))
+ (home-page "http://cran.r-project.org/web/packages/AdaptiveSparsity")
+ (synopsis "Adaptive sparsity models")
+ (description
+ "This package implements the Figueiredo machine learning algorithm for
+adaptive sparsity and the Wong algorithm for adaptively sparse gaussian
+geometric models.")
+ (license license:lgpl3+)))
--
2.1.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Add ApaptiveSparsity.
2015-12-17 16:00 [PATCH] Add ApaptiveSparsity Ricardo Wurmus
@ 2015-12-19 14:02 ` Ludovic Courtès
2015-12-21 11:38 ` Ricardo Wurmus
0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2015-12-19 14:02 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: guix-devel
Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:
> From b9ef283243b792ea7ac095a203e5aea3c221f78f Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Thu, 17 Dec 2015 16:27:32 +0100
> Subject: [PATCH 1/2] gnu: Add r-rcpparmadillo.
>
> * gnu/packages/statistics.scm (r-rcpparmadillo): New variable.
[...]
> + (properties `((upstream-name . "RcppArmadillo")))
> + (build-system r-build-system)
> + (propagated-inputs
> + `(("r-rcpp" ,r-rcpp)))
> + (home-page "https://github.com/RcppCore/RcppArmadillo")
> + (synopsis "Rcpp integration for the linear algebra library 'Armadillo'")
“for the Armadillo linear algebra library” maybe?
> + (description
> + "Armadillo is a templated C++ linear algebra library that aims towards a
> +good balance between speed and ease of use. Integer, floating point and
> +complex numbers are supported, as well as a subset of trigonometric and
> +statistics functions. Various matrix decompositions are provided through
> +optional integration with LAPACK and ATLAS libraries. This package includes
> +the header files from the templated Armadillo library.")
> + ;; Armadillo is licensed under the MPL 2.0, while RcppArmadillo (the Rcpp
> + ;; bindings to Armadillo) is licensed under the GNU GPL version 2 or
> + ;; later, as is the rest of 'Rcpp'.
> + (license license:gpl2+)))
Does this package bundle a copy of Armadillo? If yes, it would be great
if we could make a separate Armadillo package that r-rcpparmadillo would
depend on.
WDYT?
> From 64e16086990806f2f30e651dbbf2ff62470b2fcc Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Thu, 17 Dec 2015 16:28:25 +0100
> Subject: [PATCH 2/2] gnu: Add AdaptiveSparsity.
>
> * gnu/packages/machine-learning.scm (r-adaptivesparsity): New variable.
LGTM.
Thanks!
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Add ApaptiveSparsity.
2015-12-19 14:02 ` Ludovic Courtès
@ 2015-12-21 11:38 ` Ricardo Wurmus
2015-12-21 13:33 ` Ludovic Courtès
0 siblings, 1 reply; 5+ messages in thread
From: Ricardo Wurmus @ 2015-12-21 11:38 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 2496 bytes --]
Ludovic Courtès <ludo@gnu.org> writes:
>> + (synopsis "Rcpp integration for the linear algebra library 'Armadillo'")
>
> “for the Armadillo linear algebra library” maybe?
Okay.
>> + (description
>> + "Armadillo is a templated C++ linear algebra library that aims towards a
>> +good balance between speed and ease of use. Integer, floating point and
>> +complex numbers are supported, as well as a subset of trigonometric and
>> +statistics functions. Various matrix decompositions are provided through
>> +optional integration with LAPACK and ATLAS libraries. This package includes
>> +the header files from the templated Armadillo library.")
>> + ;; Armadillo is licensed under the MPL 2.0, while RcppArmadillo (the Rcpp
>> + ;; bindings to Armadillo) is licensed under the GNU GPL version 2 or
>> + ;; later, as is the rest of 'Rcpp'.
>> + (license license:gpl2+)))
>
> Does this package bundle a copy of Armadillo? If yes, it would be great
> if we could make a separate Armadillo package that r-rcpparmadillo would
> depend on.
It bundles the headers of a particular version (6.200.2, latest is
6.400.3) of Armadillo. I just made a package for Armadillo 6.400.3 and
derived a package variant for 6.200.2 (both attached), used that as an
input and removed the includes from RcppArmadillo with a snippet.
The package builds, but there’s a linker problem that I don’t know how
to fix:
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/gnu/store/vgnld4sl6ki7k1d70cjqk4rm68iimybp-r-rcpparmadillo-0.6.200.2.0/site-library/RcppArmadillo/libs/RcppArmadillo.so':
/gnu/store/vgnld4sl6ki7k1d70cjqk4rm68iimybp-r-rcpparmadillo-0.6.200.2.0/site-library/RcppArmadillo/libs/RcppArmadillo.so: undefined symbol: wrapper_dgesv_
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/gnu/store/vgnld4sl6ki7k1d70cjqk4rm68iimybp-r-rcpparmadillo-0.6.200.2.0/site-library/RcppArmadillo’
phase `install' failed after 21.5 seconds
It’s probably something to do with linking to lapack or something, but I
don’t know how to address this.
The bundled includes in “inst/include/armadillo*” are almost identical
to those provided by the armadillo package. The “config.hpp” file has
been patched to comment out a couple of defines and a cmake file was
added.
~~ Ricardo
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-armadillo.patch --]
[-- Type: text/x-patch, Size: 1990 bytes --]
From 2500805d1aa6bf0890fb43d530da3f4ea6bb39f7 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Mon, 21 Dec 2015 12:37:23 +0100
Subject: [PATCH 1/2] gnu: Add armadillo.
* gnu/packages/maths.scm (armadillo): New variable.
---
gnu/packages/maths.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 0c0f013..0d66b9f 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1422,6 +1422,35 @@ output to TeX, and a browser for Maxima's manual including command index and
full text searching.")
(license license:gpl2+)))
+(define-public armadillo
+ (package
+ (name "armadillo")
+ (version "6.400.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/arma/armadillo-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0bsgrmldlx77w5x26n3axj1hg6iw6csyw0dwl1flrbdwl51f9701"))))
+ (build-system cmake-build-system)
+ (arguments `(#:tests? #f)) ;no test target
+ (inputs
+ `(("openblas" ,openblas)
+ ("lapack" ,lapack)
+ ("arpack" ,arpack-ng)))
+ (home-page "http://arma.sourceforge.net/")
+ (synopsis "C++ linear algebra library")
+ (description
+ "Armadillo is a C++ linear algebra library, aiming towards a good balance
+between speed and ease of use. It is useful for algorithm development
+directly in C++, or quick conversion of research code into production
+environments. It can be used for machine learning, pattern recognition,
+signal processing, bioinformatics, statistics, econometrics, etc. The library
+provides efficient classes for vectors, matrices and cubes, as well as 150+
+associated functions (eg. contiguous and non-contiguous submatrix views).")
+ (license license:mpl2.0)))
+
(define-public muparser
(package
(name "muparser")
--
2.1.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-gnu-Add-armadillo-6.200.2.patch --]
[-- Type: text/x-patch, Size: 1203 bytes --]
From 9017b290c126143598eb6bb5e1c82e899d01b858 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Mon, 21 Dec 2015 12:37:38 +0100
Subject: [PATCH 2/2] gnu: Add armadillo 6.200.2.
* gnu/packages/maths.scm (armadillo-for-rcpparmadillo): New variable.
---
gnu/packages/maths.scm | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 0d66b9f..e7a7b7c 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1451,6 +1451,17 @@ provides efficient classes for vectors, matrices and cubes, as well as 150+
associated functions (eg. contiguous and non-contiguous submatrix views).")
(license license:mpl2.0)))
+(define-public armadillo-for-rcpparmadillo
+ (package (inherit armadillo)
+ (version "6.200.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/arma/armadillo-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1f69rlqhnf2wv8khyn2a8vi6gx1i72qgfy8b9b760ssk85dcl763"))))))
+
(define-public muparser
(package
(name "muparser")
--
2.1.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Add ApaptiveSparsity.
2015-12-21 11:38 ` Ricardo Wurmus
@ 2015-12-21 13:33 ` Ludovic Courtès
2015-12-21 14:46 ` Ricardo Wurmus
0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2015-12-21 13:33 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: guix-devel
Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:
> It bundles the headers of a particular version (6.200.2, latest is
> 6.400.3) of Armadillo. I just made a package for Armadillo 6.400.3 and
> derived a package variant for 6.200.2 (both attached), used that as an
> input and removed the includes from RcppArmadillo with a snippet.
Perfect.
> The package builds, but there’s a linker problem that I don’t know how
> to fix:
>
> ** testing if installed package can be loaded
> Error in dyn.load(file, DLLpath = DLLpath, ...) :
> unable to load shared object '/gnu/store/vgnld4sl6ki7k1d70cjqk4rm68iimybp-r-rcpparmadillo-0.6.200.2.0/site-library/RcppArmadillo/libs/RcppArmadillo.so':
> /gnu/store/vgnld4sl6ki7k1d70cjqk4rm68iimybp-r-rcpparmadillo-0.6.200.2.0/site-library/RcppArmadillo/libs/RcppArmadillo.so: undefined symbol: wrapper_dgesv_
> Error: loading failed
> Execution halted
> ERROR: loading failed
> * removing ‘/gnu/store/vgnld4sl6ki7k1d70cjqk4rm68iimybp-r-rcpparmadillo-0.6.200.2.0/site-library/RcppArmadillo’
> phase `install' failed after 21.5 seconds
>
> It’s probably something to do with linking to lapack or something, but I
> don’t know how to address this.
Sounds like the command that built RcppArmadillo.so lacked a -llapack or
something (not sure which library provides ‘wrapper_dgesv_’), no?
> From 2500805d1aa6bf0890fb43d530da3f4ea6bb39f7 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Mon, 21 Dec 2015 12:37:23 +0100
> Subject: [PATCH 1/2] gnu: Add armadillo.
>
> * gnu/packages/maths.scm (armadillo): New variable.
[...]
> + (arguments `(#:tests? #f)) ;no test target
> + (inputs
> + `(("openblas" ,openblas)
> + ("lapack" ,lapack)
> + ("arpack" ,arpack-ng)))
Since this is a header-only library, are these useful at all?
Also, if they are included in the installed headers, should they be
propagated?
Otherwise LGTM.
> From 9017b290c126143598eb6bb5e1c82e899d01b858 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Mon, 21 Dec 2015 12:37:38 +0100
> Subject: [PATCH 2/2] gnu: Add armadillo 6.200.2.
>
> * gnu/packages/maths.scm (armadillo-for-rcpparmadillo): New variable.
OK. I would do this as part of the patch that adds RcppArmadillo, but
no big deal.
Thanks!
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Add ApaptiveSparsity.
2015-12-21 13:33 ` Ludovic Courtès
@ 2015-12-21 14:46 ` Ricardo Wurmus
0 siblings, 0 replies; 5+ messages in thread
From: Ricardo Wurmus @ 2015-12-21 14:46 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Ludovic Courtès <ludo@gnu.org> writes:
>> The package builds, but there’s a linker problem that I don’t know how
>> to fix:
>>
>> ** testing if installed package can be loaded
>> Error in dyn.load(file, DLLpath = DLLpath, ...) :
>> unable to load shared object '/gnu/store/vgnld4sl6ki7k1d70cjqk4rm68iimybp-r-rcpparmadillo-0.6.200.2.0/site-library/RcppArmadillo/libs/RcppArmadillo.so':
>> /gnu/store/vgnld4sl6ki7k1d70cjqk4rm68iimybp-r-rcpparmadillo-0.6.200.2.0/site-library/RcppArmadillo/libs/RcppArmadillo.so: undefined symbol: wrapper_dgesv_
>> Error: loading failed
>> Execution halted
>> ERROR: loading failed
>> * removing ‘/gnu/store/vgnld4sl6ki7k1d70cjqk4rm68iimybp-r-rcpparmadillo-0.6.200.2.0/site-library/RcppArmadillo’
>> phase `install' failed after 21.5 seconds
>>
>> It’s probably something to do with linking to lapack or something, but I
>> don’t know how to address this.
>
> Sounds like the command that built RcppArmadillo.so lacked a -llapack or
> something (not sure which library provides ‘wrapper_dgesv_’), no?
It lacked “-larmadillo”. Turns out that the armadillo package produces
a shared library to wrap some lapack/arpack/openblas features.
>> From 2500805d1aa6bf0890fb43d530da3f4ea6bb39f7 Mon Sep 17 00:00:00 2001
>> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
>> Date: Mon, 21 Dec 2015 12:37:23 +0100
>> Subject: [PATCH 1/2] gnu: Add armadillo.
>>
>> * gnu/packages/maths.scm (armadillo): New variable.
>
> [...]
>
>> + (arguments `(#:tests? #f)) ;no test target
>> + (inputs
>> + `(("openblas" ,openblas)
>> + ("lapack" ,lapack)
>> + ("arpack" ,arpack-ng)))
>
> Since this is a header-only library, are these useful at all?
They are optional inputs, and it seems that an actual shared library is
produced (only when they are present?).
>> From 9017b290c126143598eb6bb5e1c82e899d01b858 Mon Sep 17 00:00:00 2001
>> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
>> Date: Mon, 21 Dec 2015 12:37:38 +0100
>> Subject: [PATCH 2/2] gnu: Add armadillo 6.200.2.
>>
>> * gnu/packages/maths.scm (armadillo-for-rcpparmadillo): New variable.
>
> OK. I would do this as part of the patch that adds RcppArmadillo, but
> no big deal.
Okay, I’ve merged this patch with the one for r-rcpparmadillo.
Thanks for the review!
~~ Ricardo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-12-21 14:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-17 16:00 [PATCH] Add ApaptiveSparsity Ricardo Wurmus
2015-12-19 14:02 ` Ludovic Courtès
2015-12-21 11:38 ` Ricardo Wurmus
2015-12-21 13:33 ` Ludovic Courtès
2015-12-21 14:46 ` Ricardo Wurmus
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.