Thanks for your response Andreas, Yes I was thinking of being able to reproduce a serial execution. Although that obviously isn't any where near as important as being able to reproduce a piece of work. I've just spent three hours writing a reply to you saying your suggestion doesn't work - only now realised I had my code set up wrong and had put srand=N instead of srand(N). I hate programming! I just create a user type which has a srand field and pass pmap a vector (one for each worker) of such a type - works a treat.Thanks for your help. To get around criticism of independence of stream I could just "burn" (as in MCMC runs) a number of draws in each stream (criticism seems to be regarding the first N runs). Does anyone have any idea what size this burn N should be (can't find any papers on it) given the particular MT generator Julia uses?
Steve On Thursday, February 26, 2015 at 9:58:40 PM UTC, Andreas Noack wrote: > > Would that be to get the exact same variates as the serial execution would > create? > > 2015-02-26 15:04 GMT-05:00 Steve Kay <[email protected] > <javascript:>>: > >> Thanks for the comments. - nice to know it's not my usual programming >> inadequacies. I like the >> >> for p in workers() >> @spawnat p srand(seed + p) >> end >> >> idea. It would be even better if instead of resetting the seed it did a >> (imaginary) @spawnat p jumpahead(seed,(p*X)) where X was larger than the >> number of bootstrap reps for each worker. Here jumpahead(seed,b) took >> the state of the random number generator when seed=seed and then moves it >> on b steps. Very easy for me to come up with imaginary commands - way past >> my ability to actually program them! >> >> On Thursday, February 26, 2015 at 3:37:19 PM UTC, Steve Kay wrote: >>> >>> There is a really nice example of using pmap for parallel bootstrapping >>> purposes on http://juliaeconomics.com/2014/06/18/parallel- >>> processing-in-julia-bootstrapping-the-mle/ . >>> If you rerun the code however, it's clear that the pmap function does >>> not respect the set seed command srand. I've tried various small changes >>> but nothing is working (although a lot of nuances around parallel computing >>> are a bit above my level). Is it possible to get pmap to respect the seed >>> setting? I hope there is as pmap is superb otherwise. >>> >>> Any help much appreciated. >>> >>> Best, >>> >>> Steve >>> >> >
