[R-pkg-devel] Multi-threaded C with R's RNG

Tom Snijders Tom.Snijders at nuffield.ox.ac.uk
Sat Nov 28 14:40:47 CET 2015


On Fri, 27 Nov 2015 19:48:04 +0100, Guillaume Chapron carnivorescience at gmail.com<mailto:carnivorescience at gmail.com> wrote:



| Has anyone written a package with a C code that uses R's RNG but in a multi-threaded way (e.g. to parallelize Monte Carlo simulations)? I do not have the knowledge to figure out myself how to solved this and would need to see an example.



This is done in RSiena, using the package parallel. The programming was done by Ruth Ripley. There is some documentation in the package RSienaTest in \doc\RSIENAspec.tex and \doc\RSienaDeveloper.tex (search in these files for 'processes'); RSienaTest is not at CRAN but can be obtained from http://r-forge.r-project.org/R/?group_id=461; with respect to this use of random number streams, RSiena and RSienaTest are identical.



Best wishes,

Tom
================================================================
Tom A.B. Snijders
Professor of Statistics and Methodology
Dept. of Sociology, University of Groningen
Emeritus Fellow, Nuffield College, University of Oxford
Associate Member, Dept. of Statistics, University of Oxford
http://www.stats.ox.ac.uk/~snijders/


	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list