[Rcppdevel] Very Large Matrices in RcppArmillao
Dirk Eddelbuettel
edd at debian.org
Tue Jul 17 15:14:59 CEST 2012
On 16 July 2012 at 23:30, French, Joshua wrote:
 I am doing some linear algebra on large matrices in R and receiving the
 following error: "allocMatrix: too many elements specified". From what I
 understand, the error is caused by the fact that R uses 32bit ints and not
 64bit ints for matrix indices, so R doesn't have a way to represent all the
 elements in the very large matrix.

 My two questions:

 1. Armadillo (and presumably RcppArmadillo) will not have this issue since
 Armadillo provided support for 64bit indices as of version 2.4.0. Is there a
 way to easily utilize this functionality from within RcppArmadillo?
I need to double check but this may have been a compiletime option you need
to enable. In any event ... R indices are still limited so you may not be
able to pass these back and forth.
 2. I have found in the past that some of the speeds gains from RcppArmadillo
 in comparison to pure R are lost when passing large matrices as arguments.
 There will always be overhead when passing arguments (especially large matrix
 arguments) to pretty much any function. Are there any tricks to minimize the
 overhead when passing a nonsparse matrix argument of say 1,000,000 by 500 from
 R to Armadillo?
I defer all question concerning sparse matrices to Doug and other users of
sparse matrix code. I live mostly in a smalltomedium size dense matrix world.
Dirk
 Thanks.
 
 Joshua French, Ph.D.
 Assistant Professor
 Department of Mathematical and Statistical Sciences
 University of Colorado Denver
 Joshua.French at ucdenver.edu
 http://math.ucdenver.edu/~jfrench/
 Ph: 3035566265 Fax: 3035568550


 
 _______________________________________________
 Rcppdevel mailing list
 Rcppdevel at lists.rforge.rproject.org
 https://lists.rforge.rproject.org/cgibin/mailman/listinfo/rcppdevel

Dirk Eddelbuettel  edd at debian.org  http://dirk.eddelbuettel.com
More information about the Rcppdevel
mailing list