[Rcpp-devel] RcppEigen needs 1GB memory to compile

Kevin Ushey kevinushey at gmail.com
Mon Dec 2 20:21:05 CET 2013


Try removing -pipe: see e.g.
http://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html#Overall-Options,
at -pipe.

On Mon, Dec 2, 2013 at 11:17 AM, Jeroen Ooms <jeroen.ooms at stat.ucla.edu> wrote:
> I noticed that RcppEigen fails to install on my servers because it requires
> more than 1gb of memory to compile. Is this expected? Are there any flags or
> options I could set to trade of some memory for cpu? A short simulation:
>
>> library(RAppArmor)
>> rlimit_as(1e9)
> $hardlim
> [1] 1e+09
>
> $softlim
> [1] 1e+09
>
>> install.packages("RcppEigen")
> Installing package into ‘/home/jeroen/R/x86_64-pc-linux-gnu-library/3.0’
> (as ‘lib’ is unspecified)
> trying URL 'http://cran.rstudio.com/src/contrib/RcppEigen_0.3.2.0.tar.gz'
> Content type 'application/x-gzip' length 1244321 bytes (1.2 Mb)
> opened URL
> ==================================================
> downloaded 1.2 Mb
>
> * installing *source* package ‘RcppEigen’ ...
> ** package ‘RcppEigen’ successfully unpacked and MD5 sums checked
> ** libs
> g++ -I/usr/share/R/include -DNDEBUG
> -I"/home/jeroen/R/x86_64-pc-linux-gnu-library/3.0/Rcpp/include"
> -I../inst/include -fpic  -O3 -pipe  -g  -c RcppEigen.cpp -o RcppEigen.o
> g++ -I/usr/share/R/include -DNDEBUG
> -I"/home/jeroen/R/x86_64-pc-linux-gnu-library/3.0/Rcpp/include"
> -I../inst/include -fpic  -O3 -pipe  -g  -c fastLm.cpp -o fastLm.o
> virtual memory exhausted: Cannot allocate memory
> make: *** [fastLm.o] Error 1
> ERROR: compilation failed for package ‘RcppEigen’
> * removing ‘/home/jeroen/R/x86_64-pc-linux-gnu-library/3.0/RcppEigen’
> * restoring previous
> ‘/home/jeroen/R/x86_64-pc-linux-gnu-library/3.0/RcppEigen’
>
> The downloaded source packages are in
> ‘/tmp/RtmpGnYaw4/downloaded_packages’
> Warning message:
> In install.packages("RcppEigen") :
>   installation of package ‘RcppEigen’ had non-zero exit status
>
>
> _______________________________________________
> 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


More information about the Rcpp-devel mailing list