similar to: Parallel number stream: clusterSetRNGStream

Displaying 20 results from an estimated 400 matches similar to: "Parallel number stream: clusterSetRNGStream"

2011 Dec 10
0
clusterSetRNGStream() question
In a vanilla R 2.14.0 GUI session (on Windows XP SP3): > library(parallel) > cl<-makePSOCKcluster(2) > RNGkind() [1] "Mersenne-Twister" "Inversion" > clusterSetRNGStream(cl) > RNGkind() [1] "L'Ecuyer-CMRG" "Inversion" > stopCluster(cl) Is it intentional that clusterSetRNGStream() changes the RNG kind in the master process?
2013 Jan 23
3
How to construct a valid seed for l'Ecuyer's method with given .Random.seed?
Dear expeRts, I struggle with the following problem using snow clusters for parallel computing: I would like to specify l'Ecuyer's random number generator. Base R creates a .Random.seed of length 7, the first value indicating the kind fo random number generator. I would thus like to use the components 2 to 7 as the seed for l'Ecuyer's random number generator. By doing so, I
2013 Jan 22
2
Length of seed for l'Ecuyer-CMRG
Dear expeRts, ./src/library/base/man/Random.Rd says that L'Ecuyer requires a seed of length 6. ./src/library/parallel/man/RngStream.Rd also mentions this, but only in the text part; In the "Arguments"-part, it says that "seed" has to be of length 7 Also: ,---- | > RNGkind("L'Ecuyer-CMRG") | > length(.Random.seed) | [1] 7 `---- Is the docu old? Some
2015 Feb 03
2
Seed in 'parallel' vignette
Hi, This is most likely only a minor technicality, but I saw the following: On page 6 of the 'parallel' vignette (http://stat.ethz.ch/R-manual/R-devel/library/parallel/doc/parallel.pdf), the random-number generator "L'Ecuyer-CMRG" is said to have seed "(x_n, x_{n-1}, x_{n-2}, y_n, y_{n-1}, y_{n-2})". However, in L'Ecuyer et al. (2002), the seed is given with
2018 Mar 04
3
Random Seed Location
On Mon, Feb 26, 2018 at 3:25 PM, Gary Black <gwblack001 at sbcglobal.net> wrote: (Sorry to be a bit slow responding.) You have not supplied a complete example, which would be good in this case because what you are suggesting could be a serious bug in R or a package. Serious journals require reproducibility these days. For example, JSS is very clear on this point. To your question >
2018 Mar 04
2
Random Seed Location
The following helps identify when .GlobalEnv$.Random.seed has changed: rng_tracker <- local({ last <- .GlobalEnv$.Random.seed function(...) { curr <- .GlobalEnv$.Random.seed if (!identical(curr, last)) { warning(".Random.seed changed") last <<- curr } TRUE } }) addTaskCallback(rng_tracker, name = "RNG tracker") EXAMPLE: >
2018 Mar 04
0
Random Seed Location
Thank you, everybody, who replied! I appreciate your valuable advise! I will move the location of the set.seed() command to after all packages have been installed and loaded. Best regards, Gary Sent from my iPad > On Mar 4, 2018, at 12:18 PM, Paul Gilbert <pgilbert902 at gmail.com> wrote: > > On Mon, Feb 26, 2018 at 3:25 PM, Gary Black <gwblack001 at sbcglobal.net> >
2018 Mar 04
0
Random Seed Location
On 04/03/2018 5:54 PM, Henrik Bengtsson wrote: > The following helps identify when .GlobalEnv$.Random.seed has changed: > > rng_tracker <- local({ > last <- .GlobalEnv$.Random.seed > function(...) { > curr <- .GlobalEnv$.Random.seed > if (!identical(curr, last)) { > warning(".Random.seed changed") > last <<- curr
2012 Feb 17
3
portable parallel seeds project: request for critiques
I've got another edition of my simulation replication framework. I'm attaching 2 R files and pasting in the readme. I would especially like to know if I'm doing anything that breaks .Random.seed or other things that R's parallel uses in the environment. In case you don't want to wrestle with attachments, the same files are online in our SVN
2017 Jul 12
2
[PATCH] Avoid -Wsometimes-uninitialized error for valid test code
|frame_size_enum| in tests/test_opus_encode.cl:117 is flagged as potentially uninitialized but get_frame_size_enum() will fail anyway if a valid value is not found. --- tests/test_opus_common.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_opus_common.h b/tests/test_opus_common.h index ff7f0142..8b878607 100644 --- a/tests/test_opus_common.h +++ b/tests/test_opus_common.h @@
2005 Aug 03
7
call fortran in R
Hello, I used a mac G5, R.2.1.1, and G77 3.4.4 and I would like to use and call a fortran subroutine. The trouble is that it seems I am not able to correctly load the compiled code. Here is what I have done: In the terminal this how I compiled my fortran code: R CMD SHLIB ~/Desktop/Fortan_kmeans/kmeans3.f There is the wrapper I have paste inside de kmeans3.f file: c
2007 Apr 24
2
Error in clusterApply(): recursive default argument reference
Hi, I want to compute a distribution of the intersection of a graph and 'randomized' graphs induced by the permutations of node labels (to preserve the graph topology). Since I ll have many permutations to perform, I was thinking of using the snow package and in particular "parSapply" to divide the work between my 4 CPUs. But I get the following error message : Error in
2017 Jul 12
1
[PATCH] Avoid -Wsometimes-uninitialized error for valid test code
r+ with James' fix. On 12/07/17 02:01 PM, James Zern wrote: > On Wed, Jul 12, 2017 at 10:58 AM, Felicia Lim <flim at google.com> wrote: >> |frame_size_enum| in tests/test_opus_encode.cl:117 is flagged as potentially >> uninitialized but get_frame_size_enum() will fail anyway if a valid value is >> not found. >> --- >> tests/test_opus_common.h | 2 ++
2012 Aug 02
2
parallel SNOW slower than single core?
Dear All, I am learning parallel in R and start with the package "snow". I did a test about running time and the parallel version is much slower than the regulat code. My laptop is X200s with dual core intel L9400 cpu. Should I make more clusters than 2? Or how to improve the performance? # install.packages("snow") library(snow) cl <- makeCluster(2) t1 <- proc.time() a
2013 Apr 18
1
parSapply can't find function
Here is the code, assuming 8 cores in the cpu. library('modeest') library('snow') cl = makeCluster(rep('localhost', 8), 'SOCK') x = vector(length=50) x = sapply(x, function(i) i=sample(c(1,0), 1)) pastK = function(n, x, k) { if (n>k) { return(x[(n-k):(n-1)]) } else {return(NA)} } predR = function(x, k) { pastList = lapply(1:length(x), function(n)
2004 Apr 08
2
socket clusters on snow dies easily
hello, I'm using R 1.8.1 with the lastest snow package on FreeBSD 4.9. However, when I try to using socket clusters, it's very unstable. Sometimes it dies half way when I run parSapply(), sometimes it dies when cluster connection is idle. I create a socket cluster by following cmd cl = makeCluster("foo", type = "SOCK", outfile="/tmp/rafanlog");
2018 Sep 21
3
Bias in R's random integers?
Not sure what should happen theoretically for the code in vseq.c, but I see the same pattern with the R generators I tried (default, Super-Duper, and L'Ecuyer) and with with bash $RANDOM using N <- 10000 X1 <- replicate(N, as.integer(system("bash -c 'echo $RANDOM'", intern = TRUE))) X2 <- replicate(N, as.integer(system("bash -c 'echo $RANDOM'",
2016 Sep 20
2
Numerical accuracy of matrix multiplication
>>>>> peter dalgaard <pdalgd at gmail.com> >>>>> on Fri, 16 Sep 2016 13:33:11 +0200 writes: > On 16 Sep 2016, at 12:41 , Alexis Sarda <alexis.sarda at gmail.com> wrote: >> Hello, >> >> while testing the crossprod() function under Linux, I noticed the following: >> >> set.seed(883)
2008 Dec 31
1
Problem with package SNOW on MacOS X 10.5.5
Hello All, I can run the "lower level" functions OK, but many of the higher level (eg. parSApply) functions are generating errors. When running the example (from the snow help docs) for parApply on MacOSX 10.5.5, I get the following error: cl <- makeSOCKcluster(c("localhost","localhost")) sum(parApply(cl, matrix(1:100,10), 1, sum)) Error in
2011 Jul 02
5
%dopar% parallel processing experiment
dear R experts--- I am experimenting with multicore processing, so far with pretty disappointing results. Here is my simple example: A <- 100000 randvalues <- abs(rnorm(A)) minfn <- function( x, i ) { log(abs(x))+x^3+i/A+randvalues[i] } ?## an arbitrary function ARGV <- commandArgs(trailingOnly=TRUE) if (ARGV[1] == "do-onecore") { ?library(foreach) ?discard <-