similar to: clusterSetRNGStream() question

Displaying 20 results from an estimated 500 matches similar to: "clusterSetRNGStream() question"

2019 Jun 07
1
Parallel number stream: clusterSetRNGStream
Dear All, Is the following expected behaviour? set.seed(1) library(parallel) cl = makeCluster(5) clusterSetRNGStream(cl, iseed = NULL) parSapply(cl, 1:5, function(i) sample(1:10, 1)) # 7 4 2 10 10 clusterSetRNGStream(cl, iseed = NULL) # 7 4 2 10 10 parSapply(cl, 1:5, function(i) sample(1:10, 1)) stopCluster(cl) The documentation could be read either way, e.g. * iseed: An integer to be
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
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
2012 Jan 13
0
Example of "task seeds" with R parallel. Critique?
Greetings: In R parallel's vignette, there is a comment "It would however take only slightly more work to allocate a stream to each task." (p.6). I've written down a working example that can allocate not just one, but several separate seeds for each task. (We have just a few project here that need multiple streams). I would like to help work that up for inclusion in the
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
2015 Mar 08
0
Seed in 'parallel' vignette
On Tue, Feb 3, 2015 at 10:39 AM, Marius Hofert <marius.hofert at uwaterloo.ca> wrote: > 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 >
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
2007 Oct 17
0
predictable bit patterns in runif(n) shortly after set.seed
Mersenne Twister generator is known to be sensitive to the algorithm used to generate its initial state. The initialization used in R generates the initial state in a way, which leaves linear dependencies mod 2 among the bits in the initial state. Since Mersenne Twister performs only operations, which are linear mod 2, these dependencies propagate to the output sequence. An easy to see
2016 Sep 20
0
Numerical accuracy of matrix multiplication
>>>>> Alexis Sarda <alexis.sarda at gmail.com> >>>>> on Tue, 20 Sep 2016 17:33:49 +0200 writes: > I just realized that I was actually using a different random number > generator, could that be a valid reason for the discrepancy? > The code should be: > RNGkind("L'Ecuyer") > set.seed(883) > x <-
2016 Sep 20
0
Numerical accuracy of matrix multiplication
I just realized that I was actually using a different random number generator, could that be a valid reason for the discrepancy? The code should be: RNGkind("L'Ecuyer") set.seed(883) x <- rnorm(100) x %*% x - sum(x^2) # equal to 1.421085e-14 Regards, Alexis Sarda. On Tue, Sep 20, 2016 at 5:27 PM, Martin Maechler <maechler at stat.math.ethz.ch > wrote: >
2008 Feb 13
3
Best way to reset random seed when using set.seed() in a function?
Hi, this is related to a question just raised on Bioconductor where one function sets the random seed internally but never resets it, which results in enforced down streams random samples being deterministic. What is the best way to reset the random seed when you use set.seed() within a function? Is it still to re-assign '.Random.seed' in the global environment as following 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 05
1
Random Seed Location
On Sun, Mar 4, 2018 at 3:23 PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > 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
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 >
2013 Oct 03
1
Problem with makePSOCKcluster R3.0.1
Hello, I am using function makePSOCKcluster to make parallel computation on 3 EC2 Amazon machines. I have a passwordless between machines and ssh is correct. In the R 2.15.1 release this function works correctly. Installing R 3.0.1 on my EC2 machines makePSOCKcluster does not produce the cluster. If I run the function with outfile="" option, I obtain this message Error in
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
2016 Jan 15
1
Error in socketConnection(master, port = port, blocking = TRUE, open = "a+b", : cannot open the connection
Dear All I have sucessfully created cluster of four nodes using localhost in my local machine by executing the following command > cl<-makePSOCKcluster(c(rep("localhost",4)),outfile='',homogeneous=FALSE,port=11001) starting worker pid=4271 on localhost:11001 at 12:12:26.164 starting worker pid=4280 on localhost:11001 at 12:12:26.309 starting worker pid=4289 on
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: >
2019 Feb 26
1
bias issue in sample() (PR 17494)
Ralf I don't doubt this is expected with the current implementation, I doubt the implementation is desirable. Suggesting to turn this to pbirthday(1e6, classes = 2^53) ## [1] 5.550956e-05 (which is still non-zero, but much less likely to cause confusion.) Best regards Kirill On 26.02.19 10:18, Ralf Stubner wrote: > Kirill, > > I think some level of collision is actually
2017 Dec 04
0
PSOCK cluster and renice
Looks like a bug to me due to wrong assumptions about 'nice' arguments, but could be because a "non-standard" 'nice' is used. If we do: > trace(system, tracer = quote(print(command))) Tracing function "system" in package "base" we see that the system call used is: > cl <- parallel::makePSOCKcluster(2L, renice = 19) Tracing system(cmd, wait