Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
7 Views

Rng initializing by state

Hi

I would like to initialize the Mersenne Twister  rng's by a state instead of by a seed.

How can this be done in mkl?

TIA for your help,

Petros

0 Kudos
2 Replies
Highlighted
Employee
7 Views

 

Hi Petros,

Do you want to initialize the generator by array of seeds from which the state is internally produced or you already have a specific state of the generator you want to resume computations with?

In the first case we provided extended version of NewStream routine. The library currently does not have tools to support the second scenario.

If the second scenario is the case, I wonder why you are interested to provide the state into Intel MKL version of MT19937 instead of doing initialization that would result eventually in this state (I assume the state you have was produced from the specific seed)

Please, let me know

Thanks,

Andrey

 

0 Kudos
Highlighted
Beginner
7 Views

Hi Andrey,

>>Do you want to initialize the generator by array of seeds from which the state is internally produced or you already have a specific state of the generator you >>want to resume computations with?

None of the two.

I have the state.

Somebody things they have a better way to arrive to the state from a scalar input, than the standard one, and they are asking me to try it.

Please, don't make the effort  to come up with a substitute solution, as this is the problem  I need to solve(I truly appreciate the effort, though).

Is there a way to obtain the pointer to the state and overwrite its contents?

(Just using the vector-input form of creating a stream, would, of course, be a very different thing.)

PS: actually, per your point there is a way (albeit not immediate) to resume from a specific state, by making a copy of the stream (secondary stream) and save it and later copy its state to the "primary" stream, thus "re-instating it" !

 

 

 

0 Kudos