From savicky at cs.cas.cz  Wed Feb 22 16:29:53 2012
From: savicky at cs.cas.cz (Petr Savicky)
Date: Wed, 22 Feb 2012 16:29:53 +0100
Subject: [Rd] OpenMP and random number generation
In-Reply-To: <A39D2681-A25E-4BD4-933F-A3AF706A4D6E@math.univ-montp2.fr>
References: <A39D2681-A25E-4BD4-933F-A3AF706A4D6E@math.univ-montp2.fr>
Message-ID: <20120222152953.GC630@cs.cas.cz>

Hi.

> Now that R has OpenMP facilities, I'm trying to use it for my own package but I'm still wondering if it is safe to use random number generation within a OpenMP block. I looked at the R writing extension document  both on the OpenMP and Random number generation but didn't find any information about that.

Package CORElearn (i am a coauthor) uses random number generation
under OpenMP in C++. This requires to have a separate copy of the
generator with its own memory for each thread.

Do you want to use it in C or C++?

Petr Savicky.



[Rd] OpenMP and random number generation
Petr Savicky