<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Wichmann-Hill BRNG Seeding in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Wichmann-Hill-BRNG-Seeding/m-p/921599#M13002</link>
    <description>We are porting our application to various platforms where Intel MKL isn't available and using the NAG C Library to fill in. We noticed that both packages offer the Wichmann-Hill pseudorandom number generator, and we would like to make it so that given the same seed, the same output will be produced. However, according to the description and implementation of Wichmann-Hill on NAG, four seeds and a generator ID must be provided to initialize the stream while the VSL library uses a single seed when initializing. Thus, we can't see any immediate way of analogously seeding the two streams.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Is there a way in which, given a seed, we may produce the same output so that we can get consistent results across platforms?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
    <pubDate>Thu, 15 Jun 2006 08:50:48 GMT</pubDate>
    <dc:creator>melknin</dc:creator>
    <dc:date>2006-06-15T08:50:48Z</dc:date>
    <item>
      <title>Wichmann-Hill BRNG Seeding</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Wichmann-Hill-BRNG-Seeding/m-p/921599#M13002</link>
      <description>We are porting our application to various platforms where Intel MKL isn't available and using the NAG C Library to fill in. We noticed that both packages offer the Wichmann-Hill pseudorandom number generator, and we would like to make it so that given the same seed, the same output will be produced. However, according to the description and implementation of Wichmann-Hill on NAG, four seeds and a generator ID must be provided to initialize the stream while the VSL library uses a single seed when initializing. Thus, we can't see any immediate way of analogously seeding the two streams.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Is there a way in which, given a seed, we may produce the same output so that we can get consistent results across platforms?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Thu, 15 Jun 2006 08:50:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Wichmann-Hill-BRNG-Seeding/m-p/921599#M13002</guid>
      <dc:creator>melknin</dc:creator>
      <dc:date>2006-06-15T08:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: Wichmann-Hill BRNG Seeding</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Wichmann-Hill-BRNG-Seeding/m-p/921600#M13003</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Thank you for your question.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Wichmann-Hill pseudorandom number generator requires 4 seeds for its initialization. To pass them into the library you need to use vslNewStreamEx routine. Example below demonstrates how it works:&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;...&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Courier New"&gt;#define BRNG VSL_BRNG_WH&lt;BR /&gt;#define METHOD 0&lt;BR /&gt;#define N 1000&lt;BR /&gt;#define NSEED 4&lt;BR /&gt;...&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2" face="Courier New"&gt;int main()&lt;BR /&gt;{&lt;BR /&gt;unsigned int seed[NSEED];&lt;BR /&gt;double r&lt;N&gt;;&lt;BR /&gt;VSLStreamStatePtr stream;&lt;/N&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2" face="Courier New"&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2" face="Courier New"&gt;seed[0] = 123;&lt;BR /&gt;seed[1] = 124;&lt;BR /&gt;seed[2] = 125;&lt;BR /&gt;seed[3] = 126;&lt;BR /&gt;...&lt;BR /&gt;vslNewStreamEx( &amp;amp;stream, BRNG, NSEED, seed );&lt;BR /&gt;vdRngUniform( METHOD, stream, N, r, 0.0, 1.0 );&lt;BR /&gt;vslDeleteStream( &amp;amp;stream );&lt;BR /&gt;...&lt;BR /&gt;return 0;&lt;BR /&gt;}&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;If for some reasons number of seeds passed into the library is less than 4 (for example, when vslNewStream function is used for the initialization of the stream) the remaining seeds are set to thedefault values. More details about initialization of the Wichmann-Hill generator can be found in the Vslnotes.pdf &lt;/FONT&gt;&lt;A href="http://www.intel.com/software/products/mkl/docs/vslnotes.pdf" target="_blank"&gt;&lt;FONT size="2"&gt;(http://www.intel.com/software/products/mkl/docs/vslnotes.pdf&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size="2"&gt;),&lt;BR /&gt;section Testing of Basic Random Number Generators-&amp;gt;Basic Random Generator Properties and Testing Results-&amp;gt;WH.&lt;/FONT&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 19 Jun 2006 15:52:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Wichmann-Hill-BRNG-Seeding/m-p/921600#M13003</guid>
      <dc:creator>Andrey_N_Intel</dc:creator>
      <dc:date>2006-06-19T15:52:55Z</dc:date>
    </item>
  </channel>
</rss>

