[Rcpp-devel] Segfault error during simulation in Rcpp
On 6 May 2013 at 08:34, Douglas Bates wrote:
| The segfaults seem to be related to PutRNGstate and I don't see that you have | declared an instance of the class that causes the RNGstate to be accessed and | restored (I have forgotten the name of the class but it should be fairly easy | to find in the examples). ?When you use random number generators from within | Rcpp you either need to call getRNGstate/putRNGstate yourself or to simply | declare an instance of this class. Very good point. By using sourceCpp(), I got that added automagically thanks to JJ and hence never saw the error. Dirk
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com