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

Sobol initialisation with direction numbers + primitive polynomials in fortran fails

Dear experts,

could someone provide me with a working example for the initialisation of the sobol generator with both direction numbers and primitive polynomials in FORTRAN?

I am trying to use the dir. numbers and primitive polynomials from
http://web.maths.unsw.edu.au/~fkuo/sobol/new-joe-kuo-6.21201
by following the instructions
http://software.intel.com/sites/products/documentation/hpc/mkl/vslnotes/8_4_9_SOBOL.htm
but the random number sequence is the same no matter which direction numbers and prim. polynomials I use. Strangely enough, I don't get any error message about any problems during initialisation!

I am using a MKL version which came with fortran composer 2011.3.174.

Feedback is much appreciated.

Oleg
0 Kudos
4 Replies
Highlighted
Moderator
10 Views

Oleg,may be this example: " mrlroot\examples\vslf\source\osoboluserdirnums.f" will help you?
0 Kudos
Highlighted
10 Views

Oleg, let me give you a more detailed explanation.

1. SOBOL QRNG is implemented so that if params array is incorrectly filled the default implementation with dimension 1 will be used.

2. soboluserdirnums.f example shows how to initialize SOBOL QRNG with a complete direction numbers table. If you'd like you provide the generator with both initial direction numbers and primitive polynomials youll need to slightly change params array filling like this:

params(1) = dm1
params(2) = VSL_USER_QRNG_INITIAL_VALUES
params(3) = IOR(VSL_USER_INIT_DIRECTION_NUMBERS, &
& VSL_USER_PRIMITIVE_POLYMS)
params(3) = IOR(params(3), VSL_QRNG_OVERRIDE_1ST_DIM_INIT)

do i = 1, dm1
params(i+3) = poly(i)
end do
params(4 + dm1) = maxdeg
k = 5 + dm1
do i=1,dm1
do j=1,maxdeg
params(k) = vinit(i,j)
k = k + 1
end do
end do
nparams = 4 + dm1 + dm1*maxdeg

0 Kudos
Highlighted
Beginner
10 Views

I did not know about this example!
sorry for not getting back to you earlier -- the autumn cold got me.
0 Kudos
Highlighted
Beginner
10 Views

Hi Dmitri,
thanks a lot for your more detailed explanation. At first glance it looks similar to my code, but I will have a close look once I'm back to work -- the autumn cold got me.
Best,
Oleg
0 Kudos