<div dir="ltr"><div>I was about to ask you the same question =S. The only thing that I found was this <a href="http://lists.r-forge.r-project.org/pipermail/rcpp-devel/2013-November/006827.html">http://lists.r-forge.r-project.org/pipermail/rcpp-devel/2013-November/006827.html</a>. Can't find anything else in google, RcppArmadillo/issues or the rcpp-devel.<br></div><div>Thanks!</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div>George G. Vega Yon<br>+1 (626) 381 8171<br><a href="http://www.its.caltech.edu/~gvegayon/" target="_blank">http://www.its.caltech.edu/~gvegayon/</a></div></div></div></div>
<br><div class="gmail_quote">On Tue, May 3, 2016 at 10:48 AM, Dirk Eddelbuettel <span dir="ltr"><<a href="mailto:edd@debian.org" target="_blank">edd@debian.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hi George,<br>
<span class=""><br>
On 3 May 2016 at 10:17, George Vega Yon wrote:<br>
| I think I've found a solution for this. I've submitted a pull request here<br>
| <a href="https://github.com/RcppCore/RcppArmadillo/pull/88" rel="noreferrer" target="_blank">https://github.com/RcppCore/RcppArmadillo/pull/88</a>. It basically now allows the<br>
| users to pass -DARMA_64BIT_WORD and compile with it (so ARMA_32BIT_WORD is not<br>
| defined but it is still the default behavior of RcppArmadillo). Will work on<br>
| tests on this repo <a href="https://github.com/gvegayon/arma64bit" rel="noreferrer" target="_blank">https://github.com/gvegayon/arma64bit</a>.<br>
<br>
</span>The pull request looks good.  I know this issue had been bugging you for a<br>
while (and I am really glad we seem to be having a solution for you !!) but<br>
do you recall if I posted here _which_ packages failed when Conrad started to<br>
default to ARMA_64BIT_WORD under C++11 ?<br>
<span class="HOEnZb"><font color="#888888"><br>
Dirk<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
|<br>
| Best,<br>
|<br>
| George G. Vega Yon<br>
| <a href="tel:%2B1%20%28626%29%20381%208171" value="+16263818171">+1 (626) 381 8171</a><br>
| <a href="http://www.its.caltech.edu/~gvegayon/" rel="noreferrer" target="_blank">http://www.its.caltech.edu/~gvegayon/</a><br>
|<br>
| On Thu, Apr 28, 2016 at 6:07 PM, George Vega Yon <<a href="mailto:g.vegayon@gmail.com">g.vegayon@gmail.com</a>> wrote:<br>
|<br>
|     Hey!<br>
|<br>
|     Since it seems to be the case that we don't know much about what happens,<br>
|     I'm making an experiment which consists on an R package to stress<br>
|     RcppArmadillo here: <a href="https://github.com/gvegayon/arma64bit" rel="noreferrer" target="_blank">https://github.com/gvegayon/arma64bit</a>. Following Dirk's<br>
|     advice, I've included the #define ARMA_64BIT_WORD before #include<br>
|     <RcppArmadillo.h> (as seen here <a href="https://github.com/gvegayon/arma64bit/blob/" rel="noreferrer" target="_blank">https://github.com/gvegayon/arma64bit/blob/</a><br>
|     c10b5d4a80b93088da730e45ee8c583feeff2ab6/src/misc.cpp#L2-L3) and<br>
|     included CXX_STD = CXX11 in Makevars. After compiling the package and<br>
|     asking for a matrix of size 1e5 x 1e5 I get an error, here (so it doesn't<br>
|     seem to be working):<br>
|<br>
|     > x <- sp_runif(1e5,1e5,.01)<br>
|<br>
|     error: SpMat::init(): requested size is too large<br>
|     Error: SpMat::init(): requested size is too large<br>
|<br>
|     My guess is that #define ARMA_32BIT_WORD is overriding #define<br>
|     ARMA_64BIT_WORD. I'm an R user that jumped to Rcpp a while ago so I still<br>
|     don't fully understand how things work under the hood with R + Rcpp. Any<br>
|     clues?<br>
|<br>
|     Best,<br>
|<br>
|     sessionInfo()<br>
|<br>
|     R version 3.2.5 (2016-04-14)<br>
|     Platform: x86_64-pc-linux-gnu (64-bit)<br>
|     Running under: Ubuntu 14.04.4 LTS<br>
|<br>
|     locale:<br>
|      [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=<br>
|     en_US.UTF-8       <br>
|      [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=<br>
|     en_US.UTF-8   <br>
|      [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C    <br>
|              <br>
|     [10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8<br>
|     LC_IDENTIFICATION=C       <br>
|<br>
|     attached base packages:<br>
|     [1] stats     graphics  grDevices utils     datasets  methods   base     <br>
|<br>
|     other attached packages:<br>
|     [1] arma64bit_0.1.0.9000 Matrix_1.2-5        <br>
|<br>
|     loaded via a namespace (and not attached):<br>
|      [1] Rcpp_0.12.4     lattice_0.20-33 digest_0.6.9    withr_1.0.1    <br>
|     grid_3.2.5     <br>
|      [6] covr_2.0.1      git2r_0.14.0    magrittr_1.5    lazyeval_0.1.10<br>
|     rstudioapi_0.5 <br>
|     [11] whisker_0.3-2   rex_1.1.1       rmarkdown_0.9.5 devtools_1.11.1<br>
|     tools_3.2.5    <br>
|     [16] yaml_2.1.13     htmltools_0.3.5 memoise_1.0.0  <br>
|<br>
|     George G. Vega Yon<br>
|     +1 (626) 381 8171<br>
|     <a href="http://www.its.caltech.edu/~gvegayon/" rel="noreferrer" target="_blank">http://www.its.caltech.edu/~gvegayon/</a><br>
|<br>
|     On Thu, Mar 31, 2016 at 12:37 PM, Dirk Eddelbuettel <<a href="mailto:edd@debian.org">edd@debian.org</a>> wrote:<br>
|<br>
|<br>
|         On 29 March 2016 at 15:55, George Vega Yon wrote:<br>
|         | Hi there,<br>
|         |<br>
|         | A couple of days ago I included this comment on a Stackoverflow<br>
|         question about<br>
|         | "too large" matrices in RcppArmadillo<br>
|         | I wonder if we can use this in a package. After trying to compile the<br>
|         package<br>
|         | with and without PKG_CXXFLAGS=-DARMA_64BIT_WORD I'm still not able to<br>
|         create<br>
|         | sparse matrices bigger than 65,535 x 65,535. I've realized that the<br>
|         | RcppArmadilloConfig.h (version 0.6.600.4.0) file has ARMA_32BIT_WORD<br>
|         1 so it<br>
|         | actually prevents using ARMA_64BIT_WORD (I think?). Any way I can<br>
|         solve this,<br>
|         | or I just have to deal with R (3.2.4 Revised (2016-03-16 r70336)) not<br>
|         been able<br>
|         | to handle 64INT?<br>
|         |<br>
|         | <a href="http://stackoverflow.com/questions/16159174/" rel="noreferrer" target="_blank">http://stackoverflow.com/questions/16159174/</a><br>
|         | large-spmat-object-with-rcpparmadillo<br>
|         |<br>
|         | For which Dirk answered:<br>
|         |  <br>
|         | Try locally setting ARMA_64BIT_WORD (check how) -- I can't at the<br>
|         package level<br>
|         | as it breaks existing code. It will likely help you. If you set it<br>
|         before the #<br>
|         | include <RcppArmadillo.h> things may just work. That at least is the<br>
|         pln. (And<br>
|         | you should have asked on rcpp-devel to get more than two eyeballs on<br>
|         this...)<br>
|         | And yes the other answer basically says the same thing. – Dirk<br>
|         Eddelbuettel 2<br>
|         | days ago<br>
|         |<br>
|         | Now I'm asking again but on rcpp-devel =). The issue is that I'm<br>
|         concerned on<br>
|         | the part that Dirk says that "things may just work". I was reading<br>
|         about R not<br>
|         | been able to handle int64 and its implications for big matrices, and<br>
|         so I'm a<br>
|         | little concerned that if passing ARMA_64BIT_WORD works I may loose<br>
|         some<br>
|         | information on the way. For example, if I allow a users creating and<br>
|         | manipulating 1e6 x 1e6 sparse matrices, is there any chance for them<br>
|         to loose<br>
|         | information?<br>
|<br>
|         It is entirely possibly that nobody stresses RcppArmadillo this way and<br>
|         that<br>
|         setting ARMA_64BIT_WORD gets unset.   I only know that I cannot set it<br>
|         globally now as some packages (still) depend on ARMA_32BIT_WORD.<br>
|<br>
|         So I encourage you to experiment and to try locally.  Maybe something<br>
|         can<br>
|         (and even should) be improved.<br>
|<br>
|         Dirk<br>
|<br>
|<br>
|         |<br>
|         | Thanks,<br>
|         |<br>
|         | George G. Vega Yon<br>
|         | +1 (626) 381 8171<br>
|         | <a href="http://www.its.caltech.edu/~gvegayon/" rel="noreferrer" target="_blank">http://www.its.caltech.edu/~gvegayon/</a><br>
|         | _______________________________________________<br>
|         | Rcpp-devel mailing list<br>
|         | <a href="mailto:Rcpp-devel@lists.r-forge.r-project.org">Rcpp-devel@lists.r-forge.r-project.org</a><br>
|         | <a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/" rel="noreferrer" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/</a><br>
|         rcpp-devel<br>
|<br>
|         --<br>
|         <a href="http://dirk.eddelbuettel.com" rel="noreferrer" target="_blank">http://dirk.eddelbuettel.com</a> | @eddelbuettel | <a href="mailto:edd@debian.org">edd@debian.org</a><br>
|<br>
|<br>
|<br>
|<br>
<br>
--<br>
<a href="http://dirk.eddelbuettel.com" rel="noreferrer" target="_blank">http://dirk.eddelbuettel.com</a> | @eddelbuettel | <a href="mailto:edd@debian.org">edd@debian.org</a><br>
</div></div></blockquote></div><br></div>