[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add ApaptiveSparsity.
From: |
Ricardo Wurmus |
Subject: |
Re: [PATCH] Add ApaptiveSparsity. |
Date: |
Mon, 21 Dec 2015 12:38:52 +0100 |
Ludovic Courtès <address@hidden> 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
>From 2500805d1aa6bf0890fb43d530da3f4ea6bb39f7 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <address@hidden>
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
>From 9017b290c126143598eb6bb5e1c82e899d01b858 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <address@hidden>
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