[Rd] RcppArmadillo compilation error: R CMD SHLIB returns status 1
Dear all, running the example by D. Eddebuettel (http://dirk.eddelbuettel.com/blog/2011/04/23/) I get an error message. Specifically, the R code I was taking from the above example is ### BEGIN EXAMPLE ### suppressMessages(require(RcppArmadillo)) suppressMessages(require(Rcpp)) suppressMessages(require(inline)) code <- ' arma::mat coeff = Rcpp::as(a); arma::mat errors = Rcpp::as(e); int m = errors.n_rows; int n = errors.n_cols; arma::mat simdata(m,n); simdata.row(0) = arma::zeros(1,n); for (int row=1; row 4: #include 5: 6: 7: #ifndef BEGIN_RCPP 8: #define BEGIN_RCPP 9: #endif 10: 11: #ifndef END_RCPP 12: #define END_RCPP 13: #endif 14: 15: using namespace Rcpp; 16: 17: 18: // user includes 19: 20: 21: // declarations 22: extern "C" { 23: SEXP file33765791( SEXP a, SEXP e) ; 24: } 25: 26: // definition 27: 28: SEXP file33765791( SEXP a, SEXP e ){ 29: BEGIN_RCPP 30: 31:arma::mat coeff = Rcpp::as(a); 32:arma::mat errors = Rcpp::as(e); 33:int m = errors.n_rows; int n = errors.n_cols; 34:arma::mat simdata(m,n); 35:simdata.row(0) = arma::zeros(1,n); 36:for (int row=1; row file33765791.cpp.err.txt' returned status 1 I am working under R 2.14.0 and as the pros among you might guess, I am new to using the C++ interfaces within R. I think all I have to do is to edit some settings on my Windows 7 machine here, but the error message is too cryptic to me. Alas, I could also not find any thread or help topic that deals with this online. I appreciate any direct reply or reference where I can find a solution to this. Please let me know in case I am leaving out some essential details here. Many thanks, Paul __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] RcppArmadillo compilation error: R CMD SHLIB returns status 1
On 05/12/2011 1:22 PM, Paul Viefers wrote: Dear all, running the example by D. Eddebuettel (http://dirk.eddelbuettel.com/blog/2011/04/23/) I get an error message. Specifically, the R code I was taking from the above example is ### BEGIN EXAMPLE ### suppressMessages(require(RcppArmadillo)) suppressMessages(require(Rcpp)) suppressMessages(require(inline)) code<- ' arma::mat coeff = Rcpp::as(a); arma::mat errors = Rcpp::as(e); int m = errors.n_rows; int n = errors.n_cols; arma::mat simdata(m,n); simdata.row(0) = arma::zeros(1,n); for (int row=1; row 4: #include 5: 6: 7: #ifndef BEGIN_RCPP 8: #define BEGIN_RCPP 9: #endif 10: 11: #ifndef END_RCPP 12: #define END_RCPP 13: #endif 14: 15: using namespace Rcpp; 16: 17: 18: // user includes 19: 20: 21: // declarations 22: extern "C" { 23: SEXP file33765791( SEXP a, SEXP e) ; 24: } 25: 26: // definition 27: 28: SEXP file33765791( SEXP a, SEXP e ){ 29: BEGIN_RCPP 30: 31:arma::mat coeff = Rcpp::as(a); 32:arma::mat errors = Rcpp::as(e); 33:int m = errors.n_rows; int n = errors.n_cols; 34:arma::mat simdata(m,n); 35:simdata.row(0) = arma::zeros(1,n); 36:for (int row=1; row file33765791.cpp.err.txt' returned status 1 I am working under R 2.14.0 and as the pros among you might guess, I am new to using the C++ interfaces within R. I think all I have to do is to edit some settings on my Windows 7 machine here, but the error message is too cryptic to me. Alas, I could also not find any thread or help topic that deals with this online. I appreciate any direct reply or reference where I can find a solution to this. Please let me know in case I am leaving out some essential details here. If you put the program source into a file (e.g. fn.cpp) and in a Windows cmd shell you run R CMD SHLIB fn.cpp what do you get? I would guess you've got a problem with your setup of the compiler or other tools, and this would likely show it. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] warning for inefficiently compressed datasets
Hi, Recently added to doc/NEWS.Rd: 'R CMD check' now gives a warning rather than a note if it finds inefficiently compressed datasets. With 'bzip2' and 'xz' compression having been available since R 2.10.0, there is no excuse for not using them. Why isn't a note enough for this? Generally speaking, warnings are for things that are dangerous, or unsafe, or unportable, or for anything that could potentially cause trouble. I don't see how using gzip instead of bzip2 or xz could fall into that category (and BTW gzip is the default for save() and for 'R CMD build' resave-data feature). The problem is that bzip2 and xz compressions are slower and also require more memory than gzip. Bioconductor has big data packages and sometimes it makes sense to use gzip and not bzip2 or xz. For example, when loading Human chromosome 1 from disk, bzip2 and xz are 7 and 3.4 times slower than gzip, respectively: > system.time(load("chr1-gzip.rda")) user system elapsed 1.210 0.180 1.384 > system.time(load("chr1-bzip2.rda")) user system elapsed 9.500 0.160 9.674 > system.time(load("chr1-xz.rda")) user system elapsed 4.460.204.69 hpages@latitude:~/testing$ ls -lhtr chr1-*.rda -rw-r--r-- 1 hpages hpages 61M 2011-12-06 12:13 chr1-gzip.rda -rw-r--r-- 1 hpages hpages 55M 2011-12-06 12:15 chr1-bzip2.rda -rw-r--r-- 1 hpages hpages 49M 2011-12-06 12:25 chr1-xz.rda This is with R-2.14.0 on a 64-bit Ubuntu laptop with 8GB of RAM. The size on disk doesn't really matter and it doesn't matter either that the source tarball for the full Human genome ends up being 20% bigger when using gzip instead of xz: the 20% extra time it takes to download it (which needs to be done only once) will largely be compensated by the fact that most analyses will run faster e.g. in 40-45 sec. instead of more than 2 minutes (for many short analyses, loading the chromosomes into memory is the bottleneck). Is there a way to turn this warning off? If not, could an option be added to 'R CMD check' to turn this warning off? Something along the lines of the --no-resave-data option for 'R CMD build'. Thanks, H. -- Hervé Pagès Program in Computational Biology Division of Public Health Sciences Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N, M1-B514 P.O. Box 19024 Seattle, WA 98109-1024 E-mail: hpa...@fhcrc.org Phone: (206) 667-5791 Fax:(206) 667-1319 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel