[Rcpp-devel] Rcpp:wrap - any limitations for vector size?

Mathias Bader mail at mathiasbader.de
Thu Aug 9 15:23:19 CEST 2012


 Hello Davor

 Thank you for your message.

 I came up with similar numbers: 4.29 billion elements for unsigned int. 
 My simulation goes easily to one million in some seconds, so I might 
 reach that number, but I think that is not the reason why my program 
 crashes.

 I think the problem has something to do with the List-creation of Rcpp, 
 someone had a similar error:
     
 http://lists.r-forge.r-project.org/pipermail/rcpp-devel/2012-March/003657.html
 Does anyone know whether there is a workaround for this problem?

 Mathias




 On Thu, 09 Aug 2012 06:16:03 -0700, Davor Cubranic wrote:
> On 12-08-09 05:08 AM, Mathias Bader wrote:
>> My question: Is there any restriction on the size of the vectors 
>> which I
>> hand from C++ to R? Because during the MCMC simulation the vectors 
>> might
>> become really big.
>
> How big are we talking about? R uses 32-bit ints for indexes, which
> would be over 2 billion elements.
>
> What is the crash message? Segmentation fault? Have you tried running
> with valgrind to check for memory allocation problems?
>
> Davor



More information about the Rcpp-devel mailing list