Community
cancel
Showing results for
Did you mean:
Beginner
103 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
4 Replies
Moderator
103 Views
Beginner
103 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

Beginner
103 Views