- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using MKL, I get identical QRN's whether I use either the SOBOL or the NIEDERREITER methods. Is this correct, or am I doing something wrong?
Code extract used to generate the QRN's is as below:
USE mkl_vsl
integer status !Error/status
integer brng !Index of generator to initialize stream
integer method !Method = 0 in case of uniform distribution
integer dimen
TYPE (VSL_STREAM_STATE) stream !Random stream
TYPE (VSL_STREAM_STATE) stream2 !Random stream 2
integer, PARAMETER :: nc = 10
integer, PARAMETER :: nr = 1000
real sobel_num(nc,nr)
real niederr_num(nc,nr)
fmt = '(10(:,",",f8.6))'
OPEN(11, file='TestRandomOut.csv')
!SOBEL
write(11,'(///,a,/)') 'SOBOL'
method = 0
sobel_num = 0.0
brng = VSL_BRNG_SOBOL
dimen = 1
status = vslnewstream( stream, brng, dimen ) !Create SOBOL stream
status = vsrnguniform( method, stream, nc*nr, sobel_num, 0.0, 1.0 )
status = vsldeletestream( stream ) !Delete stream
write(11,fmt) sobel_num
!NIEDERREITER
write(11,'(///,a,/)') 'NIEDERREITER'
method = 0
niederr_num = 0.0
brng = VSL_BRNG_NIEDERR
dimen = 1
status = vslnewstream( stream2, brng, dimen ) !Create NIEDERREITER stream
status = vsrnguniform( method, stream2, nc*nr, niederr_num, 0.0, 1.0 )
status = vsldeletestream( stream2 ) !Delete stream
write(11,fmt) niederr_num
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
VSL implementations of Sobol and Niederreiter QRNGs are both Gray code based (see Vslnotes.pdf for implementation details). The generators are different in their initialization schemes. However, for particular dimension d=1 the generators are initialized similarly, and you have identical outputs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the explanation - yes the results were for d=1.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page