Hi,
I am using Scatterv to distribute m initial independent states (child_states below).
Specifically:
import numpy as np
seed = 98765. # Set the seed.
# Create the RNG to pass around.
rng = np.random.default_rng(seed)
# Get the SeedSequence of the passed RNG.
ss = rng.bit_generator._seed_seq
# Create m initial independent states.
child_states = np.array(ss.spawn(reps), dtype=object)
Where an element of child_states looks like:
SeedSequence(
entropy=1234,
spawn_key=(0,),
),
and is an instance of class ‘np.random.bit_generator.SeedSequence'.
In my call to Scatterv, I am unsure how I should specify the type?
Thanks,
Jake
--
You received this message because you are subscribed to the Google Groups "mpi4py" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mpi4py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mpi4py/322e045e-00a6-436f-b84d-35fb2df57de6n%40googlegroups.com.
Thank you, Lisandro.I know this is a bit out of scope, but do you have any recommendations for producing repeatable pseudo-random numbers across each process?
Say, I want to run m repetitions, where m > comm.size. So, in addition to requiring independence across processes, I will need independence within each process as well. (I will also sample more than once per repetition.)
I am hoping to use (upper case) Scatterv.