[Rcpp-devel] lmBenchmark broken for RcppArmadillo?
Dirk Eddelbuettel
edd at debian.org
Fri Oct 17 20:02:38 CEST 2014
On 17 October 2014 at 18:11, Matt wrote:
| When I try running lmBenchmark.R I get the following error:
|
|
| Rscript -e "source(system.file(\"examples\", \"lmBenchmark.R\", package = \
| "RcppEigen\"))"
|
| lm benchmark for n = 100000 and p = 40: nrep = 20
|
| Error in .Call("fastLm", mm, y, PACKAGE = "RcppArmadillo") :
|
| "fastLm" not available for .Call() for package "RcppArmadillo"
The signature changed when we changed the function to using Rcpp
Attributes. This should be pretty easy to fix.
>From src/RcppExports.cpp in RcppArmadillo:
List fastLm(const arma::mat& X, const arma::colvec& y);
RcppExport SEXP RcppArmadillo_fastLm(SEXP XSEXP, SEXP ySEXP) {
The file examples/fastLm.r in RcppArmadillo now does
fastLmPureDotCall <- function(X, y) {
.Call("RcppArmadillo_fastLm", X, y, PACKAGE = "RcppArmadillo")
}
so try that. In case you get something working, consider sending in a patch.
Thanks, Dirk
|
| Calls: source ... replicate -> sapply -> lapply -> FUN -> eval -> eval -> .Call
|
| Timing stopped at: 0.001 0 0
|
| Execution halted
|
|
| This happens on both Mac OS X and Ubuntu 14, with R 3.1.1, Rcpp 0.11.3,
| RcppArmadillo 0.4.450.1.0, RcppEigen 0.3.2.2.0, RcppGSL 0.2.2 and rbenchmark
| 1.0.0
|
| Note that if I run do_bench() manually but remove exprs$arma then it runs fine:
|
| > print(do_bench())
| lm benchmark for n = 100000 and p = 40: nrep = 20
| test relative elapsed user.self sys.self
| 3 LDLt 1.000 0.489 0.483 0.006
| 8 LLt 1.004 0.491 0.484 0.007
| 6 SymmEig 3.043 1.488 1.321 0.162
| 7 QR 5.681 2.778 2.612 0.166
| 2 PivQR 5.873 2.872 2.723 0.150
| 1 lm.fit 7.229 3.535 3.467 0.069
| 4 GESDD 18.826 9.206 8.968 0.240
| 5 SVD 35.307 17.265 16.893 0.376
| 9 GSL 140.135 68.526 68.304 0.209
|
| RcppGSL doesn't have this problem, only RcppArmadillo.
| _______________________________________________
| Rcpp-devel mailing list
| Rcpp-devel at lists.r-forge.r-project.org
| https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
--
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
More information about the Rcpp-devel
mailing list