[Rcpp-devel] Segfault error during simulation in Rcpp

Matteo Fasiolo matteo.fasiolo at gmail.com
Mon May 6 20:47:38 CEST 2013


Ok, I'll do exactly this and I'll report if I still encounter this
problem in simpler programs. Thanks.


On Mon, May 6, 2013 at 7:39 PM, Dirk Eddelbuettel <edd at debian.org> wrote:

>
> On 6 May 2013 at 19:03, Matteo Fasiolo wrote:
> | Sorry for the silly question, but since I'm using sourceCpp() too I
> should't
> | call
> | getRNGstate/putRNGstate, right?
>
> If you use any of the random number generators provided by R via Rcpp, then
> you __MUST__ also instantiate an RNGScope() object (which does this for
> you).
>
> We documented this *very* clearly in a number of places in the
> documentation.
>
> (And yes, sourceCpp() adds one as a courtesy but you should still add
> one. The extra few nanoseconds in execution speed won't matter.)
>
> You report is otherwise still unreproducible at my end.
>
> Your program is also complex in that it does a few things.  Try writing
> smaller and smaller programs still exhibiting the error at your end.  And
> do
> report back if you find something, or have questions.
>
> Dirk
>
> --
> Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20130506/935153e3/attachment.html>


More information about the Rcpp-devel mailing list