Page 2 of 39

Parallel RNG and distributed MC

Posted: January 26th, 2012, 1:27 pm
by Cuchulainn
QuoteOriginally posted by: DevonFangsA stupid contribution from my side: I noticed that a much appreciated "order zero" is just distributed computed via MPI. People like it because it's very simple: you have to do 10**5 simulation and you have 4 machines, just make 25k on each machine and then aggregate.I think it'd be useful if an interface for this were provided. People could build small grids using the machines they have in their group for simple tasks.Which implementation of MPI are you using? Do you http://www.boost.org/doc/libs/1_47_0/doc/html/mpi.html ?? How about seeding on each machine.

Parallel RNG and distributed MC

Posted: January 26th, 2012, 2:45 pm
by Cuchulainn
QuoteI need to compile TRNG. I was hoping it was headers only.. Yep.

Parallel RNG and distributed MC

Posted: January 26th, 2012, 3:50 pm
by Cuchulainn
QuoteOriginally posted by: outrunI'm going to test this one instead (the choice op prng should be modular/plug-able so both will eventually work)http://deshawresearch.com/resources_random123.htmlJust downloaded and ran the darts program to compute pi. Worked 1st time.Need to see how to generate rns and integrate into MC.."Headers only" is good! docs

Parallel RNG and distributed MC

Posted: January 26th, 2012, 4:05 pm
by Cuchulainn
QuoteOriginally posted by: outrunQuoteOriginally posted by: CuchulainnQuoteOriginally posted by: outrunI'm going to test this one instead (the choice op prng should be modular/plug-able so both will eventually work)http://deshawresearch.com/resources_random123.htmlJust downloaded and ran the darts program to compute pi. Worked 1st time.Need to see how to generate rns and integrate into MC.."Headers only" is good! docsGood to hear! This bit from the docs link is interesting:Unlike conventional RNGs, counter-based RNGs are stateless functions (or function classes i.e. functors) whose arguments are a counter, and a key and whose return value is the same type as the counter.value = CBRNGname(counter, key)The returned value is a deterministic function of the key and counter, i.e. a unique (counter, key) tuple will always produce the same result. The result is highly sensitive to small changes in the inputs, so that the sequence of values produced by simply incrementing the counter (or key) is effectively indistinguishable from a sequence of samples of a uniformly distributed random variable.So, that means no statics and no race conditions??

Parallel RNG and distributed MC

Posted: January 26th, 2012, 4:26 pm
by Cuchulainn
QuoteOriginally posted by: outrunWe can maybe create an object with an internal counter (a state) that increments and make it a drop in replacement for the rng object in your example? I'll have some time to test this lib later on. Looks intetestig!yes, pls. I just need a simple functor as in